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

Apex Test || Display List of Uncovered Components (sfdx force:apex:test:run) #87

Open
gitmevg opened this issue Apr 6, 2023 · 1 comment

Comments

@gitmevg
Copy link

gitmevg commented Apr 6, 2023

Hello,

While trying the 'Run Apex Test on Salesforce Org', we encountered below stats, will be great if we can display somewhere "Uncovered Components/Entities" (not covered by Apex Tests):

$ sfdx hardis:org:test:apex --websocket localhost:2749
[sfdx-hardis][command] sfdx force:org:display --json
[sfdx-hardis] You are already connected as [email protected] on org https://xyz.my.salesforce.com
[sfdx-hardis] If this is NOT the org you want to play with, hit CTRL+C, then input sfdx hardis:org:select
✔ [sfdx-hardis][command] sfdx force:apex:test:run --codecoverage --resultformat human --outputdir D:\projects\vscode\checkhardisplugin\hardis-report --wait 60 --testlevel RunLocalTests
[sfdx-hardis] Test result files written to D:\projects\vscode\checkhardisplugin\hardis-report
=== Test Summary
NAME VALUE
─────────────────── ───────────────────
Outcome Passed
Tests Ran 5
Pass Rate 100%
Fail Rate 0%
Skip Rate 0%
Test Run Id 7077F0000D3XXXX
Test Execution Time 8439 ms
Org Id 00D7F000005lNL9XXX
Username [email protected]
Org Wide Coverage 68%

=== Test Results
TEST NAME OUTCOME MESSAGE RUNTIME (MS)
────────────────────────────────────────────────────────────── ─────── ─────── ────────────
OpportunityAlertController_test.testOpportunityAlertController Pass 43
ContactsTodayController_test.TestContactsTodayController Pass 896
TestLightningConnectQuickstart.tester Pass 2112
TH_AssignmentsTest.TestTH_Assignments Pass 3550
TH_AssignmentsTest.Test_TH_Report_to_TEs Pass 1838

=== Apex Code Coverage by Class
CLASSES PERCENT UNCOVERED LINES
────────────────────────── ─────── ──────────────────
LightningConnectQuickstart 100%
TH_Report_to_TEs 97% 59
TH_Assignments 90% 30,31,32,33,109...
TH_Recommendations 81% 32,33,34
ContactsTodayController 76% 30,36,38,39,48...
OpportunityAlertController 87% 15,16

[sfdx-hardis] Successfully run apex tests on org
ERROR running hardis:org:test:apex: [sfdx-hardis][apextest] Test run coverage (org wide) 68% should be > to 75%
[sfdx-hardis] hardis:org:test:apex execution time 0:02:49.164

@gitmevg gitmevg changed the title Display List of Uncovered Components Apex Test || Display List of Uncovered Components (sfdx force:apex:test:run) Apr 6, 2023
@nvuillam
Copy link
Member

nvuillam commented Apr 6, 2023

@gitmevg thanks for your request :)

Is such info provided by the standard sfdx:force:apex:test:run output ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants