Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: PublishTestResults@2 task is skipped if tests in preceding task fail #19660

Closed
4 of 7 tasks
vanastassiou opened this issue Mar 19, 2024 · 1 comment
Closed
4 of 7 tasks

Comments

@vanastassiou
Copy link

vanastassiou commented Mar 19, 2024

New issue checklist

Task name

PublishTestResults@2

Task version

2.236.0

Issue Description

When I run unit tests in a script pipeline task (Bash) using mvn clean verify ${pom_file}, the PublishTestResults@2 task that immediately follows is executed as expected. However, if the unit tests fail, PublishTestResults@2 is skipped. This behaviour is not noted in the task documentation (or if it is, I haven't been able to find it).

Adding condition: succeededOrFailed() for this task results in the behaviour I initially expected: when tests fail, PublishTestResults@2 runs successfully and a report is published in the Tests tab of the pipeline run.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

RHEL 8 agent

Relevant log output

No error -- the task is skipped altogether.

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants