visual-studionunitbrowserstackvstestbrowserstack-app-automate

VsTest is running all my tests and ignoring Test Category for Nunit Tests in the Azure Pipeline


I am trying to run tests in Visual Studio Test in Azure Pipelines. It worked Until I recently took a SDK from my cloud provider that made me set up run settings for my environments. I also upgraded my Dotnet Appium version to the newest version 5.0. In the past I could use TestCategory in VsTest and it was filtering my tests by that in the VsTest agent. Now it does not adhere to that. It finds the pattern but tells me its just not going to do that. I also tried adding source Filter with the Category in the runsettings but that did not change anything either. The only Error I can find is the below:

    IsValidServiceResponse: Received None command..Service Workflow is not active
    Creating run for selected test assemblies with following parameters
    SourceFilter: ThisWontBeUsed TestCaseFilter: TestCategory=UserSubscription

Solution

  • Also faced this issue

    Solution worked for me:

    1. Open Visual Studio Test step settings
    2. Fill Test filter criteria with TestCategory=$(TestCategory)
    3. Fill a value of TestCategory variable in your pipeline Variables section