You need to sign in to do that
Don't have an account?
Felicia Abramson - Bit9
How to write Apex Test Class as System Admin
What would be a good resource ot help me write some test classes? I am a certified system administrator with no history of coding. The issue we have is we have alot of code written by a former employee with either no coverage or not 100% coverage, and somehow we got an overall coverage in production of 72% -- not sure how that happened.
Four classes have four lines each, with no coverage, (if we are able to bump those up to 100% we get to 75% coverage overall), so I think those are going to be my best bets for writing test classes, but like I said, not sure where to start with that.
Any help would be great. Thanks in advance!
Any help would be appreciated. Thanks!
Four classes have four lines each, with no coverage, (if we are able to bump those up to 100% we get to 75% coverage overall), so I think those are going to be my best bets for writing test classes, but like I said, not sure where to start with that.
Any help would be great. Thanks in advance!
Any help would be appreciated. Thanks!
Please follow he Link to start with Test Class https://developer.salesforce.com/page/An_Introduction_to_Apex_Code_Test_Methods
Also you can post your Class here to get some help
Thanks
BLearn
What I am also wondering though, are what are good methods to figure out what needs to be tested, if you aren't the one who wrote the original code?
Lets say an Apex Trigger in there on the Account,
In your test class, you can just insert Accounts, so it will automatically covers the code
I suggest you to open the developer console
and Run all tests (Tests > RunALL)
Check over all code coverage after completion of tests (click tests tab below)
browse through them and find which class is covered very low
find the test class of it and modify it and run
Check the code coverage using Developer console
Thanks
Close this thread after receiving help, by choosing Best Answer
https://s3.amazonaws.com/dfc-wiki/en/images/4/41/Apex_code_testing_webinar.pdf
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_best_practices.htm
Thank you
BLearn