function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Daniel BleasdaleDaniel Bleasdale 

How To Test The Coverage ?

I am receiving the green tick but gaining 0% cover what must I include to begin gauging the code coverage?

Controller -
User-added image
Test Class-

User-added image

Thankyou Dan
Best Answer chosen by Daniel Bleasdale
Steven NsubugaSteven Nsubuga
Add these lines below the last insert statement. 
PrintableView pv = new PrintableView();
pv.init();
pv.save();

 

All Answers

Steven NsubugaSteven Nsubuga
Add these lines below the last insert statement. 
PrintableView pv = new PrintableView();
pv.init();
pv.save();

 
This was selected as the best answer
Daniel BleasdaleDaniel Bleasdale
Thank you again Steven
Steven NsubugaSteven Nsubuga
My pleasure Dan!