Skip to content
Update Testing Guide authored by jpalbrecht's avatar jpalbrecht
# Testing Guide
Means to keep the test duration as short as possible.
- Remove unused code
- Get paths form service instead of from domains. This reduces the domain instantiation time.
- Short-circuit domain reference chains by mocking or null. This reduces the total domain instantiation time.
- Don't write test-objects into the database (avoid using the domain factory?)
- Speed up filesystem access by using Java in-memory filesystem (requires use of the Path class instead of the File class) or -- at the OS level -- shared-memory filesystem (/dev/shm).
- Profile tests and identify slow tests, packages, components and operations.
- Sort tests by test duration and try to reduce it (disadvantage: total test time depends on intrinsic complexity)