Avoid sending status email if no error#29284
Merged
vidai-msft merged 1 commit intomainfrom Mar 20, 2026
Merged
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the live test reporting experience in tools/TestFx/Live by simplifying console output and reducing email notifications to only error cases.
Changes:
- Remove the “no errors” email path so emails are only sent when live test failures exist.
- Simplify the Azure Pipelines section header text emitted during per-module live test execution.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/TestFx/Live/SendLiveTestReport.ps1 | Only sends the email report when $errorsArr contains failures; removes the “no errors” email content branch. |
| tools/TestFx/Live/InvokeLiveTestScenarios.ps1 | Shortens the per-module section header output by removing the [Test Scenario Result] label. |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
88
to
+92
| if ($errorsArr.Count -gt 0) { | ||
| $emailContent = $errorsArr | Sort-Object OSVersion, PSVersion, Module, Name | ConvertTo-Html -Property OSVersion, PSVersion, Module, Name, Exception, RetryException -Head $css -Title "Azure PowerShell Live Test Report" -PreContent "$summarySection<h1>Live Test Error Details</h1>" | ||
| } | ||
| else { | ||
| $emailContent = "<html><head>$css</head><body>$summarySection<div>No live test errors reported. Please check the overall status from Azure pipeline.</div></body></html>" | ||
| } | ||
|
|
||
| Send-EmailServiceMail -To "${env:EMAILTO}" -Subject $emailSubject -Content $emailContent -IsHtml | ||
| Send-EmailServiceMail -To "${env:EMAILTO}" -Subject $emailSubject -Content $emailContent -IsHtml | ||
| } |
719f8f5 to
6898579
Compare
YanaXu
approved these changes
Mar 20, 2026
notyashhh
pushed a commit
that referenced
this pull request
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request makes minor adjustments to the output and reporting logic in the live test PowerShell scripts, primarily to clean up messaging and simplify the email notification logic.
Output and Messaging Improvements:
InvokeLiveTestScenarios.ps1, the[Test Scenario Result]label was removed from the section header in the output message for live test runs, making the output more concise.Email Reporting Logic:
SendLiveTestReport.ps1, the branch that sent a "no errors" email when there were no test errors was removed. Now, emails are only sent if there are actual errors to report, reducing unnecessary notifications.Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.