Visual representation code coverage in VSCodeHow do I get Apex code coverage statistics when using Salesforce DX & Visual Studio CodeApex Code Coverage: Test classes are included with 0% in overall code coverage calculationCode Coverage QueryCode Coverage - SalesForce BugNeed help raising Code Coveragecode coverage none whereas percentage availableCode Coverage Report SchedulerCode Coverage Calculation - Seems to be including code in test methodsHow to fix unneeded Code Coverage?vscode/sfdx doesn't see my projectNo code coverage information was found for test run 7070U00000r8Ny3. Set “salesforcedx-vscode-core.retrieve-test-code-coverage”: true
Single word that parallels "Recent" when discussing the near future
Why did the soldiers of the North disobey Jon?
Could there be a material that inverts the colours seen through it?
A case where Bishop for knight isn't a good trade
complicated arrows in flowcharts
Is it safe to use two single-pole breakers for a 240v circuit?
Can a tourist shoot a gun for recreational purpose in the USA?
"The van's really booking"
Biology of a Firestarter
Polynomial division: Is this trick obvious?
Holding rent money for my friend which amounts to over $10k?
What information exactly does an instruction cache store?
Why doesn't Iron Man's action affect this person in Endgame?
Help understanding this line - usage of くれる
Were any of the books mentioned in this scene from the movie Hackers real?
Is 12 minutes connection in Bristol Temple Meads long enough?
Use of さ as a filler
Is there any way to adjust the damage type of the Eldritch Blast cantrip so that it does fire damage?
Adding labels and comments to a matrix
Source of the Wildfire?
Is Valonqar prophecy unfulfilled?
Offered a new position but unknown about salary?
Mark command as obsolete
How to continually let my readers know what time it is in my story, in an organic way?
Visual representation code coverage in VSCode
How do I get Apex code coverage statistics when using Salesforce DX & Visual Studio CodeApex Code Coverage: Test classes are included with 0% in overall code coverage calculationCode Coverage QueryCode Coverage - SalesForce BugNeed help raising Code Coveragecode coverage none whereas percentage availableCode Coverage Report SchedulerCode Coverage Calculation - Seems to be including code in test methodsHow to fix unneeded Code Coverage?vscode/sfdx doesn't see my projectNo code coverage information was found for test run 7070U00000r8Ny3. Set “salesforcedx-vscode-core.retrieve-test-code-coverage”: true
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
As per answer in this post, in order to get code coverage after running test classes from VSCode, we just need to add "-c" for the sfdx test command as below:
sfdx force:apex:test:run -c -u myOrg -r human
I have added
salesforcedx-vscode-core.retrieve-test-code-coverage": true
to my User Settings to be set as default.
Even though I can get the code coverage in the Output tab, showing the percentage + uncovered lines numbers, I haven't been able to see a visual representation for each class which lines have been hit or not.
This is what we get after running the tests:
ID NAME % COVERED UNCOVERED LINES
────────────────── ─────────────────────────────────── ────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
01p0d000000kCOcAAM TaskManager 75% 66,67,72,74,75,78,79,82,86,87,89,93,97,100,102,105,106,111,114,119,120,123,125,128,129,130,134,135,140,143,144,145,148,193,243,246,248,251,253,257,260,262,265,267,271,274,276,421,461,474,486
Does anybody know is it's possible to get code coverage like we get in Developer Console or like the "coverage-gutters" plugin for VSCode, after running Apex Tests?
Thanks.
apex code-coverage vs-code
add a comment |
As per answer in this post, in order to get code coverage after running test classes from VSCode, we just need to add "-c" for the sfdx test command as below:
sfdx force:apex:test:run -c -u myOrg -r human
I have added
salesforcedx-vscode-core.retrieve-test-code-coverage": true
to my User Settings to be set as default.
Even though I can get the code coverage in the Output tab, showing the percentage + uncovered lines numbers, I haven't been able to see a visual representation for each class which lines have been hit or not.
This is what we get after running the tests:
ID NAME % COVERED UNCOVERED LINES
────────────────── ─────────────────────────────────── ────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
01p0d000000kCOcAAM TaskManager 75% 66,67,72,74,75,78,79,82,86,87,89,93,97,100,102,105,106,111,114,119,120,123,125,128,129,130,134,135,140,143,144,145,148,193,243,246,248,251,253,257,260,262,265,267,271,274,276,421,461,474,486
Does anybody know is it's possible to get code coverage like we get in Developer Console or like the "coverage-gutters" plugin for VSCode, after running Apex Tests?
Thanks.
apex code-coverage vs-code
add a comment |
As per answer in this post, in order to get code coverage after running test classes from VSCode, we just need to add "-c" for the sfdx test command as below:
sfdx force:apex:test:run -c -u myOrg -r human
I have added
salesforcedx-vscode-core.retrieve-test-code-coverage": true
to my User Settings to be set as default.
Even though I can get the code coverage in the Output tab, showing the percentage + uncovered lines numbers, I haven't been able to see a visual representation for each class which lines have been hit or not.
This is what we get after running the tests:
ID NAME % COVERED UNCOVERED LINES
────────────────── ─────────────────────────────────── ────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
01p0d000000kCOcAAM TaskManager 75% 66,67,72,74,75,78,79,82,86,87,89,93,97,100,102,105,106,111,114,119,120,123,125,128,129,130,134,135,140,143,144,145,148,193,243,246,248,251,253,257,260,262,265,267,271,274,276,421,461,474,486
Does anybody know is it's possible to get code coverage like we get in Developer Console or like the "coverage-gutters" plugin for VSCode, after running Apex Tests?
Thanks.
apex code-coverage vs-code
As per answer in this post, in order to get code coverage after running test classes from VSCode, we just need to add "-c" for the sfdx test command as below:
sfdx force:apex:test:run -c -u myOrg -r human
I have added
salesforcedx-vscode-core.retrieve-test-code-coverage": true
to my User Settings to be set as default.
Even though I can get the code coverage in the Output tab, showing the percentage + uncovered lines numbers, I haven't been able to see a visual representation for each class which lines have been hit or not.
This is what we get after running the tests:
ID NAME % COVERED UNCOVERED LINES
────────────────── ─────────────────────────────────── ────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
01p0d000000kCOcAAM TaskManager 75% 66,67,72,74,75,78,79,82,86,87,89,93,97,100,102,105,106,111,114,119,120,123,125,128,129,130,134,135,140,143,144,145,148,193,243,246,248,251,253,257,260,262,265,267,271,274,276,421,461,474,486
Does anybody know is it's possible to get code coverage like we get in Developer Console or like the "coverage-gutters" plugin for VSCode, after running Apex Tests?
Thanks.
apex code-coverage vs-code
apex code-coverage vs-code
edited May 9 at 14:48
David Reed♦
42k82463
42k82463
asked May 9 at 14:47
RodrigoRodrigo
1178
1178
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
In VS Code in your DX project, try clicking the three horizontal lines icon in the bottom status bar. If you have all the configurations setup correctly (which from your post, it looks like you do), clicking it from to should work
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f261788%2fvisual-representation-code-coverage-in-vscode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In VS Code in your DX project, try clicking the three horizontal lines icon in the bottom status bar. If you have all the configurations setup correctly (which from your post, it looks like you do), clicking it from to should work
add a comment |
In VS Code in your DX project, try clicking the three horizontal lines icon in the bottom status bar. If you have all the configurations setup correctly (which from your post, it looks like you do), clicking it from to should work
add a comment |
In VS Code in your DX project, try clicking the three horizontal lines icon in the bottom status bar. If you have all the configurations setup correctly (which from your post, it looks like you do), clicking it from to should work
In VS Code in your DX project, try clicking the three horizontal lines icon in the bottom status bar. If you have all the configurations setup correctly (which from your post, it looks like you do), clicking it from to should work
answered May 9 at 16:25
Brian MillerBrian Miller
1,112421
1,112421
add a comment |
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f261788%2fvisual-representation-code-coverage-in-vscode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown