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

Allow defining test collection for parallelism in xUnit #686

Closed
godrose opened this issue Aug 3, 2016 · 8 comments
Closed

Allow defining test collection for parallelism in xUnit #686

godrose opened this issue Aug 3, 2016 · 8 comments

Comments

@godrose
Copy link

godrose commented Aug 3, 2016

In my current project I use xUnit v2 as the test provider. I would like to run the generated tests in parallel. However there are several test collections which include tests/scenarios that could not be run in parallel within the same collection. Is there any way to define an attribute that will generate Collection[] attribute at the class/feature level?
https://xunit.github.io/docs/running-tests-in-parallel.html

@samholder
Copy link
Contributor

@godrose I don't believe that this is currently supported, but I'm sure something along these lines could be added, either to the default XUnit2 test generator or via a plugin. I recently implemented something similar to be able use NCrunch specific attributes in the generated tests, and maybe that can provide some inspiration.

@Blackbaud-ChrisKessel
Copy link
Contributor

@SabotageAndi I was thinking about jumping into this one and taking a look as I'm running up against an issue that xUnit might solve. However I have noticed that alot has changed in the code base. Mainly the absence of 'specflow.exe' in the tools. Is there an easy way to fire off something like 'GenerateAll' without too much effort?

@SabotageAndi
Copy link
Contributor

@Blackbaud-ChrisKessel The best way to generate code- behind files with SpecFlow 3 is to use the MSBuild task.

@Blackbaud-ChrisKessel
Copy link
Contributor

PR #1380 for this
xunit.collection is a class level attribute only.
Only allows one 'xunit.collection' attribute per class.
Uses feature level tag: '@xunit:collection(<COLLECTION_NAME>)'
COLLECTION_NAME allows alpha, numeric, '-', and '_'
COLLECTION_NAME does not allow white space (just like any other tag)

@SabotageAndi SabotageAndi added this to the SpecFlow 3.0 milestone Jan 9, 2019
@SabotageAndi
Copy link
Contributor

resolved with #1380

@godrose
Copy link
Author

godrose commented Feb 3, 2019

@SabotageAndi Is this included into 161?

@SabotageAndi
Copy link
Contributor

@godrose No, but it will be in 3.0.169 which is uploaded now to NuGet.org.

@lock
Copy link

lock bot commented Jul 8, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants