Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| codebase:testing [2024/09/28 15:58] – created - external edit 127.0.0.1 | codebase:testing [2025/09/23 01:06] (current) – [Halt tests when a failure is found] typo fixed: convinient => convenient hfwei | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| + | You will need ant build system. '' | ||
| - | ===== test-dist: | + | ===== customBuild.xml common commands |
| + | * compile: recompiles the production code for project. Required if you changed any code in src folder. | ||
| + | * compile-test: | ||
| + | * test-set: by using the parameter '' | ||
| + | Example: | ||
| + | < | ||
| + | ant -f customBuild.xml compile compile-test test-set -Dtest.testcases=" | ||
| + | </ | ||
| - | Executes accompanying unit tests on jar file | + | ===== Running a test with a debugger ===== |
| + | |||
| + | '' | ||
| < | < | ||
| - | ant -f customBuild.xml | + | ant -f customBuild.xml compile-test test-set -Dtest.suspend=y -Dtest.testcases=" |
| </ | </ | ||
| - | To speedup, you can modify customBuild.xml and modify junit line inside | + | ===== Specify number |
| + | |||
| + | By default uses all your cores. You can specify a custom amount using '' | ||
| < | < | ||
| - | <junit printsummary=" | + | ant -f customBuild.xml test -Dthreads=4 |
| </ | </ | ||
| - | to use more threads: | + | ===== Halt tests when a failure is found ===== |
| + | |||
| + | By default the test target will run all the test and report success or failure only at the end. It can be convenient | ||
| < | < | ||
| - | <junit printsummary=" | + | ant -f customBuild.xml test -Dtest.halt=true |
| </ | </ | ||
| + | ===== test-dist: ===== | ||
| + | |||
| + | Executes accompanying unit tests on jar file | ||
| + | |||
| + | < | ||
| + | ant -f customBuild.xml clean compile compile-test test-dist | ||
| + | </ | ||