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
Book_GuyBook_Guy 

Apex Test

Hi All,

 

New at Apex and not making an important connection.

 

I'm writing a Unit Test for an Apex Trigger.  Using Eclipse how do you connect an Apex Unit Test Class with the Apex Trigger. See the Apex Test Runner tab in Eclipse (under my Apex Triger) but not how to get my Apex Test Class listed in this tab.

 

Thank you.

 

David

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
WesNolte__cWesNolte__c

Hey

 

Yeah it's not very clear, but you don't need to associate the two.. when you run the test class, it will display stats for any classes/triggers that it uses as a consequence of it being run.

 

The bigger picture is, when you deploy code to a live environment it runs all unit tests in the environment (and any being added) automatically. It then uses the "knowledge of the code" vs "the knowledge of which code was run by unit tests" to calculate how much has been tested and where. Make sense?

 

Wes 

All Answers

WesNolte__cWesNolte__c

Hey

 

Yeah it's not very clear, but you don't need to associate the two.. when you run the test class, it will display stats for any classes/triggers that it uses as a consequence of it being run.

 

The bigger picture is, when you deploy code to a live environment it runs all unit tests in the environment (and any being added) automatically. It then uses the "knowledge of the code" vs "the knowledge of which code was run by unit tests" to calculate how much has been tested and where. Make sense?

 

Wes 

This was selected as the best answer
Book_GuyBook_Guy

Perfect.  

 

Thank you!

 

David