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

Add test run message to device tests logs #27993

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

albyrock87
Copy link
Contributor

@albyrock87 albyrock87 commented Feb 24, 2025

Description of Change

Sometimes device tests gets stuck or maybe the application crashes and we have no clue on where the problem was.
Logging a test's display name when it's about to start gives us the required information when looking at logs.

Sample output:

2025-02-24 08:49:29.514926+0100 Microsoft.Maui.Controls.DeviceTests[47875:6602729] info: TestRun[0]
      	[RUN] [Button] LineBreakMode Initializes Correctly(lineBreakMode: NoWrap)
2025-02-24 08:49:29.654033+0100 Microsoft.Maui.Controls.DeviceTests[47875:6602729] info: TestRun[0]
      	[PASS] [Button] LineBreakMode Initializes Correctly(lineBreakMode: NoWrap)

@albyrock87 albyrock87 requested a review from a team as a code owner February 24, 2025 07:52
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 24, 2025
Copy link
Contributor

Hey there @albyrock87! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the area-testing Unit tests, device tests label Feb 24, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

jsuarezruiz

This comment was marked as outdated.

@albyrock87
Copy link
Contributor Author

albyrock87 commented Feb 24, 2025

@jfversluis @jsuarezruiz despite my effort and seeing the logs locally they're missing on CI.

Do you have some kind of filtering in place?

I noticed this:

=== Messages dropped during live streaming (use log show to see what they were)

The main purpose of this PR was to understand what's happening here:
image

But unfortunately without those logs it's hard.

@jsuarezruiz jsuarezruiz self-requested a review February 24, 2025 12:00
@jfversluis
Copy link
Member

Hm maybe that is some Azure Pipelines thing? Where it decides that too much output is being shown? Or maybe not the right log level or something like that?

@albyrock87
Copy link
Contributor Author

Hm maybe that is some Azure Pipelines thing? Where it decides that too much output is being shown? Or maybe not the right log level or something like that?

I've been using the same logger used by [PASS] messages, so it must be some kind of filter on CI.

Locally I can see everything in the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants