"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" D:\TestFolder\Test.dll --test="nsTestNamespace.nsSmokeTests.SmokeTestOne" --output=D:\TestFolder\TestOutput.txt --work=D:\TestFolder --result:TestResult.xml;format=nunit3
[Explicit]
attribute, but I am unable to run it. I am running the command dotnet test --filter TestCategory=Explicit
. I've also tried variations of the filter argument to try and get it to run but with no luck. Is this a known issue? Or have i messed up the filter somehow.
dotnet test -- NUnit.Where Category=Explicit
(It works on my repro) Btw, I can repro that the --filter doesn't work. It should... so that is a bug. Would you mind raising it at https://github.com/nunit/nunit3-vs-adapter/issues ?
@OsirisTerje right now we use CruiseControl.NET.
It can be done within pure MSBuild here's an example of it being added:
<Target Name="Test" AfterTargets="Build">
<Exec Command=""C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" "$(TargetPath)"" />
</Target>
What will happen is when you build this in MSBuild after the "Build" target it will run the unit test, its a bummer because it loses an msbuild node while it builds but in our system this actually works to out, because we're building with some pretty beefy hardware (16 cores/ 32gb RAM per agent) and this would only occur on our unit test projects, the loss of a node is no big deal because we get throughput on nodes where they would otherwise be sitting doing nothing.
You can then have your CI gather up the TestLog.xml's at the end of the build process to parse for errors.
What would be nice though is to:
I am just trying to avoid reinventing the square wheel and was wondering if something like this already existed.
@mikkelbu The other tests in the file have a level of indentation like this:
var testCode = TestUtility.WrapClassInNamespaceAndAddUsing(@"
class AnalyzeArgumentHasImplicitConversion
{
[TestCase(uint.MaxValue)]
public void Test(long e) { }
}");
If I add a using statement, how would you want that indented?
Hi, i am using VSTest to run tests via Azure DevOps. Tests run successfully, but using the option "rerun failed tests: true", an error appears during the restart phase.
vstest.console.exe "C:\agent2.172.2\_work\r1\a\UITest\drop\Tests.Web\bin\Release\netcoreapp3.1\Tests.Web.dll"
/Settings:"C:\agent2.172.2\_work\_temp\3utv233tymm.runsettings"
/Logger:"trx"
/TestAdapterPath:"C:\agent2.172.2\_work\r1\a\UITest\drop\Tests.Web\bin\Release\netcoreapp3.1"
/TestCaseFilter:"FullyQualifiedName=Tests.Web.Tests._5.CourierModuleTest.N1_SendingTest.Id_5_1_01_TransferToCourierModule(Chrome)|FullyQualifiedName=Tests.Web.Tests._3.IssuanceOfDocuments.InformationOnTheApplicationIdentificationOfRecipient.N2_RecipientIdentificationTest.Id_3_2_13_RegisterAddressByFiasTest(Chrome)"
NUnit Adapter 3.16.1.0: Test execution started
An exception occurred while invoking executor 'executor://nunit3testexecutor/': Incorrect format for TestCaseFilter Missing Operator '|' or '&'. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.
How can I fix this error and successfully restart the tests in DevOps?
Running into a weird behavior trying to Debug Tests using VS 2019 16.7.2. I can get a breakpoint to stop but when I try to Continue or Step Into or Step Over it cancels the debugging session and outputs the below error. I can see a ThreadAbortException thrown as well. Any suggestions on how to fix or what I'm doing wrong?
Message:
Test cancelled by user
Stack Trace:
RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Reflect.InvokeMethod(MethodInfo method, Object fixture, Object[] args)
MethodWrapper.Invoke(Object fixture, Object[] args)
TestMethodCommand.InvokeTestMethod(TestExecutionContext context)
TestMethodCommand.RunTestMethod(TestExecutionContext context)
TestMethodCommand.Execute(TestExecutionContext context)
SimpleWorkItem.PerformWork()
Packages
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit.Console" Version="3.11.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />