-
Notifications
You must be signed in to change notification settings - Fork 106
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
VSTest retry functionality failes when having spaces or ampersands (&) in TestCase parameter #807
Comments
@SabotageAndi There are known issues around FullyQualifiedNames so this can be another one of those. But, I don't see the adaptercode in the stack trace there, so wonder a bit if this is something in the retry code. A bit strange also that it only happens on retry. If it was the adapter it should have triggered also on the initial run. Can you check more?. E.g. turn on verbosity in the runsettings file, and see if you get anything from the adapter at all. |
The retry functionality in the tasks works, that it is starting a new vstest.console.exe call with a TestCaseFilter parameter. This is the second call.
This is the generated filter parameter: /TestCaseFilter:"FullyQualifiedName=NUnitRetry2213.Features.CalculatorFeature.AddTwoNumbers("Spa ces",null)" And this is where the FQN generation comes into place. This is the FQN from the first run which gets passed as a parameter to the second run. |
Thanks! This would certainly trigger the FQN issue. |
Is there any fix/workaround for this yet? |
@OsirisTerje Do you think the FQN issue is likely to be actioned at this point? Trying to identify the prospect of a workaround or looming solution as this is preventing us using the retry functionality in DevOps currently as many of our data driven test cases contain problematic characters (e.g. #). |
@rsuk-mb We're still waiting .... I hope it will be within this year though. FWIW: I would sanitize the test cases - it should not be too much extra work. You can derive a class from TestCaseData and use that. |
Is there any fix/workaround for this yet? |
@akshaygit09 Unfortunately no, we haven't heard anything about this for a long time. |
When reporting a bug, please provide the following information to speed up triage:
NUnit: 3.12
NUnit3TestAdapter: 3.15.1
VS 2019 Enterprise Version 16.8.1
https://github.com/SabotageAndi/NUnitRetry2213
.NET Core 3.1
Azure DevOps/ VSTest Task V2
The Azure DevOps VSTest task has the functionality to rerun failed tests. It looks like it doesn't work when you are using
TestCaseAttributes
and have spaces or ampersands (&) in the parameters.Error:
Code:
The code is generated by SpecFlow, but I think we are generating the code correctly. We could escape the string in SpecFlow when we create the code, but there would nowhere be a normalization of it.
Repro project: https://github.com/SabotageAndi/NUnitRetry2213
GitHub Issue at SpecFlow: SpecFlowOSS/SpecFlow#2213
For me, it looks like there is some escaping missing in the test adapter full qualified name generation for spaces.
The text was updated successfully, but these errors were encountered: