Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add cleanup guideline for test cases

...

  • Every test should happen within a CloudStack user account. The order in which you choose the type of account to test within should be
    User > DomainAdmin > Admin
    At the end of the test we delete this account so as to keep tests atomic and contained within a tenant's users space.
  • Every test case should clean up it's resource ASAP, after it's no longer in use.
    • Any resources allocated in setUp() for each test case must be released in tearDown(). Suggest using the variable "self.cleanup" to track the test case resources.
    • Any resources allocated in setUpClass() for whole test class must be released in tearDownClass(). Suggest using the variable "cls._cleanup" to track the class resources.
    • Any resources allocated (excepted in setUpClass()) must be added to the cleanup list then released in tearDown().
  • All tests must be written with the perspective of the API. UI directions are often confusing and using the rich API often reveals further test scenarios. You can capture the API arguments using cloudmonkey/firebug.

...