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

Need timeout setting for all unit tests in MSBuild command #834

Closed
sharmg10 opened this issue Nov 18, 2020 · 1 comment
Closed

Need timeout setting for all unit tests in MSBuild command #834

sharmg10 opened this issue Nov 18, 2020 · 1 comment

Comments

@sharmg10
Copy link

We are executing all unit tests after build using this command but sometimes some unit tests hang for a long time.

msbuild myproject.proj /t:Clean;BuildWithoutIM; QualityAssurance; /p:Configuration="debug" /p:Platform="Any CPU" /p:SolutionNameList=%SLN%

So I want to set a timeout for all Nunit test cases in the above command. Please suggest if there is a solution.

@ChrisMaddock
Copy link
Member

Hi,

The NUnit Console doesn't yet have a feature for this, there's an open feature reqyest for that functionality here: #437

You might be able to manipulate this with MSBuild, depending how you're running you NUnit tests inside you MSBuild proj file. If you're using Exec, there's a Timeout option, see the docs: https://docs.microsoft.com/en-us/visualstudio/msbuild/exec-task

I'll close this issue as I think the NUnit part is covered by #437, and we don't maintain an MSBuild task ourselves. Happy to provide suggestions if we can though.

@ChrisMaddock ChrisMaddock added this to the Closed Without Action milestone Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants