SoftwareTesting:Tools:Simple xpcshell test harness
From MozillaWiki
- See bug 322894 for more info.
- Some documentation is available on MDC: mdc:Writing xpcshell-based unit tests.
- checked in to trunk 27-jan-2006
Tasks
-
Put common elements of necko and content test harness files in to one directory -
modify existing test cases to use common files - write one simple test case using common harness
- search for test case ideas
- bugs found by smoketest
- test cases written by timeless
- other non-security test cases in bugzilla
- ask module owners for ideas for tests
- ask release folks for ideas for tests
Description of new test file layout
- module/test/
- Makefile.in - like tools/test-harness/xpcshell-simple/example/Makefile.in
- unit/ - files will be installed in dist/bin/module_name/
- head_*.js - code to run before the test(s)
- tail_*.js - code to run after the test(s)
- test_*.js - test code
- test_all.sh installed in dist/bin
- head.js and tail.js installed in dist/bin/test-harness/xpcshell-simple/
- log files end up in dist/bin/module_name/
Info needed
-
build system (makefile-fu) to check out tools/test-harness/xpcshell-simple with current projects -
build system (makefile-fo) to install test_all.sh in dist/bin, head.js and tail.js in dist/bin/test-harness/xpcshell-simple/