How do I get the Owner field to be populated in Azure DevOps when running tests from SpecFlow?

Viewed 122

I have a suite of automation test using selenium that run using SpecFlow. I run the tests through a VSTest task in Azure DevOps Pipelines and I want to populate the Owner field.

Azure DevOps Test results

I checked SpecFlow documentation and on page 119 (https://docs.specflow.org/_/downloads/specflow/en/latest/pdf/) it describes adding an owner using the @ symbol

SpecFlow Documentation

However I tried adding this tag to both the scenarios and the features and the owner always shows up as "unspecified". Can someone help here? I would also be happy to figure out how to populate the "Tags" field but I spoke with Microsoft and they don't think that will be possible.

SpecFlow .feature file test 1

@Owner:SearchRecent
Feature: RecentSearch

    @SmokeTest
    Scenario: RecentSearch_UserCanOptIn
        When I call POST endpoint
        Then I get 200 response

SpecFlow .feature file test 2

Feature: RecentSearch

    @SmokeTest
    @Owner:SearchRecent
    Scenario: RecentSearch_UserCanOptIn
        When I call POST endpoint
        Then I get 200 response

task in Yaml file

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\APITests.dll      
      !**\obj\**
      !**\bin\**\ref\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
    testFiltercriteria: 'TestCategory=${{ parameters.testTags }}'
    uiTests: true
    vsTestVersion: 'toolsInstaller'
    runSettingsFile: '<insert-path>/${{ parameters.environment }}.runsettings'
    diagnosticsEnabled: true
    collectDumpOn: 'always'
    rerunFailedTests: true
    rerunFailedThreshold: '70'
    rerunMaxAttempts: '3'

Then when i run the pipeline I see the test result as passed. but it shows the owner as "not available"

RecentSearch_UserCanOptIn Result

0 Answers
Related