From the course: Introduction to Test Classes in Salesforce

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Test data creation and validation

Test data creation and validation - Salesforce Tutorial

From the course: Introduction to Test Classes in Salesforce

Start my 1-month free trial

Test data creation and validation

- [Speaker] As a developer that's been working on the Salesforce platform of a number of years, one of the questions I typically get asked is why do I use Eclipse, and in particular, why not use one of the other tools that has better user interface, maybe a little bit easier to use? One of the key reasons I use Eclipse is I can use it on any org anywhere and it's a free tool that's provided by Salesforce. In Eclipse, when I create a basic test class, this basic test class is going to come up and look exactly what we're seeing on screen. It has several lines of comments about this being a test class, I personally usually remove those. The important piece here is the @isTest. Any class that starts with @isTest is not going to count against our total number of lines of code. Remember, when Salesforce calculates your code coverage, they take the total number of lines covered by the total number of lines in the org. We don't want our test classes to be counted in the total number of lines.…

Contents