Create test case

Test case contains test steps and can be run as single case or as set.

Case details

To define the test yaml type as test case it is mandatory to set case constant value to test parameter.
Example: test: case

To access case you need to set case name.
Example: name: <test name>

You also can set case description which will be displayed at test report. This parameter is optional.
Example: description: <test case description>

Cloud settings

All cloud settings are optional and set to true by default.

To manage whether that case need to be saved to cloud you can use save parameter.
Example: save: false

To manage whether that case need to be overwritten in the cloud apimation team offer overwrite parameter.
Example: overwrite: true


You can define standard or JavaScript variables. To define JavaScript variable you need to set its value to executable JavaScript file. Variables defined in test case is reachable in test case steps.
Example of standard variable definition:

    $foo: "bar"

Example of JavaScript variable definition:

    $foo: <path to JavaScript file>

There are two options to create test case:

  1. Generate test case using Apimation CLI client by execute following command:

    apimation generate case <case name> -f <feature name>

    You also can generate test case with defined type using flag -t or --type:

    apimation generate case <case name> -t <type name> -f <feature name>

    Available test case types: functional, simulationLoad, constantLoad and incrementLoad.

  2. Create new YAML test case manually: Create <case name>.yaml file in cases folder with following content:

    test: case
    name: <case name>
    description: GET available books 
       $bookTitle: Don Quixote 
    defaultCollection: Feature1
    - name: getBooks

Please see full description of test case creation here

results matching ""

    No results matching ""