Deltares / Ribasim

Water resources modeling
https://ribasim.org/
MIT License
42 stars 5 forks source link

Move from ReTestItems to TestItemRunner #1758

Closed visr closed 2 months ago

visr commented 2 months ago

They are both based on a testitem macro that are quite similar, so it isn't a big change. The main reason for this is to make sure we can properly use the VS Code support as documented here. Right now that only partially works since the two packages have similar origins.

One downside of this is that we no longer run testitems in parallel by default. Locally this means going from ~5 to ~8 minutes to run all the tests, though we should probably verify the timing difference for CI, and run with @run_package_tests verbose = true to see which tests are taking up most time.

This is prompted by this Discourse post, and see also the answer to my question about parallel execution.

We should also look into making use of @testsnippet and @testmodule.

visr commented 2 months ago

Comparing with another PR on the same main, #1757, I see this effect:

Julia Tests / Julia windows-latest - x64: from 20 to 21 min Julia Tests / Julia ubuntu-latest - x64: from 9 to 10 min

That seems quite acceptable to me. We should look if we can get Windows closer to Linux times though.

ReTestItem has also can run in VS code as well

Indeed, that's what I meant with partially works, as long as we use features supported by both packages. As they diverge, this will become harder to reason about, hence I just prefer switching to the package that the VS Code UI was designed for, so we can use all those features without worrying about this.