-
Notifications
You must be signed in to change notification settings - Fork 7
W-19262690: add new logic get test command #792
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
Conversation
mdonnalley
left a comment
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.
Changes look good to me 👍
|
QA: setup
🟢 |
jshackell-sfdc
left a comment
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.
I just had a few suggestions, so I didn't create a whole new PR for you to review and merge. See my comments for some of the suggestions, tho -- they may not be correct. Thx!
messages/logicgettest.md
Outdated
|
|
||
| # description | ||
|
|
||
| When you run 'sf logic run test' asynchronously, it returns a test run ID. Use that ID with this command to see the results. |
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.
| When you run 'sf logic run test' asynchronously, it returns a test run ID. Use that ID with this command to see the results. | |
| When you run 'sf logic run test' to test Apex classes and Flows asynchronously, it returns a test run ID. Use that ID with this command to see the results. |
messages/logicgettest.md
Outdated
|
|
||
| # examples | ||
|
|
||
| - Get the results for a specific test run ID in the default human-readable format: |
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.
| - Get the results for a specific test run ID in the default human-readable format: | |
| - Get the results for a specific test run ID in the default human-readable format; uses your default org: |
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.
@EstebanRomero84 , I like to show examples of using the default org and then --target-org to specify one. However, I've always been a little confused about how this works when using an ID from a previous async command. I mean, aren't the test run IDs always tied to the org against which the "logic run test" command was originally run? But then --target-org is required for this command. So it's confusing. Anyway, I'm suggesting we show this "how to specify an org" thing with these examples, but if you think it doesn't make sense, then reject my suggestion. Thx.
messages/logicgettest.md
Outdated
|
|
||
| <%= config.bin %> <%= command.id %> --test-run-id <test run id> | ||
|
|
||
| - Get the results for a specific test run ID, format them as JUnit, and save them to the "test-results/junit" directory: |
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.
| - Get the results for a specific test run ID, format them as JUnit, and save them to the "test-results/junit" directory: | |
| - Get the results for a specific test run ID, format them as JUnit, and save them to the "test-results/junit" directory; uses the org with alias "my-scratch": |
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.
Ditto.
messages/logicgettest.md
Outdated
|
|
||
| - Get the results for a specific test run ID, format them as JUnit, and save them to the "test-results/junit" directory: | ||
|
|
||
| <%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit |
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.
| <%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit | |
| <%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit --target-org my-scratch |
package.json
Outdated
| } | ||
| }, | ||
| "logic": { | ||
| "description": "Use the logic commands to run Apex tests and view Apex test results.", |
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.
| "description": "Use the logic commands to run Apex tests and view Apex test results.", | |
| "description": "Use the logic commands to run Apex and Flow tests and view the test results.", |
What does this PR do?
Adds new topic called
logicand new command calledlogic get test.This command can fetch the result of a unified test run, which can include Apex and Flow test results in the same operation.
The results in human format will include a new column called Category.
The results in json format will include a new property called Category.
What issues does this PR fix or reference?
@W-19262690@
QA Instructions
- scratch org with version 258.
- Apex and Flow tests in the org.
apex run testcommand. Due to the current state of the command, it will run all Apex and Flow test in the org.logic get test -i 707...