Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package chains as DynamicContainers #896

Closed
therealryan opened this issue Aug 16, 2024 · 1 comment
Closed

Package chains as DynamicContainers #896

therealryan opened this issue Aug 16, 2024 · 1 comment
Labels
enhancement New feature or request java Pull requests that update Java code

Comments

@therealryan
Copy link
Collaborator

The junit5 assertion components run flows as DynamicTest instances, so you get a flat list of tests in your IDE. You can then use your IDE's interface to rerun individual cases by, e.g.: right-click>run.
This is fine for simple flows, but breaks down a bit for flows with dependencies - your IDE will run the case you want, but it has no notion of the dependency so your test will inevitably fail.
Flow's own test selection facilities deal with this issue by walking the dependency tree and including everything that is required for the desired flow, but it'd be nice to improve the IDE integration even a little bit.

I can't think of a way to deal with arbitrary dependencies, but we can easily improve things for flows in a chain (which are extremely likely to have dependencies on each other). The execution-order behaviour will produce a flat list of flows, and flows in a chain are guaranteed to be lumped together in that list. We can therefore easily package those chained flows into their own DynamicContainer instance.

This should be displayed in the IDE as a subtree, so if you want to rerun something in a chain you've got a single thing that you can right-click on.

@therealryan therealryan added enhancement New feature or request java Pull requests that update Java code labels Aug 16, 2024
@therealryan
Copy link
Collaborator Author

Fixed in #943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java Pull requests that update Java code
Projects
None yet
Development

No branches or pull requests

1 participant