define helpers for tests
refactor functional onload tests to use helpers
add coverage in build target
make functional test to run against instrumented code