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

Run test for multiple iteration will start multiple nunit agent #40

Closed
CharliePoole opened this issue Aug 23, 2016 · 1 comment
Closed

Comments

@CharliePoole
Copy link
Collaborator

@levimm commented on Mon Aug 22 2016

Hi Guys,

I'm using this pattern to run test for multiple iterations.

string[] arg = {@"someDll.dll", "--dispose-runners" };
for (int i = 0; i < 3; i++) ConsoleRunner.Program.Main(arg);

In second iteration, two nunit-agent.exe are running, and in third iteration, three agents are running.
I notice the dll is always added to InputFiles in CommandLineOptions so the created testPackage contains multiple subpackages.
Is this intented?

Cheers


@CharliePoole commented on Tue Aug 23 2016

@levimm Moving this to our new nunit-console repository. Don't feel bad, it is brand new. You're probably only the first to get caught this way.

@CharliePoole
Copy link
Collaborator Author

You aren't running nunit3-console but are calling it's main as a subroutine three times. So some strange behavior isn't that surprising! The effect is neither intended by us nor protected against.

In this case, the difference is because Main is a static method and the instance of ConsoleOptions it uses is stored in a static field.

@CharliePoole CharliePoole modified the milestone: 3.5 Aug 29, 2016
@rprouse rprouse modified the milestone: 3.5 Oct 5, 2016
@rprouse rprouse modified the milestone: Closed Without Action Jan 10, 2017
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

2 participants