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 more structured output for tests #626

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Oct 20, 2020

The diff and the errors were always available, but they were not being sent to the output.

Additionally, make sure to send output to both the test explorer log and the codeql test log.

Resolves #582.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [n/a] @github/docs-content-dsp has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@aeisenberg aeisenberg added the Complexity: Medium Requires a moderate level of detail in design or review. label Oct 23, 2020
Copy link
Contributor

@adityasharad adityasharad left a comment

Choose a reason for hiding this comment

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

Should be good to go after a rebase.

const state = event.pass
? 'passed'
: event.messages?.length
? 'errored'
Copy link
Contributor

Choose a reason for hiding this comment

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

Would failed due to errors or failed to run be more meaningful for the user? I had to think about the difference between 'errored' and 'failed' for a moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That won't work. state is a property of the TestEvent interface and only allows 'running' | 'passed' | 'failed' | 'skipped' | 'errored'. The hope is that the messages will be more explicit as to what happened.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh fair enough. We can consider having more detail in the way message is constructed below, but no need to block this PR.

@aeisenberg aeisenberg force-pushed the aeisenberg/test-output branch 3 times, most recently from f0ad23b to 4d24f85 Compare November 9, 2020 20:27
@aeisenberg aeisenberg removed the request for review from jcreedcmu November 9, 2020 22:28
The diff and the errors were always available, but they were not being
sent to the output.

Additionally, make sure to send output to both the test explorer log and
the codeql test log.
@aeisenberg aeisenberg merged commit 966cc5a into github:main Nov 9, 2020
@aeisenberg aeisenberg deleted the aeisenberg/test-output branch November 24, 2020 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Requires a moderate level of detail in design or review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debugging broken QL unit tests is difficult
2 participants