You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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) usingmvn clean verify ${pom_file}
, thePublishTestResults@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)
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
Full task logs with system.debug enabled
Repro steps
No response
The text was updated successfully, but these errors were encountered: