Test Case Analysis Report Method

You can analyze your test cases to see if they were hit during automated runs of your model by posting the modelName, group, and a description of which testcases you are interested in the test case report endpoint.

Method

POST -> http://localhost/api/testcase/report

Headers

Name Value
Authorization bearer <access_token>
Content-Type application/x-www-form-urlencoded

Body Parameters

Name Type Required
modelName Text Yes
group Text Yes
testcases Text (JSON) Yes

The testcases parameter needs to be in JSON format, as shown in this example:

Example:

[

{"testcaseName": "testcase1", "testcase": "Action Initial::\"Open Chrome\""},

{"testcaseName": "testcase2", "testcase": "Action Initial::\"Open Chrome\", "Action \"football page\"::\"View league tables\""}

]

Possible Responses

Status Status Text Description
200 OK  
401 Unauthorized The access token was not valid
403 Forbidden The current user doesn't have access to that model

Response Body JSON

Typical successful response from the test case analysis endpoint:

{

"cmd": "eggplantAIreporter --coverdb ttdb --type testcase --models \"BBCSport\" --input C:/Users/MARTIN~1.DAN/AppData/Local/Temp/BBCSport20180531-8884-1vslns5 --json",

"report": {

"testcases": [

{

"hits": [

{

"testId": "673",

"startDateTime": "2018-05-24 10:34:13.02721",

"status": "PASSED",

"seed": "772571",

"numMatches": "1",

"matchLocations": [

"0"

]

},

{

"testId": "665",

"startDateTime": "2018-05-17 09:48:46.650923",

"status": "PASSED",

"seed": "66575",

"numMatches": "1",

"matchLocations": [

"0"

]

},

{

"testId": "674",

"startDateTime": "2018-05-24 10:40:06.981321",

"status": "PASSED",

"seed": "301211",

"numMatches": "1",

"matchLocations": [

"0"

]

}

],

"name": "\"testcase1\""

}

]

}

}

Name Type Description
cmd Text The command that was generated to runt the reporter engine
report Text Contains a test cases object and an errors object
testcases Array A list of test cases that were analyzed
name Text The name of the test case
hits   A list of objects that details which runs satisfied the test case
warnings String A list of warnings that were flagged during the run
testID String The id of the run report
startDateTime   When the run started
status Text The status of the run
seed String What seed was used for the run
numMatches String How many matches of the test case happened during the run
matchLocations Array Integers denoting the positions of the test case matches in the list of events

 

This topic was last updated on July 13, 2019, at 11:22:03 AM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant