MozTrap Tutorial, part 2

In this section, we discuss creating test cases and organizing them into suites.

Create test Suites

Test Suites are collections of test cases. A test case can belong to more than one suite, if need be.

Let’s write some tests to cover two areas of the SpeckDetector. It should detect specks of sand and specks of pollen. And you should also be able to update your SpeckDetector’s firmware.

Steps

  1. Navigate to manage | suites.

  2. Click create a test suite.

  3. Set your product to SpeckDetector.

  4. Set name to Specks.

  5. Enter a description that includes Markdown syntax:

    PRECONDITIONS
    =============
    * Must have some specks
    
    LINKS
    =====
    * [Specks of Life](http://example.com/)
  6. You won’t have any available cases yet, so skip that and just click save suite.

  7. Repeat these steps for a suite but name it Firmware.

Create test Cases

Now we need to create some test cases for those suites.

Steps

  1. Navigate to manage | cases.

  2. Click create a test case.

  3. Set your product to SpeckDetector.

  4. Set version to 1.0.

  5. Set suite to Specks.

  6. ID Prefix is optional, skip it for now.

  7. Set name to Detect a pollen speck.

  8. For instruction 1, enter:

    hold detector held away from pollen
  9. For expected 1, enter:

    no detection lights
  10. Tab to instruction 2, enter:

    hold detector above a pollen speck
  11. Tab to expected 2, enter:

    detector lights up word "pollen"
  12. Click save test case.

That’s one down. Whew! OK, now create another test case for the firmware suite with steps like this:

  1. Name: update firmware.

  2. For instruction 1, enter:

    navigate to firmware update screen and select "update"
  3. For expected 1, enter:

    see "a firmware update is available"
  4. Tab to instruction 2, enter:

    click "apply update"
  5. Tab to expected 2, enter:

    firmware value should say the new version

Great! You’re done with your cases!