Test Cases and Suites API¶
For additional information, please consult https://moztrap.readthedocs.org/en/latest/userguide/model/library.html
Case¶
- GET /api/v1/case¶
Filtering¶
product: The Product id to filter on. product__name: The Product name to filter on. suite: The Suite id to filter on. suite__name: The Suite name to filter on.
- GET /api/v1/case/<id>¶
Note
Suites are displayed in the GET results, for informational purposes, but may not be changed.
- POST /api/v1/case¶
Required Fields¶
product: A resource uri to a Product.
Optional Fields¶
idprefix: A string that will be displayed as part of the case ID.
- DELETE /api/v1/case/<id>¶
- PUT /api/v1/case/<id>¶
Note
The product of an existing case may not be changed.
Filtering¶
productversion: The ProductVersion id to filter on. productversion__version: The ProductVersion name to filter on. For example, if the Product and Version are Firefox 10 then the productversion__version would be 10. productversion__product__name: The Product name to filter on. case__suites: The Suite id to filter on. case__suites__name: The Suite name to filter on. tags__name: The tag name to filter on. Example request:
GET /api/v1/caseversion/?format=json&productversion__version=10&case__suites__name=Sweet%20Suite GET /api/v1/caseversion/?format=json&productversion__product__name=Firefox
- GET /api/v1/caseversion/<id>¶
Note
Environments, Tags, Suites and CaseSteps are displayed in the GET results for informational purposes, but may not be changed.
- POST /api/v1/caseversion¶
Required Fields¶
case: A resource uri to the parent Case productversion: A resource uri to a ProductVersion
Optional Fields¶
name: A string name description: A string description status: active, draft, or disabled
Note
The parent Case’s Product must match the ProductVersion’s Product.
- DELETE /api/v1/caseversion/<id>¶
- PUT /api/v1/caseversion/<id>¶
Note
The productversion and case fields are not required, and may not be changed.
Filtering¶
caseversion: The id of the parent caseversion caseversion__name: The name of the parent caseversion
- POST /api/v1/casestep¶
Required Fields¶
caseversion: A resource uri to a CaseVersion instruction: A string describing what actions to take number: An integer used to order steps
Optional Fields¶
expected: The expected result following the instruction
- DELETE /api/v1/casestep/<id>¶
- PUT /api/v1/casestep/<id>¶
Note
The CaseVersion of an existing CaseStep may not be changed.
Filtering¶
name: The name of the suite product: The id of the product for this suite product__name: The name of the product Example request:
GET /api/v1/suite/?format=json
- POST /api/v1/suite¶
Required Fields¶
product: A resource uri to a Product
Optional Fields¶
name: A string name description: A string description status: active, draft, or disabled
- DELETE /api/v1/suite/<id>¶
- PUT /api/v1/suite/<id>¶
Note
The Product of an existing Suite may not be changed.
Required Fields¶
case: A resource uri to a case suite: A resource uri to a suite order: An integer used to sort the cases within the suite.
Note
The Case’s Product must match the Suite’s Product.
- DELETE /api/v1/suitecase/<id>¶
- PUT /api/v1/suitecase/<id>¶
Note
Only the order may be changed for an existing SuiteCase.