-
Notifications
You must be signed in to change notification settings - Fork 26
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 JSON result to test:run command #101
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
22e157d
feat: add summary, tests, and class covs
AnanyaJha 0db84fb
feat: add records attribute
AnanyaJha dabc0fd
fix: add attributes to coverage property
AnanyaJha 5f1de63
chore: added tests for json
AnanyaJha f7b3555
fix: remove all attributes
AnanyaJha e4349cd
chore: fix rebase issues
AnanyaJha 27ea903
chore: add totalLines & coveredLines
AnanyaJha b778593
chore: refactor json reporter
AnanyaJha 5b97b7b
chore: remove console log
AnanyaJha e5e15dc
chore: added more tests
AnanyaJha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -331,10 +331,10 @@ export type ApexTestResultData = { | |
* The full name of the associated ApexClass method | ||
*/ | ||
fullName: string; | ||
perTestCoverage?: { | ||
apexClassOrTriggerName: string; | ||
percentage: string; | ||
}; | ||
/** | ||
* The associated ApexCodeCoverage object | ||
*/ | ||
perTestCoverage?: PerTestCoverage; | ||
}; | ||
|
||
export type CodeCoverageResult = { | ||
|
@@ -353,8 +353,6 @@ export type TestResult = { | |
failRate: string; | ||
testsRan: number; | ||
orgId: string; | ||
testRunCoverage?: string; | ||
orgWideCoverage?: string; | ||
outcome: string; | ||
passing: number; | ||
failing: number; | ||
|
@@ -369,6 +367,10 @@ export type TestResult = { | |
username: string; | ||
testRunId: string; | ||
userId: string; | ||
testRunCoverage?: string; | ||
orgWideCoverage?: string; | ||
totalLines?: number; | ||
coveredLines?: number; | ||
}; | ||
tests: ApexTestResultData[]; | ||
codecoverage?: CodeCoverageResult[]; | ||
|
@@ -397,10 +399,13 @@ export type ApexCodeCoverage = { | |
|
||
export type PerTestCoverage = { | ||
apexClassOrTriggerName: string; | ||
apexClassorTriggerId: string; | ||
apexClassOrTriggerId: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: capitalizing the Or to be consistent |
||
apexTestClassId: string; | ||
apexTestMethodName: string; | ||
numLinesCovered: number; | ||
numLinesUncovered: number; | ||
percentage: string; | ||
coverage?: { coveredLines: number[]; uncoveredLines: number[] }; | ||
}; | ||
|
||
export type ApexCodeCoverageAggregateRecord = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
CLI json result expects Coverage info for each ApexCodeCoverage record