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
BingBing 

Use "Apex Test Case Reocrder" (like a Macro) to create Apex Test Class

Last week, I worked with an experienced Salesforce consultant to create our first Apex Trigger for assinging a default lookup value in Quote. The trigger itself contains only 3 lines and takes 1 minute to write.  However we spent nearly 4 hours to write testing case. The reason is that the test script involves steps to create  master data (e.g. Account, Product, Contact), which frequnently throw errors due to associated  validation rules, workflow field updates and rollup fieds

 

If we enter all testing steps manually (including setting up master data), it would take max. 20 minutes.

 

So I am just wondering is there anything like a Macro to record manual testing steps and convert it Apex Test Class .  The admin then just needs to make minor modification to the recorded testing script. 

 

If we have such "Apex Test Case Reocrder" , it will dramatically reduce the effort to develop Apex trigger

 

Bing Maletz