-
Notifications
You must be signed in to change notification settings - Fork 351
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
feat: add test results output #949
Conversation
Revert back to needs.check-record-key.outputs.record-key-exists == 'true'
|
resolves #810 |
- remove .idea excluded directory
please can this be approved |
@mihaisee can you add me as a reviewer? seems this is stuck now for some time, I would like to make use of these changes. |
1 similar comment
@mihaisee can you add me as a reviewer? seems this is stuck now for some time, I would like to make use of these changes. |
Looking forward to see that change approved! |
Would love to see this as well +1, my use case is using these results in a different step to send an e-mail and ms teams message. |
Any progress on getting this reviewed? |
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Mike McCready <[email protected]>
Co-authored-by: Mike McCready <[email protected]>
action.yml
Outdated
@@ -96,6 +96,8 @@ outputs: | |||
description: 'Cypress Cloud URL if the run was recorded (deprecated)' | |||
resultsUrl: | |||
description: 'Cypress Cloud URL if the run was recorded' | |||
testResults: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this some more, we should probably name this runResults
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation currently uses the term "test results"
https://docs.cypress.io/guides/guides/module-api#Results
so if the term is changed here, it should be changed in the Module API documentation as well.
Can I provide any help to get this moving @mihaisee ? |
update testResults description Co-authored-by: Matt Schile <[email protected]>
You need to sign the CLA |
@@ -816,6 +816,8 @@ const runTests = async () => { | |||
debug(`Cypress options ${JSON.stringify(cypressOptions)}`) | |||
|
|||
const onTestsFinished = (testResults) => { | |||
core.setOutput('runResults', testResults) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed with the team. For simplicity, we would like to scope the exposed runResults stringified object to version
, totalDuration
, totalFailed
, totalPassed
, totalPending
, totalSkipped
, totalSuites
and totalTests
. The results object can get quite large depending on the size of your test suite and if more information is needed, it can be parsed and save in the afterRun
hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emilyrohrbough can logging the entire results object be an optional input parameter instead? e.g.
output-entire-results-object: true
This way, by default, a summary is output but still leaves us the option to get the entire object. This way one does not need to go in and change all the test files to log an object (only needs a version update and addition of a parameter)
CC @mihaisee
Hi @mihaisee, will you have time to make the updates asked as Emily outlined above? |
@mihaisee Just checking in again with the status of this PR |
Closing as stale. Please open a new PR if the work can be pulled out to the smaller results output requested. |
Added a
testResults
output that contains a strigified JSON object with the test results.Object structure
Usage