Search code examples
azure-devopsnewmanazure-devops-server-2019

Azure release pipeline - publish test results - Tests Tab - TFS.WebApi.Exception: System field FailingSince not found


I have a very simple release pipeline using newman test, and publish the results.

Release Pipeline

Publish test Results setting

The "Publish Test Results" was successful and I can access the results via the link inside.

Publish Test Results

However, when I try to access the results via "Tests" tab, I got this error.

TFS.WebApi.Exception: System field FailingSince not found

Error message

Anyone know why? Thanks.

PS: Currently, I'm using version 1.* for "Publish Test Results". If I switch to version 2.*, I will get another set of error here: ticket


Solution

  • You can use the stored process below to resolve the issue.

    Find the dataspace ID and partition ID from the below query on the collection DB

    SELECT PartitionId, DataspaceId FROM dbo.tbl_Project where PartitionId >0 and ProjectName = ‘<tfs project name>’
    

    Use the partitionID and dataspaceID from above query on the fields table to see if the appropriate FailingSince field is present

    SELECT * FROM tbl_TestFieldsEx WHERE PartitionId =<partitionID> AND DataspaceId = <dataspaceID>
    

    This should not return a row with the field for FailingSince

    Update the table as below

    insert into @p3 values(N'StackTrace',12,0,1,1)
    
    insert into @p3 values(N'FailingSince',12,0,1,1)
    
    insert into @p3 values(N'Comment',12,0,1,1)
    
    insert into @p3 values(N'ErrorMessage',12,0,1,1)
    
    insert into @p3 values(N'OutcomeConfidence',6,0,1,1)
    
    insert into @p3 values(N'TestRunSystem',12,1,0,1)
    
    insert into @p3 values(N'AttemptId',8,0,1,1)
    
    insert into @p3 values(N'UnsanitizedTestCaseTitle',12,0,1,1)
    
    insert into @p3 values(N'UnsanitizedAutomatedTestName',12,0,1,1)
    
    insert into @p3 values(N'TestResultGroupType',12,0,1,1)
    
    insert into @p3 values(N'MaxReservedSubResultId',8,0,1,1)
    
    
    exec prc_AddTestExtensionFields @partitionId=<partitionID>,@dataspaceId=<dataspaceID>,@fieldsTable=@p3
    

    This should update at least one row

    Run the above-read query again to see that the FailingSince field is present.

    SELECT * FROM tbl_TestFieldsEx WHERE PartitionId =<partitionID> AND DataspaceId = <dataspaceID>
    

    This should not return a row with the field for FailingSince