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

Parallel/sequential execution of tests #23

Open
hgcummings opened this issue May 16, 2017 · 0 comments
Open

Parallel/sequential execution of tests #23

hgcummings opened this issue May 16, 2017 · 0 comments

Comments

@hgcummings
Copy link
Owner

In principal, there's no reason that tests within a spec class couldn't be executed in parallel. Although for smaller specs with trivial tests, the overheads might outweigh the benefits.

If this is opt-in, then it doesn't need to be a breaking change (no major version bump). Could just add a .inParallel() method to SpecificationNode (would have no useful effect on leaf nodes).

If this is opt-out, it would be a breaking change. Would need to add a .inSeries (or similar) method to SpecificationNode (neat advantage of being able to opt-out for a single nested node within a class). Could also potentially opt-out automatically in certain circumstances, e.g.:

  • Tests subject to a TestRule that inherits from ExternalResource
  • Have a custom SharedState annotation that could be applied to test rules and spec classes

If executing in parallel, would need to worry about reporting order. Could maintain order by gathering all results and reporting at the end of the class (might mess up surefire's timing reports), or just be explicit about how test order is/isn't maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant