Apex test

The start of the Apex unit tests

  • The Apex unit tests, increases the quality of Apex code, you can meet the release requirements of Apex.
  • Apex code can only be described in the Sandbox environment or developer organization, it can not be described in production organization.
  • It can be confirmed that the Apex classes and triggers to function as expected
  • At least 75% of the Apex code is covered by tests

 

Of creating and running test suite

  • The test suite is a collection of Apex test class to run together.
  • In the Developer Console, [Test (Test)] |  select the [New Suite (New Suite)]

 

Tell Me More

  • You can save the Apex code of up to 6 MB for each organization.@isTest Test class an annotation is added, does not count in this limit.
  • In the test method mail is not sent.
  • In the test method, you can not run a call out to an external service.

 

Guess you like

Origin www.cnblogs.com/dlywang0411/p/11542084.html