There's more...

The test suite provides the following additional test utility classes:

  • SingleTransactionCase: Test cases generated through this class will run all cases into a single transaction, so changes made from one test case will be available in the second test case. In this, the transaction is begun with the first test method and it is only rolled back at the end of the last test case.
  • SavepointCase: This is the same as SingleTransactionCase, but in this case, test methods run inside a rolled-back savepoint, instead of having all test methods in a single transaction. This is used for creating large test cases to make them faster by generating test data only once. Here, we use the setUpClass() method to generate the initial test data.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset