Topic
- Use SalesforceXytoolsForSublime To write a test class.
- Auto Create test class.
- Soql to apex code.
Environment
- Make sure you can login your sfdc. Test it : SFDC-XY > Login SFDC
Write a test class
Auto Create TestCode
Tips: It just create the code in the localhost. It will not deploy to your sfdc server.
Open the apex code, Right click.
sample code:
|
|
Right click, SFDC-XY Code Creator >Create test code
It will be create a test class like this:
|
|
Insert test data from Soql
Insert Test Data(From SOQL)
Input a soql query string.
|
|
Right click, SFDC-XY Code Creator > Insert Test Data(From Soql)
The sql will be change to apex code like below.
|
|
Insert random test data
Right click, SFDC-XY Code Creator > Insert Test Data(All Field)
or
SFDC-XY Code Creator > Insert Test Data(Needed Field)
Select your sobject, It will create code like below.
|
|