You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/advanced.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,11 +214,11 @@ function jltest {
214
214
215
215
1.**Keep tests isolated**: Each test file runs in its own module, so avoid relying on global state between tests.
216
216
217
-
2.**Use `init_code` for common setup**: Instead of duplicating setup code in each test file, use `init_code` to share common initialization.
217
+
1.**Use `init_code` for common setup**: Instead of duplicating setup code in each test file, use `init_code` to share common initialization.
218
218
219
-
3.**Filter tests appropriately**: Use `filter_tests!` to respect user-specified test filters while allowing additional programmatic filtering.
219
+
1.**Filter tests appropriately**: Use [`filter_tests!`](@ref) to respect user-specified test filters while allowing additional programmatic filtering.
220
220
221
-
4.**Handle platform differences**: Use conditional logic in your test suite setup to handle platform-specific tests:
221
+
1.**Handle platform differences**: Use conditional logic in your test suite setup to handle platform-specific tests:
222
222
223
223
```julia
224
224
testsuite =find_tests(pwd())
@@ -227,4 +227,7 @@ function jltest {
227
227
end
228
228
```
229
229
230
-
5.**Use custom workers sparingly**: Custom workers add overhead. Only use them when tests genuinely require different configurations.
230
+
1.**Load balance the test files**: `ParallelTestRunner` runs the tests files in parallel, ideally all test files should run for _roughly_ the same time for better performance.
231
+
Having few long-running test files and other short-running ones hinders scalability.
232
+
233
+
1.**Use custom workers sparingly**: Custom workers add overhead. Only use them when tests genuinely require different configurations.
0 commit comments