Skip to content

Fails to create test run when Test Plan is in a different Azure DevOps project (Build {buildId} cannot be found) #137

@ombacke

Description

@ombacke

Summary
When using Cross-Platform Test Result Publisher, publishing fails if the pipeline runs in one Azure DevOps project and the Test Plan is in another project.

The task can successfully match test cases in the target project, but fails during test run creation.

Error
[error]Build {buildId} cannot be found.

Impact
Test results are not published to the target Test Plan, even though test case matching succeeds.

Current Setup

  • Pipeline project: Project A
  • Test Plan project: Project B
  • Task: Cross-Platform Test Result Publisher@1
  • testResultFormat: jUnit
  • testResultFiles: **/test-results/junit.xml
  • ProjectName: Project B
  • TestPlan: Automation Suite
  • testCaseMatchStrategy: Regex
  • testCaseRegex: TC(\d+)_

Observed Behavior

  • JUnit result file is detected and parsed.
  • Test cases are matched in the target project (Project B).
  • CreateTestRun fails with Build {buildId} cannot be found.

Expected Behavior
If ProjectName points to a different project and test case matching works there, then CreateTestRun should:

  • Resolve a valid build reference in the target project context, or
  • Allow creating the test run without requiring a build from the target project, or
  • Expose a configuration option to control build association for cross-project publishing.

Why This Appears to Be a Bug
The extension already works against the target project for test case matching, so project access and mapping appear correct. The failure seems isolated to build lookup during CreateTestRun when projects differ.

Request
Please confirm whether cross-project Test Plan publishing is officially supported.
If supported, please provide:

  • A fix for the Build not found failure, or
  • A documented workaround/configuration for cross-project CreateTestRun.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions