- TestRuns
- Adding a TestRun
- Getting a TestRun
- Get a TestRun with specific properties
- Getting all TestRuns for a project
- Updating a TestRun
- Deleting a TestRun
- TestOutcomes
- Adding a TestOutcome
- Getting a TestOutcome
- Getting a TestOutcome's test output
- Updating a TestOutcome
- Count TestOutcomes for TestRun
- Get TestOutcomes for TestRun
- Get TestOutcomes for a specific TestCase
- Get TestOutcomes for a specific TestCase and TestRun
- TestCases
TestRuns
Adding a TestRun
HTTP POST to http://<cuantourl>/api/addTestRun
Response: 201 Created
Getting a TestRun
HTTP GET from http://<cuantourl>/api/getTestRun/<testRunId>
Response: 200 OK
Get a TestRun with specific properties
Returns TestRuns that match all of the specified properties. Note this will return test runs that include additional properties beyond the ones specified, but will not return test runs that do not contain all of the specified properties.
HTTP POST to http://<cuantourl>/api/getTestRunsWithProperties
Post body:
Response: 200 OK or 404 NOT FOUND
Getting all TestRuns for a project
Returns all TestRuns for a project in descending order by dateExecuted.
HTTP GET from http://<cuantourl>/api/getAllTestRuns?projectKey=<projectKey>
Response: 200 OK
Updating a TestRun
HTTP POST to http://<cuantourl>/api/updateTestRun/<testRunId>
Response: 200 OK
Deleting a TestRun
HTTP POST to http://<cuantourl>/api/deleteTestRun/<testRunId>
Response: 200 OK
TestOutcomes
Adding a TestOutcome
HTTP POST to http://<cuantourl>/api/addTestOutcome
Response: 201 Created
Getting a TestOutcome
HTTP GET from http://<cuantourl>/api/getTestOutcome/<testOutcomeId>
Response: 200 OK
Getting a TestOutcome's test output
HTTP GET from http://<cuantourl>/api/getTestOutput/<testOutcomeId>
Response: 200 OK
The body of the response is the full output:
Updating a TestOutcome
HTTP POST to http://<cuantourl>/api/updateTestOutcome
Response: 200 OK
Count TestOutcomes for TestRun
HTTP GET from http://<cuantourl>/api/countTestOutcomes?id=<testRunId>
Response 200 OK
Get TestOutcomes for TestRun
This fetches TestOutcomes that are associated with a particular TestRun. You can fetch a maximum of 100 TestOutcomes at a time.
HTTP GET from http://<cuantourl>/api/getTestOutcomes?id=<testRunId>&sort=fullName&sort=dateCreated&order=asc&order=asc&max=100&offset=0
Parameters:
- sort - Multiple sorts and multiple orders may be specified, the first one listed is the primary sort and the latter are secondary sorts. Valid sorts are fullName, testResult, state (analysis state), duration, bug (bug title), owner, note, testOutput, dateCreated, finishedAt, lastUpdated, startDate, dateExecuted.
- order - asc or desc
- max - maximum number of TestOutcomes to return.
- offset - offset of TestOutcomes to return. 0-based.
Response: 200 OK
Get TestOutcomes for a specific TestCase
This fetches all TestOutcomes for a particular TestCase, regardless of which (if any) TestRun they are associated with.
HTTP GET from http://<cuantourl>/api/getTestOutcomes?testCase=<testCaseId>&sort=dateCreated&order=desc&sort=finishedAt&order=desc
Parameters:
- testCase - The id of the TestCase
- sort - Multiple sorts and multiple orders may be specified, the first one listed is the primary sort and the latter are secondary sorts. Valid sorts are fullName, testResult, state (analysis state), duration, bug (bug title), owner, note, testOutput, dateCreated, finishedAt, lastUpdated, startDate, dateExecuted.
- order - asc or desc
Response: 200 OK
Get TestOutcomes for a specific TestCase and TestRun
This fetches all TestOutcomes for a specific TestCase and TestRun – under normal circumstances, there will only be one TestOutcome for a specific TestCase in one TestRun, so expect one result returned.
HTTP GET from: http://<cuantourl>/api/getTestCaseOutcomesForTestRun?testRun=<testRunId>&testCase=<testCaseId>
Response: 200 OK
TestCases
Get a TestCase
HTTP GET: http://<cuantourl>/api/getTestCase?projectKey=<projectKey>&packageName=<testPackageName>&testName=<testName>¶meters=<parameters>
Parameters:
- packageName - the package name of the test. This is everything up to the actual test name (minus the period separating a test class from the test name).
- testName - the name of the test.
- parameters (optional) - Any parameters of the test. Parameters are part of the test case signature, so if you don't include parameters it will only match the TestCase if the packageName and testName match and the test has no parameters. If you include parameters, all three have to match for the TestCase to be considered a match.