Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Latest commit

 

History

History
115 lines (87 loc) · 2.94 KB

import.rst

File metadata and controls

115 lines (87 loc) · 2.94 KB

Data Import Formats

Note

Imported data should always be UTF-8 encoded.

JSON

JSON is a great way to import more complex sets of cases <test-cases> and suites <test-suites> for your product. One JSON file will be used per product <products> version <product-versions>. Simply use the user interface to create the Product <products> and Version <product-versions> that applies to the cases <test-cases> and suites <test-suites> to be imported. Then just import your JSON file to that product version <product-versions>.

Simple Example:

{
    "suites": [
        {
            "name": "suite name",
            "description": "suite description"
        }
    ],
    "cases": [
        {
            "title": "case title",
            "description": "case description",
            "tags": ["tag1", "tag2", "tag3"],
            "suites": ["suite1 name", "suite2 name", "suite3 name"],
            "created_by": "cdawson@mozilla.com",
            "steps": [
                {
                    "instruction": "instruction text",
                    "expected": "expected text"
                },
                {
                    "instruction": "instruction text",
                    "expected": "expected text"
                }
            ]
        }
    ]
}

Both top-level sections ("suites" and "cases") are optional. However, if either section is included, each item requires a "name" field value. Other than that, all fields are optional.

CSV (future)

When importing from a spreadsheet or wiki set of test cases, this may prove a very useful format. This doesn't handle multiple separate steps in test cases. Rather, it presumes all steps are in a single step when imported to MozTrap.

Bulk Test Case Entry Formats

Gherkin-esque

This is one of the test case formats supported in the bulk test case creator.

Format:

Test that <test title>
<description text>
When <instruction>
Then <expected result>

Example:

Test that I can write a test
This test tests that a user can write a test
When I execute my first step instruction
then the expected result is observed
And when I execute mysecond step instruction
Then the second step expected result is observed

Markdown (future)

This will be another format for the bulk test case creator.

Example:

Test case 1 title here
======================
Description text here

* which can contain bullets
* **with formatting**
   * indentation
   * [and links](www.example.com)

Steps
-----
1. Step 1 action
    * Step 1 Expected Result
2. Step 2 action
    * Step 2 Expected Result

Test case 2 title here
======================
...