Azure-pipelines-agent: [question] Publish Test Results task: Could not publish build level data. Object reference not set to an instance of an object.

Created on 17 Dec 2018  路  7Comments  路  Source: microsoft/azure-pipelines-agent

I have two pipeline jobs, one for macOS and one for Windows. Both jobs invoke the same template file which contains the followings:

- script: myFolder/gradlew -p ./myFolder/ clean build -PignoreTestFailures=true --refresh-dependencies --continue
  displayName: 'Gradle - Build'
- task: PublishTestResults@2
  inputs:
    testResultsFormat: 'JUnit'
    testResultsFiles: '**/build/test-results/test/*.xml'
    mergeTestResults: true
    testRunTitle: 'Tests'
  displayName: 'Publish - Test Results'

The macOS build runs first, no warnings. Then I can see the following warning in the Windows log:

##[warning]Could not publish build level data. Object reference not set to an instance of an object.

Question: What does it mean? What is the problem?
Note: I am not using any Gradle Tools task.

Thank you!

Test bug

Most helpful comment

@kittaakos yes. This warning can be ignored and don't cause any breaks in pipeline outcome.

All 7 comments

@nigurr for test question.

Update: I can see the same warning in the Windows build even if it runs before the macOS one. The macOS build does not log this warning.

@kittaakos we identified the bug and committed the fix. Due to holiday season, the fix is not rolled out yet.
This will be addressed as soon as possible.

@nigurr, does that mean I can ignore this warning for now?

@kittaakos yes. This warning can be ignored and don't cause any breaks in pipeline outcome.

@nigurr is this fixed?

Yes. This fix is rolled out. Closing this issue

Was this page helpful?
0 / 5 - 0 ratings