Define each test case as a reusable test suite - #911
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the system test configuration to make each tutorial’s individual case combinations addressable as their own reusable test suites, enabling easier targeted runs and laying groundwork for future parallelization work discussed in #789.
Changes:
- Split tutorial test definitions into per-case-combination suites and then recompose per-tutorial suites by referencing those definitions.
- Update the tests documentation to highlight that individual case-combination suites can be executed directly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/tests.yaml | Introduces per-case-combination suite keys and adds per-tutorial suites that reference them via YAML anchors/aliases. |
| tests/README.md | Documents that specific case-combination suite names (e.g. quickstart_openfoam_cpp) can be run directly. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…luid-openfoam_solid-calculix
…luid-openfoam_solid-calculix
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
tests/tests.yaml:779
- The tutorial-level test suites in this section are intended to be sorted alphabetically (see file conventions), but
channel-transport-reactionis listed beforechannel-transport-particles. Swapping the two blocks keeps the section ordered and makes it easier to locate entries.
channel-transport-reaction:
tutorials:
- *channel-transport-reaction_fluid-fenics_chemical-fenics
channel-transport-particles:
tutorials:
- *channel-transport-particles_fluid-openfoam_particles-mercurydpm
- *channel-transport-particles_fluid-nutils_particles-mercurydpm
tests/tests.yaml:761
- There is a whitespace-only line after the
aste-turbinetutorial suite entry. This shows up as trailing whitespace in diffs and can cause avoidable lint noise; please make it an actually empty line.
aste-turbine:
tutorials:
- *aste-turbine
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
tests/tests.yaml:17
- The anchor/alias name for this case doesn’t match the suite key (
aste-turbine_aste). Most other entries use the suite key as the anchor name, so&aste-turbine/*aste-turbineis inconsistent and makes it harder to grep/maintain. Consider renaming the anchor to&aste-turbine_asteand updating all corresponding aliases (tutorial suite,release, and component suites).
aste-turbine_aste:
tutorials:
- &aste-turbine
path: aste-turbine
tests/tests.yaml:703
quickstart_openfoam_cppis out of alphabetical order in the case-combination suite list (it appears betweentwo-scale-heat-conduction_*andvolume-coupled-*). The file header states suites are sorted alphabetically; please move this block to the correct position (afterperpendicular-flap_*and beforeresonant-circuit_*) to keep the list maintainable.
quickstart_openfoam_cpp:
tutorials:
- &quickstart_openfoam_cpp
path: quickstart
case_combination:
- fluid-openfoam
- solid-cpp
reference_result: ./quickstart/reference-results/fluid-openfoam_solid-cpp.tar.gz
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
tests/tests.yaml:724
- This per-case suite is out of alphabetical order:
wolf-sheep-soil-creep_...appears before thewater-hammer_...suites, which conflicts with the file’s stated convention that suites are sorted alphabetically. Reordering the blocks would make future diff reviews and lookups more reliable.
wolf-sheep-soil-creep_soil-creep-landlab_wolf-sheep-grass-mesa:
tests/tests.yaml:632
- Suite name
quickstart_openfoam_cppdoesn’t match the documented naming convention of appending the exactcase_combinationentries (here:fluid-openfoamandsolid-cpp). This makes it harder to discover/construct suite names consistently (especially for matrix workflows). Consider renaming it to something likequickstart_fluid-openfoam_solid-cppand updating all references (README + alias usages in this YAML).
- &quickstart_openfoam_cpp
path: quickstart
case_combination:
- fluid-openfoam
- solid-cpp
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (4)
Previously missed (1) — in code that hasn't changed since the last review.
tests/tests.yaml:189
- In this suite, the
case_combinationlist items are indented differently than the rest oftests.yaml(most entries use two spaces undercase_combination:). Keeping indentation consistent reduces the chance of YAML whitespace mistakes during future edits.
This issue also appears in the following locations of the same file:
- line 197
- line 206
- line 234
case_combination:
- fluid-openfoam
- solid-dunefem
tests/tests.yaml:199
- The
case_combinationlist indentation here is inconsistent with most other suites in this file. Please align the list indentation to the common pattern (two spaces undercase_combination:) for readability and to avoid whitespace-sensitive YAML pitfalls.
case_combination:
- fluid-openfoam
- solid-fenics
tests/tests.yaml:208
- The
case_combinationlist items are indented one space less than the prevailing style in this file. Normalizing indentation makes this large YAML easier to review and less error-prone to maintain.
case_combination:
- fluid-openfoam
- solid-fenicsx
tests/tests.yaml:236
- Indentation of the
case_combinationlist differs from the majority of suites (two-space indent undercase_combination:). Consistent indentation is especially helpful now that suites are reused via YAML anchors/aliases.
case_combination:
- fluid-su2
- solid-openfoam
I often find it difficult to run a specific test case only. At the same time, in #789, we discussed a pre-processing step with @PranjalManhgaye, which would need each test case to be defined individually.
This PR pre-defines each test case combination as a reusable test suite, and refers to these in the test suite of each tutorial.
@PranjalManhgaye would that be enough for you?
I started refactoring part of the file manually, and then asked AI to finish the rest. Looking directly at the modified file (or comparing specific entries) will be easier than looking at the complete diff.
I have done a sanity check on all entries, and I am testing a few cases in https://github.com/precice/tutorials/actions/runs/32973715982