Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: improve e2e test reporting#10304

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 9 commits intomainfrombetter-playwright-reporter
Oct 17, 2023
Merged

Conversation

aslilac
Copy link
Member

@aslilacaslilac commentedOct 16, 2023
edited
Loading

Screenshot 2023-10-16 at 4 14 34 PM
  • Use some buffering to store test output until the test is complete, and then only output it if the test failed, finally releasing the memory. Makes finding failures a lot easier, as even successful tests end up having a number of occurrences of the word "error" in their output. Trimming these from the logs makes finding the actual errors much easier.

  • Also counts how many tests succeed, and tracks specific test failures to show a little summarized report at the end of the output.

  • Better handling of printing errors, to make them easier to interpret and locate (especially when a source location is given)

  • An entire successfully run can now fit in a single screenshot! If a test fails, any output you see is much more likely to now actually be related.

@aslilacaslilac changed the titlerefactor: better e2e test reportingrefactor: improve e2e test reportingOct 16, 2023
@aslilacaslilac requested review froma team,Parkreiner andmtojek and removed request fora team andParkreinerOctober 16, 2023 18:54
"",
)}`,
);
onStdErr(chunk: string, test?: TestCase, _?: TestResult): void {
Copy link
Member

Choose a reason for hiding this comment

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

We might be losing here output fromcoderd, which can be really useful during backend debugging. In the legacy version, it is logged like this:

[stderr] [unknown]: [WebServer] 2023-10-17 06:54:03.412 [info]  provisionerd.runner: apply successful  job_id=89020454-1bd8-4eed-a0c9-eb12fa532a92  template_name=68ac3052  template_version=hardcore_moser9  workspace_build_id=465c8cad-3fcb-42fb-b9bb-56007b4a1db3  workspace_id=74006ba8-82a8-4693-b971-f3da61ad02e0  workspace_name=d93260bd  workspace_owner=admin  workspace_transition=start  resource_count=1  resources="[name:\"example\" type:\"echo\"]"  state_len=0

It looks like the new reporter simply skips these log records.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

that was sort of intentional. it adds a lot of noise when trying to debug a frontend failure, and since it's not tied to a specific test case it's hard to buffer and display later in a way that makes sense.

I also added some logic forpreserveOutput, but I just read the docs and it turns out it does something entirely different from what I expected, and can't even be set from the command line like I hoped 😵‍💫

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

the idea was supposed to be that backend peeps could set--preserveOutput=always when they ran the tests... I'd really like to find a compromise here to keep the output clean when possible. it's just always such a pain to find theactual error in all of the mountains of logs.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

example run, which now has 41 occurrences of the word "error" but succeededhttps://github.com/coder/coder/actions/runs/6549912328/job/17787879014?pr=10304

Copy link
Member

Choose a reason for hiding this comment

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

A good compromise would be only filtering outaudit_log entries, which do not bring a lot of value. 👍

I would leave coderd output as it is helpful with debugging the request flow or provisioner behavior, especially while dealing with flaky issues.

aslilac reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

if we can also ignore lines likeecho: recv done on Session session_id= error=EOF then I'll be happy. :)

Copy link
Member

Choose a reason for hiding this comment

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

Agree 👍

@Parkreiner
Copy link
Member

Parkreiner commentedOct 17, 2023
edited
Loading

Oh, just realized that I had gotten removed from the reviewer list after Marcin jumped in. Sorry about that

@aslilac
Copy link
MemberAuthor

Oh, just realized that I had gotten removed from the reviewer list after Marcin jumped in. Sorry about that

yeah, I tried assigning coder/ts, and then realized "oh, he's gonna have like zero context on this change" 😂 went and looked at the blame to see who actually would

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

LGTM

@aslilacaslilac merged commit2b5e02f intomainOct 17, 2023
@aslilacaslilac deleted the better-playwright-reporter branchOctober 17, 2023 22:11
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 17, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ParkreinerParkreinerParkreiner left review comments

@mtojekmtojekmtojek approved these changes

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@aslilac@Parkreiner@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp