You need to sign in to do that
Don't have an account?
SalesforceCrm AccountCRM
Overall Code Coverage is Displaying Constant Value in Production as 74%
Can any one help me out with this ?The overall code coverage is displaying a constant value in production as 74% only, i have written and modiifed 'n' no of test classes and deployed ,but still it displays the constant value.Any suggestion or alternatives where i can get the code coverage increased and can do a deployment successfully.
Run ALL the tests in production, this will calculate the coverage against each class and the overall coverage. Use the deveper console to view all the class running and the class coverage. Look for your classes (ignore any that are part of of a managed package). If you double click on a class in the 'Overall Code Coverage' panel it will show you what lines are covered.
Thanks,
Richard.
Code Coverage Report
https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD
Now you can view the overall and individual entity code coverage in your organization. The results of the code coverage can be downloaded in Excel format
Click on Run All Test and use above app to see each class code coverage in production
How to configure the App.
Please check below link for same
1) http://amitsalesforce.blogspot.com/search/label/App%20Exchange
Let us know if this will help you
1) How many lines are covered for a specific class or trigger:
SELECT NumLinesCovered, NumLinesUncovered FROM ApexCodeCoverage WHERE ApexClassOrTriggerId =
2) Which lines are covered for a specific class or trigger:
SELECT Coverage FROM ApexCodeCoverage WHERE ApexClassOrTriggerId =
3) The current org-wide coverage:
SELECT PercentCovered FROM ApexOrgWideCoverage
To test these queries you may use Workbench (workbench.developerforce.com) as follows: 1) Go to Utilities | REST Explorer 2) Select GET 3) Enter the following URL:
/services/data/v29.0/tooling/query/?q=YOUR_QUERY
where YOUR_QUERY should be the query to execute
4) Click "Show Raw Response".
You can try below steps. Let me know if it works.
1) In the Developer console run this Tooling API query
SELECT Id, ApexClassOrTriggerId, ApexClassOrTrigger.Name, NumLinesCovered, NumLinesUncovered FROM ApexCodeCoverageAggregate
2) Select all results and hit delete
3) Run all tests
4) Check Setup/Apex classes/Code coverage now.
@Richard Jimenez 9 :As Suggested ,im doing it but the code coverage remains constant.
@Chinna1987 :I tried querying in workbench ,but the overall code coverage is displaying when i use the percent query but when i use this queries in workbench by giving the class id or trigger id the system throws an error as :Malformed Query
@@Ravi Dutt Sharma :As Suggested ,i have used the query in the query editior before deleting the results, it displayed the same value .Again i selected and deleted all the result .I reran all the test classes again ,now the code coverage was displaying as 78% , but when i tried to deploy the code it throwed the error as Code Coverage is low.
Any Help very much appreciated.
So you mean to say the current coverage on your production instance is 78% and when you deploy the new code, the coverage goes down? This means that due to the current code which is getting deployed, the coverage is falling below 75%. Can you tell me how much coverage you have in your sandbox from which you are deploying the code?
PFA Screen Shot In Sandbox OverAll Code Coverage :
PFA Screen Shot In Production OverAll Code Coverage :
deploy triggers sololy.Any alternatives.