Skip to content

add basic logging for test failures #21023

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sanjays-ms
Copy link

Context

GradleV3 Task Logging
The GradleV3 Task was printing code analysis failure messages when the pipeline was failing due to test case failures.


Task Name

GradleV3


Description

Added few additional logs to indicate test failures if the pipeline fails due to test case failures.

@mishrarish mishrarish marked this pull request as ready for review May 13, 2025 10:31
@mishrarish mishrarish requested review from tarunramsinghani and a team as code owners May 13, 2025 10:31
@sanjays-ms
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"


const errorMsg = err.toString().toLowerCase();
const isTaskNameIndicatesTest = inputTasks.some(task => task.toLowerCase().includes('test') && !task.toLowerCase().includes('setup'));
const errorMsgIndicatesTest = errorMsg.includes('test failure') || errorMsg.includes('tests failed') || errorMsg.includes('failing tests') || (errorMsg.includes('test') && errorMsg.includes('fail'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These checks will fail in case of localization i.e. if this is running on some machine with different language. we need a better way to identify what is failing.

@sanjays-ms
Copy link
Author

/azp run

@sanjays-ms
Copy link
Author

/azp run

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

Successfully merging this pull request may close these issues.

3 participants