-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Visual Studio Test Task fails on TFS 2017 RTM during build #3800
Comments
@srivatsamarichi looks like you are using nunit tests. Below error from logs suggest that this is not a valid filter that nunit understands. Please use nunit filters instead. "Exception filtering tests: No tests matched the filter because it contains one or more properties that are not valid (Category). Specify filter expression containing valid properties (DisplayName, FullyQualifiedName) and try again." |
@acesiddhu I have passed the filters in my tests as "TestCategory=UnitTests" for MSTests. It just works fine. I have couple of Nunit and Xunit tests as well. I have passed the test filter for each test method as [Category=Nunit]. But still the tests are not getting picked up during my build. If i don't specify any filter criteria, then it considers all the tests including my selenium scripts and will give me the summary. I don't want to run selenium tests as part of my builds and hence i am trying out to filter out here. Could you tell what are those filters? Thanks, |
can you ping me the test method body here for both kind of tests. I want to see attributes in the test method |
For NUnit: using System.Web.Mvc;
For MSTest using System;
Thanks, |
PFA scripts for the same. CustomersControllerTest.txt Thanks, |
Any updates here? |
@srivatsamarichi we will take a look at this today. Will keep you posted |
@acesiddhu Thanks for the update. |
@tanvi-soni can you check this out? Thanks |
@srivatsamarichi for nunit test you need to put this filter TestCategory=UnitTests Can you try with this property name. |
@acesiddhu I have passed the same arguments and filters. But it's still failing. |
is this the test case?. This is a mix of nunit and xunit. is this supposed to be nunit or xunit? I tried with nunit test case |
@acesiddhu Yep this is the one which i am trying for. This is a mixture of both NUnit and XUnit. I have 14 tests out of which 11 are identified. The other 3 are the ones which are not getting identified. |
this particular test method is a xunit test and not nunit. is this test case getting identified? I doubt because this test is treated as xunit test and not nunit (as Fact is the attribute) |
If i don't specify any filters in test step then by default it will detect all the tests including my selenium and will give me the test summary. But i don't want to execute my selenium as part of my build and hence i am looking something like this. I dunno how it's getting identified when no Test Filter Criteria is passed. |
It will get identified when no test filter is given as it will run all tests. above test is a xunit test. TestCategory filter is valid for nunit only. you either
|
This indeed identified. If we could have a quick 5 minute talk would it be fine? I have something else to show you as well. Hard to explain here. [email protected] you can ping me on Skype For business. Would really help if you could :-) |
Closing the issue. You can drop a mail at devops_tools AT Microsoft DOT com for any other issues |
Hi,
I am running Unit Tests as part of my build in TFS 2017 RTM. I am using VS Test task to do that. When i pass Test Filter Criteria as "TestCategory=UnitTests", the test fails. But it would have identified the tests and shown in the Test Summary post build. PFA logs for the same. Request any help here.
Thanks,
Srivatsa
5_Test Assemblies.txt
6_Test Assemblies(XUnit and NUnit).txt
The text was updated successfully, but these errors were encountered: