Pixwel API - testing
You should aim for 100% code coverage of any code that you touch. There are two suites of tests in the Pixwel API:- Kahlan tests - Kahlan is nice, we like Kahlan.
- Legacy tests - older tests in the default li3 testing tool.
Kahlan tests
Code coverage
See also xdebugCoverage: by method
Note: The CI build actually collates together legacy and kahlan test coverage.The following will created an HTML coverage report:
Best practise for Pixwel with Kahlan
To make sure performance is good:- Prefer Stubbing over Fixtures - Fixtures are slow.
- If you MUST use fixtures:
- Make sure it’s compartmentalised and the tests that do not need fixtures are in a separate context block to the ones that do
- Only use the exact fixtures that are needed - don’t blindly load them all
- Prefer
beforeoverbeforeEachwhere possible
Legacy tests
Back to docs index | API docs index | Next page in recommended reading order >>