Test Cases

This chapter focuses on services for the test cases.

Updates from version 1.2.0:

  • There are 3 types of test case: standard, scripted and keyword.

  • The "kind" property is no longer available in test case. The test case type is, instead, specified/defined by "_type" property.

  • The "script" property is from now available only for scripted test case.

  • There is no longer "language" property in test case. The language for scripted test case is always GHERKIN while there is no defined language for standard and keyword test cases.

Get all test cases

A GET to /test-cases returns all the test-cases that the user is allowed to read.

Type ('all', 'standard', 'scripted' or 'keyword') can be added as filter parameter to return the test cases with specific type.

HTTP request

GET /api/rest/latest/test-cases?page=1&size=2&fields=name,reference,script HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

type

which type of the element should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1640

{
  "_embedded" : {
    "test-cases" : [ {
      "_type" : "test-case",
      "id" : 1,
      "name" : "sample standard test case",
      "reference" : "TC1",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/1"
        }
      }
    }, {
      "_type" : "scripted-test-case",
      "id" : 2,
      "name" : "sample script test case",
      "reference" : "TC2",
      "script" : "This is a new Gherkin test",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/2"
        }
      }
    }, {
      "_type" : "keyword-test-case",
      "id" : 3,
      "name" : "sample keyword test case",
      "reference" : "TC3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/3"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=1&size=2"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=2&size=2"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases?fields=name,reference,script&page=2&size=2"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 5,
    "totalPages" : 3,
    "number" : 1
  }
}

Response fields

Path Type Description

_embedded.test-cases

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Get test case

A GET to /test-cases/{id} returns the test case with the given id.

Path parameters

Table 1. /api/rest/latest/test-cases/{id}
Parameter Description

id

the id of the test case

HTTP request

GET /api/rest/latest/test-cases/238 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6177

{
  "_type" : "test-case",
  "id" : 238,
  "name" : "walking test",
  "reference" : "TC1",
  "project" : {
    "_type" : "project",
    "id" : 14,
    "name" : "sample project",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/14"
      }
    }
  },
  "path" : "/sample project/sample folder/walking test",
  "parent" : {
    "_type" : "test-case-folder",
    "id" : 237,
    "name" : "sample folder",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-case-folders/237"
      }
    }
  },
  "created_by" : "User-1",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "User-1",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_USER_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "<p>You must have legs with feet attached to them (one per leg)</p>\n",
  "description" : "<p>check that you can walk through the API (literally)</p>\n",
  "automated_test" : {
    "_type" : "automated-test",
    "id" : 2,
    "name" : "script_custom_field_params_all.ta",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/automated-tests/2"
      }
    }
  },
  "automated_test_technology" : "Cucumber",
  "scm_repository_url" : "https://github.com/test/repo01 (master)",
  "scm_repository_id" : 2,
  "automated_test_reference" : "repo01/src/resources/script_custom_field_params_all.ta#Test_case_238",
  "uuid" : "2f7194ca-eb2e-4378-a82d-ddc207c866bd",
  "automatable" : "Y",
  "automation_status" : "WORK_IN_PROGRESS",
  "automation_priority" : 42,
  "custom_fields" : [ {
    "code" : "CF_TXT",
    "label" : "test level",
    "value" : "mandatory"
  }, {
    "code" : "CF_TAGS",
    "label" : "see also",
    "value" : [ "walking", "bipedal" ]
  } ],
  "steps" : [ {
    "_type" : "action-step",
    "id" : 165,
    "action" : "<p>move ${first_foot} forward</p>\n",
    "expected_result" : "<p>I just advanced by one step</p>\n",
    "index" : 0,
    "custom_fields" : [ {
      "code" : "CF_TXT",
      "label" : "test level",
      "value" : "mandatory"
    }, {
      "code" : "CF_TAGS",
      "label" : "see also",
      "value" : [ "basic", "walking" ]
    } ],
    "verified_requirements" : [ ],
    "attachments" : [ ],
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-steps/165"
      }
    }
  }, {
    "_type" : "action-step",
    "id" : 166,
    "action" : "<p>move ${second_foot}&nbsp;forward</p>\n",
    "expected_result" : "<p>and another step !</p>\n",
    "index" : 1,
    "custom_fields" : [ {
      "code" : "CF_TXT",
      "label" : "test level",
      "value" : "mandatory"
    }, {
      "code" : "CF_TAGS",
      "label" : "see also",
      "value" : [ "basic", "walking" ]
    } ],
    "verified_requirements" : [ ],
    "attachments" : [ ],
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-steps/166"
      }
    }
  }, {
    "_type" : "call-step",
    "id" : 167,
    "delegate_parameter_values" : false,
    "called_test_case" : {
      "_type" : "test-case",
      "id" : 239,
      "name" : "victory dance",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/239"
        }
      }
    },
    "called_dataset" : null,
    "index" : 2,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-steps/167"
      }
    }
  }, {
    "_type" : "call-step",
    "id" : 168,
    "delegate_parameter_values" : false,
    "called_test_case" : {
      "_type" : "unauthorized-resource",
      "resource_type" : "test-case",
      "resource_id" : 240,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
        }
      }
    },
    "called_dataset" : null,
    "index" : 3,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-steps/168"
      }
    }
  } ],
  "parameters" : [ {
    "_type" : "parameter",
    "id" : 1,
    "name" : "first_foot",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/parameters/1"
      }
    }
  }, {
    "_type" : "parameter",
    "id" : 2,
    "name" : "second_foot",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/parameters/2"
      }
    }
  } ],
  "datasets" : [ {
    "_type" : "dataset",
    "id" : 1,
    "name" : "right handed people",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/datasets/1"
      }
    }
  }, {
    "_type" : "dataset",
    "id" : 2,
    "name" : "left handed people",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/datasets/2"
      }
    }
  } ],
  "verified_requirements" : [ {
    "_type" : "requirement-version",
    "id" : 255,
    "name" : "Must have legs",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/255"
      }
    }
  }, {
    "_type" : "unauthorized-resource",
    "resource_type" : "requirement-version",
    "resource_id" : 256,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/256"
      }
    }
  } ],
  "script_auto" : "/ta-tests/script_custom_field_params_all.ta",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238/attachments"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the entity

_type

String

the type of the entity

name

String

name of the test case

project

Object

project of the test case

parent

Object

the location of the test case (either a folder or the project if located at the root of the library)

path

String

the path of the test case

created_by

String

user that created the test case

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the test case the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

reference

String

a shorter identifier for that test case

importance

String

code of the importance

status

String

code of the status

nature.code

String

code of the nature

type.code

String

code of the type of test case

description

String

description of the test case (html)

prerequisite

String

prerequisites that should be met before the execution of the test script (html)

automated_test

Object

automated test of the test case (optional)

script_auto

String

automation script of the test case

automated_test_technology

String

automated test technology of the test case

scm_repository_url

String

scm repository url of the test case

scm_repository_id

Number

scm repository id of the test case

automated_test_reference

String

automated test reference of the test case

uuid

String

uuid of the test case

automatable

String

the eligibility for automation of the test case, one of "Y" (Yes), "N" (No) or "M" (Maybe).

automation_priority

Number

the automation priority of the test case

automation_status

String

the automation status of the test case

custom_fields

Array

array of custom fields

custom_fields[].code

String

code of the custom field

custom_fields[].label

String

label of the custom field

custom_fields[].value

Varies

the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list)

steps

Array

the step list that constitute the script. Please refer to the test steps documentation.

parameters

Array

the list of parameters. Please refer to the parameters documentation.

datasets

Array

the list of datasets. Please refer to the datasets documentation.

verified_requirements

Array

the list of verified requirements. Please refer to the requirements documentation.

attachments

Array

the list of attachments.

_links

Object

related links

Relation Description

self

link to this test case

project

link to its project

steps

link to the test script

parameters

link to the parameters

datasets

link to the datasets

attachments

link to the attachments

Create test case

A POST to /test-cases creates a new test case. By default the created test case will be of "standard" type, to create a "scripted" or a "keyword" test case, you need to specify additional property in your payload : "_type": "scripted-test-case" or "keyword-test-case".

  • Create a standard test case

HTTP request

POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 129
Host: localhost:8080

{
  "_type" : "test-case",
  "name" : "Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15
  }
}

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1961

{
  "_type" : "test-case",
  "id" : 240,
  "name" : "Christmas turkey test flight",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "f0437bc4-5a10-4706-a709-2c7d407c7a34",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}
  • Create a scripted test case

HTTP request

POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 177
Host: localhost:8080

{
  "_type" : "scripted-test-case",
  "name" : "Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15
  },
  "script" : "this is Gherkin script"
}

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2009

{
  "_type" : "scripted-test-case",
  "id" : 240,
  "name" : "Christmas turkey test flight",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2020-04-02T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-02T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "86959fd6-330d-4ae7-8930-9c6a7ada6555",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "script" : "this is Gherkin script",
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}
  • Create a keyword test case

HTTP request

POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 154
Host: localhost:8080

{
  "_type" : "keyword-test-case",
  "name" : "Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15
  },
  "steps" : [ ]
}

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1969

{
  "_type" : "keyword-test-case",
  "id" : 240,
  "name" : "Christmas turkey test flight",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2020-04-03T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-03T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "30fa84f0-f743-48e3-96a0-64fdd4b21e50",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}
  • Create a test case with automation attributes

HTTP request

POST /api/rest/latest/test-cases HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 250
Host: localhost:8080

{
  "_type" : "keyword-test-case",
  "name" : "Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15
  },
  "automated_test_technology" : "Robot Framework",
  "scm_repository_id" : 6,
  "automated_test_reference" : ""
}

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2014

{
  "_type" : "keyword-test-case",
  "id" : 240,
  "name" : "Christmas turkey test flight",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test flight",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2020-04-03T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-03T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : "Robot Framework",
  "scm_repository_url" : "https://github.com/test/repo01 (master)",
  "scm_repository_id" : 6,
  "automated_test_reference" : "",
  "uuid" : "5c0b0c35-30f2-4707-b264-db4a37c12f4f",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}

Modify test case

A PATCH to /test-cases/{id} modifies the test case with the given id.

  • Modify a standard test case

HTTP request

PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 70
Host: localhost:8080

{
  "_type" : "test-case",
  "name" : "Christmas turkey test launch"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1961

{
  "_type" : "test-case",
  "id" : 240,
  "name" : "Christmas turkey test launch",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test launch",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "d480e8fe-7d92-484d-9ded-aff57ce00fac",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}
  • Modify a scripted test case

HTTP request

PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 117
Host: localhost:8080

{
  "_type" : "scripted-test-case",
  "name" : "Christmas turkey test launch",
  "script" : "this is Christmas Eve"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2008

{
  "_type" : "scripted-test-case",
  "id" : 240,
  "name" : "Christmas turkey test launch",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test launch",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2020-04-02T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-02T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "b181406c-ba10-4a31-9ec9-bbdfd097781d",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "script" : "this is Christmas Eve",
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}
  • Modify a keyword test case

HTTP request

PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 78
Host: localhost:8080

{
  "_type" : "keyword-test-case",
  "name" : "Christmas turkey test launch"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1969

{
  "_type" : "keyword-test-case",
  "id" : 240,
  "name" : "Christmas turkey test launch",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test launch",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2020-04-03T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-03T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "bb7b5b00-0db1-4d39-ad35-d30f282df5ce",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}
  • Modify a test case with automation attributes

HTTP request

PATCH /api/rest/latest/test-cases/240 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 262
Host: localhost:8080

{
  "_type" : "scripted-test-case",
  "name" : "Christmas turkey test launch",
  "script" : "this is Christmas Eve",
  "automated_test_technology" : "Cucumber 4",
  "scm_repository_id" : 6,
  "automated_test_reference" : "",
  "automation_status" : "AUTOMATED"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2048

{
  "_type" : "scripted-test-case",
  "id" : 240,
  "name" : "Christmas turkey test launch",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "path" : "/Christmas Eve/Christmas turkey test launch",
  "parent" : {
    "_type" : "project",
    "id" : 15,
    "name" : "Christmas Eve",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2020-04-02T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2020-04-02T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : "Cucumber 4",
  "scm_repository_url" : "https://github.com/test/repo01 (master)",
  "scm_repository_id" : 6,
  "automated_test_reference" : "",
  "uuid" : "ed81755f-c2f9-4c4e-9ded-dce91d5001a3",
  "custom_fields" : [ ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "script" : "this is Christmas Eve",
  "verified_requirements" : [ ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}

Get datasets of test case

A GET to /test-cases/{id}/datasets returns all the datasets of the test case with the given id.

Path parameters

Table 1. /api/rest/latest/test-cases/{id}/datasets
Parameter Description

id

the id of the test case

HTTP request

GET /api/rest/latest/test-cases/238/datasets HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1804

{
  "_embedded" : {
    "datasets" : [ {
      "_type" : "dataset",
      "id" : 1,
      "name" : "big_cake",
      "parameters" : [ {
        "_type" : "parameter",
        "id" : 1,
        "name" : "cocoa_purity"
      }, {
        "_type" : "parameter",
        "id" : 2,
        "name" : "number_of_layers"
      } ],
      "parameter_values" : [ {
        "parameter_test_case_id" : 238,
        "parameter_value" : "98%",
        "parameter_name" : "cocoa_purity",
        "parameter_id" : 1
      }, {
        "parameter_test_case_id" : 238,
        "parameter_value" : "4",
        "parameter_name" : "number_of_layers",
        "parameter_id" : 2
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/datasets/1"
        }
      }
    }, {
      "_type" : "dataset",
      "id" : 2,
      "name" : "biscuit",
      "parameters" : [ {
        "_type" : "parameter",
        "id" : 1,
        "name" : "cocoa_purity"
      }, {
        "_type" : "parameter",
        "id" : 2,
        "name" : "number_of_layers"
      } ],
      "parameter_values" : [ {
        "parameter_test_case_id" : 238,
        "parameter_value" : "80%",
        "parameter_name" : "cocoa_purity",
        "parameter_id" : 1
      }, {
        "parameter_test_case_id" : 238,
        "parameter_value" : "1",
        "parameter_name" : "number_of_layers",
        "parameter_id" : 2
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/datasets/2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238/datasets?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.datasets

Array

the datasets of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Get parameters of test case

A GET to /test-cases/{id}/parameters returns all the parameters of the test case with the given id.

Path parameters

Table 1. /api/rest/latest/test-cases/{id}/parameters
Parameter Description

id

the id of the test case

HTTP request

GET /api/rest/latest/test-cases/238/parameters HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1396

{
  "_embedded" : {
    "parameters" : [ {
      "_type" : "parameter",
      "id" : 1,
      "name" : "cocoa_purity",
      "description" : "<p>how refined the cocoa cream should be</p>",
      "test_case" : {
        "_type" : "keyword-test-case",
        "id" : 238,
        "name" : "Chocolate cake",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/test-cases/238"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/parameters/1"
        }
      }
    }, {
      "_type" : "parameter",
      "id" : 2,
      "name" : "number_of_layers",
      "description" : "<p>how many times should the base pattern be repeated</p>",
      "test_case" : {
        "_type" : "keyword-test-case",
        "id" : 238,
        "name" : "Chocolate cake",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/test-cases/238"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/parameters/2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/238/parameters?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.parameters

Array

the parameters of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Get steps of test case

A GET to /test-cases/{id}/steps returns all the steps of the test case with the given id.

  • In case of a standard test case :

Path parameters

Table 1. /api/rest/latest/test-cases/{id}/steps
Parameter Description

id

the id of the test case

HTTP request

GET /api/rest/latest/test-cases/239/steps HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2510

{
  "_embedded" : {
    "steps" : [ {
      "_type" : "action-step",
      "id" : 167,
      "action" : "<p>Quick step forward</p>\n",
      "expected_result" : "<p>So does your opponent</p>\n",
      "index" : 0,
      "custom_fields" : [ {
        "code" : "CHK_BODY_FEINT",
        "label" : "requires body feint",
        "value" : "false"
      } ],
      "verified_requirements" : [ ],
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/167"
        }
      }
    }, {
      "_type" : "action-step",
      "id" : 168,
      "action" : "<p>Another quick step forward, albeit smaller</p>\n",
      "expected_result" : "<p>Opponent&nbsp;doubles his steps too then lunges forward for an attack</p>\n",
      "index" : 1,
      "custom_fields" : [ {
        "code" : "CHK_BODY_FEINT",
        "label" : "requires body feint",
        "value" : "true"
      } ],
      "verified_requirements" : [ ],
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/168"
        }
      }
    }, {
      "_type" : "action-step",
      "id" : 169,
      "action" : "<p>Strong Quarte parry, possibly with a slight retreat.</p>\n",
      "expected_result" : "<p>Opponent&#39;s attack gets blocked by your blade.</p>\n",
      "index" : 2,
      "custom_fields" : [ {
        "code" : "CHK_BODY_FEINT",
        "label" : "requires body feint",
        "value" : "false"
      } ],
      "verified_requirements" : [ ],
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/169"
        }
      }
    }, {
      "_type" : "call-step",
      "id" : 170,
      "delegate_parameter_values" : true,
      "called_test_case" : {
        "_type" : "test-case",
        "id" : 240,
        "name" : "Compound riposte",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
          }
        }
      },
      "called_dataset" : null,
      "index" : 3,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/170"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/239/steps?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 4,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.steps

Array

the steps of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

  • In case of a keyword test case :

Path parameters

Table 1. /api/rest/latest/test-cases/{id}/steps
Parameter Description

id

the id of the test case

HTTP request

GET /api/rest/latest/test-cases/2/steps HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1332

{
  "_embedded" : {
    "steps" : [ {
      "_type" : "keyword-step",
      "id" : 180,
      "keyword" : "GIVEN",
      "action" : "first \"good\" action word",
      "datatable" : "",
      "docstring" : "",
      "comment" : "",
      "index" : 0,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/180"
        }
      }
    }, {
      "_type" : "keyword-step",
      "id" : 181,
      "keyword" : "WHEN",
      "action" : "second action with \"5\" words",
      "datatable" : "",
      "docstring" : "",
      "comment" : "",
      "index" : 1,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/181"
        }
      }
    }, {
      "_type" : "keyword-step",
      "id" : 182,
      "keyword" : "THEN",
      "action" : "third action <attribute> word",
      "datatable" : "",
      "docstring" : "",
      "comment" : "",
      "index" : 2,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-steps/182"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/2/steps?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.steps

Array

the steps of this test case

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Delete test case

A DELETE to /test-cases/{ids} deletes one or several test cases/folders with the given id(s).

When a lot of test case should be deleted, the system will determine which of them are really deletable according to the business rules. Once this sorting is done only the deletable items will actually be deleted.

The service returns a list of messages that indicates the result of the operation. If everything goes as expected, this list will be empty. In the case where certain elements could not be deleted (for business rules), the service will return one or more messages which will indicate it to you. Note that these messages are the same as those displayed in the user interface.

Optionally we can pass in parameter 'dry-run = true'. In this case only the diagnostics and messages are returned, but no test case will be deleted.

Path parameters

Table 1. /api/rest/latest/test-cases/{ids}
Parameter Description

ids

the list of ids of the test case

HTTP request

DELETE /api/rest/latest/test-cases/2,3?dry-run=true HTTP/1.1
Content-Type: application/json
Accept: application/json
Accept-Language: fr_FR_FR
Host: localhost:8080

Request parameters

Parameter Description

dry-run

indicates if you really want to delete the test case or you just want to do a simulation: if dryRun = true : to do just a delete simulation, if dryRun = false or null: for delete test case

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 322

[ "Les cas de test suivants ne seront pas supprimés : Test-Case3<br/>parce qu'ils sont appelés par les cas de test suivants :\",\n Test-Case 1, Test-Case 4, Test-Case2<br/>\",\nLe cas de test :Test-Case3<br/>est référencé dans au moins une itération. Après sa suppression, il ne pourra plus être exécuté.<br/>" ]

A POST to test-cases/{id}/coverages/{requirementIds} links the requirements to the test case.

Table 1. /api/rest/latest/test-cases/{id}/coverages/{requirementIds}
Parameter Description

id

the id of the test case

requirementIds

the ids of the requirements to link

POST /api/rest/latest/test-cases/240/coverages/12,13,14 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2664

{
  "_type" : "test-case",
  "id" : 240,
  "name" : "My test case",
  "reference" : "",
  "project" : {
    "_type" : "project",
    "id" : 15,
    "name" : "My project",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/projects/15"
      }
    }
  },
  "parent" : {
    "_type" : "test-case-folder",
    "id" : 305,
    "name" : "My folder",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-case-folders/305"
      }
    }
  },
  "created_by" : "admin",
  "created_on" : "2017-06-15T10:00:00.000+00:00",
  "last_modified_by" : "admin",
  "last_modified_on" : "2017-06-15T10:00:00.000+00:00",
  "importance" : "LOW",
  "status" : "WORK_IN_PROGRESS",
  "nature" : {
    "code" : "NAT_FUNCTIONAL_TESTING"
  },
  "type" : {
    "code" : "TYP_EVOLUTION_TESTING"
  },
  "prerequisite" : "",
  "description" : null,
  "automated_test" : null,
  "automated_test_technology" : null,
  "scm_repository_url" : null,
  "scm_repository_id" : null,
  "automated_test_reference" : null,
  "uuid" : "fab298f1-2fd5-4d65-a904-de54f8d87ec1",
  "custom_fields" : [ {
    "code" : "AUTOMATED",
    "label" : "test_is_automated",
    "value" : "false"
  } ],
  "steps" : [ ],
  "parameters" : [ ],
  "datasets" : [ ],
  "verified_requirements" : [ {
    "_type" : "requirement-version",
    "id" : 12,
    "name" : "My first requirement",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/12"
      }
    }
  }, {
    "_type" : "requirement-version",
    "id" : 13,
    "name" : "My second requirement",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/13"
      }
    }
  }, {
    "_type" : "requirement-version",
    "id" : 14,
    "name" : "My third requirement",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/14"
      }
    }
  } ],
  "script_auto" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "steps" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/steps"
    },
    "parameters" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/parameters"
    },
    "datasets" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/datasets"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/test-cases/240/attachments"
    }
  }
}

A DELETE to test-cases/{id}/coverages/{requirementIds} unlinks the requirements from the test case.

Table 1. /api/rest/latest/test-cases/{id}/coverages/{requirementIds}
Parameter Description

id

the id of the test case

requirementIds

the ids of the requirements to unlink

DELETE /api/rest/latest/test-cases/543/coverages/350,351 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080