-
Notifications
You must be signed in to change notification settings - Fork 7
REST API Test Results
All of the following is relative to http://hostname:8080/re/resteasy/testresults/
| uri | verbs | description |
|---|---|---|
| servertime | GET | Returns Report Engine Server Time |
| testsuiteid | GET | Get test suite id to create new test suite |
| testsuite | POST | Create new test suite |
| testsuite | PUT | Update existing test suite |
| testsuitename | PUT | Update existing test suite name alone |
| testsuite/{id} | GET | Get test suite details by id |
| testsuitebysuite | POST | Get test suite details by test suite details |
| testgroup | POST | Send New Test Group details, returns New Test Groups details with id |
| testcase | POST | Send New Test Case details, returns New Test Case details with id |
| testcase | PUT | Update Test Case details |
| testlog | POST | Add Test log details |
http://hostname:8080/re/resteasy/testresults/
servertime | GET
Response(String):
29-Jan-2013, 09:20:33.266, IST
testsuiteid | GET | Get test suite id to create new test suite
Reponse(String):
3656
testsuite | POST | Create new test suite
Request(xml):
<testSuite>
<id>3656</id>
<remoteStartTime>2013-01-28T22:21:43.595+05:30</remoteStartTime>
<testBuild>
4.6.0-SNAPSHOT (e554bc7) GWT Version: 2.5.0 SmartGWT Version: 3.0
</testBuild>
<testComments>-</testComments>
<testHost>jonbox1.lab.eng.pnq.redhat.com [10.65.206.43]</testHost>
<testReference>RHQ-4.x-GUI-OVER-NIGHT-AUTOMATION-JOB</testReference>
<testStatus>Running</testStatus>
<testSuiteName>RHQ 4.x core UI Test</testSuiteName>
</testSuite>
Request(json):
{"id":3656,"testSuiteName":"RHQ 4.x core UI Test","testStatus":"Running","testBuild":"4.6.0-SNAPSHOT (e554bc7)\nGWT Version: 2.5.0 SmartGWT Version: 3.0","testComments":"-","remoteStartTime":1358614303595,"testReference":"RHQ-4.x-GUI-OVER-NIGHT-AUTOMATION-JOB","testHost":"jonbox1.lab.eng.pnq.redhat.com [10.65.206.43]"}
testsuite | PUT | Update existing test suite
Available <testStatus>Completed</testStatus> options: Running, Completed, NoStatus
Request(xml):
<testSuite>
<id>3656</id>
<remoteEndTime>2013-01-29T10:33:09.963+05:30</remoteEndTime>
<testBuild>
4.6.0-SNAPSHOT (e554bc7) GWT Version: 2.5.0 SmartGWT Version: 3.0
</testBuild>
<testComments>-</testComments>
<testStatus>Completed</testStatus>
</testSuite>
testsuitename | PUT | Update existing test suite name alone
Request(xml):
<testSuite>
<id>3656</id>
<testSuiteName>Test Suite name - New</testSuiteName>
<testComments>-</testComments>
</testSuite>
testsuite/{id} | GET | Get test suite details by id
Ex: testsuite/3656
Response(xml):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testSuite>
<aggregationStatus>false</aggregationStatus>
<failedCases>0</failedCases>
<failedChanges>0</failedChanges>
<id>3656</id>
<localStartTime>2013-01-29T09:41:44.777+05:30</localStartTime>
<passedCases>0</passedCases>
<passedChanges>0</passedChanges>
<remoteStartTime>2013-01-28T22:21:43.595+05:30</remoteStartTime>
<skippedCases>0</skippedCases>
<skippedChanges>0</skippedChanges>
<testBuild>
4.6.0-SNAPSHOT (e554bc7) GWT Version: 2.5.0 SmartGWT Version: 3.0
</testBuild>
<testComments>-</testComments>
<testDuration>0</testDuration>
<testHost>jonbox1.lab.eng.pnq.redhat.com [10.65.206.43]</testHost>
<testReference>RHQ-4.x-GUI-OVER-NIGHT-AUTOMATION-JOB</testReference>
<testReferenceId>3</testReferenceId>
<testStatus>Running</testStatus>
<testSuiteId>0</testSuiteId>
<testSuiteName>Test Suite name - New</testSuiteName>
<topN>0</topN>
<totalCases>0</totalCases>
<totalChanges>0</totalChanges>
</testSuite>
testsuitebysuite | POST | Get test suite details by test suite details
Request(xml):
<testSuite>
<testSuiteName>Test Suite name - New</testSuiteName>
<testReference>RHQ-4.x-GUI-OVER-NIGHT-AUTOMATION-JOB</testReference>
</testSuite>
Response(xml):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testSuite>
<aggregationStatus>false</aggregationStatus>
<failedCases>0</failedCases>
<failedChanges>0</failedChanges>
<id>3656</id>
<localStartTime>2013-01-29T09:41:44.777+05:30</localStartTime>
<passedCases>0</passedCases>
<passedChanges>0</passedChanges>
<remoteStartTime>2013-01-28T22:21:43.595+05:30</remoteStartTime>
<skippedCases>0</skippedCases>
<skippedChanges>0</skippedChanges>
<testBuild>
4.6.0-SNAPSHOT (e554bc7) GWT Version: 2.5.0 SmartGWT Version: 3.0
</testBuild>
<testComments>-</testComments>
<testDuration>0</testDuration>
<testHost>jonbox1.lab.eng.pnq.redhat.com [10.65.206.43]</testHost>
<testReference>RHQ-4.x-GUI-OVER-NIGHT-AUTOMATION-JOB</testReference>
<testReferenceId>3</testReferenceId>
<testStatus>Running</testStatus>
<testSuiteId>0</testSuiteId>
<testSuiteName>Test Suite name - New</testSuiteName>
<topN>0</topN>
<totalCases>0</totalCases>
<totalChanges>0</totalChanges>
</testSuite>
testgroup | POST | Send New Test Group details, returns New Test Groups details with id
Request(xml):
<testGroup>
<testSuiteId>3656</testSuiteId>
<testGroup>Group -1</testGroup>
<remoteTime>2013-01-29T10:10:44.777+05:30</remoteTime>
</testGroup>
Response(xml):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testGroup>
<failedCases>0</failedCases>
<id>58614</id>
<localTime>2013-01-29T10:19:33.800+05:30</localTime>
<passedCases>0</passedCases>
<remoteTime>2013-01-29T10:10:44.777+05:30</remoteTime>
<skippedCases>0</skippedCases>
<testGroup>Group -1</testGroup>
<testSuiteId>3656</testSuiteId>
<totalCases>0</totalCases>
</testGroup>
testcase | POST | Send New Test Case details, returns New Test Case details with id
Request(xml):
<testCase>
<testSuiteId>3656</testSuiteId>
<testGroupId>58614</testGroupId>
<testName>Test -1</testName>
<testArguments>test arguments1,2,3</testArguments>
<testResult>Running</testResult>
<remoteStartTime>2013-01-29T10:30:33.800+05:30</remoteStartTime>
</testCase>
Response(xml):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testCase>
<id>316042</id>
<localStartTime>2013-01-29T10:33:43.810+05:30</localStartTime>
<remoteStartTime>2013-01-29T10:30:33.800+05:30</remoteStartTime>
<testArguments>test arguments1,2,3</testArguments>
<testDuration>0</testDuration>
<testGroupId>58614</testGroupId>
<testName>Test -1</testName>
<testResult>Running</testResult>
<testSuiteId>3656</testSuiteId>
</testCase>
To include image file (screen shot) on test failure
<screenShotFileName>File name</screenShotFileName>
<screenShotFileBase64>image-file-in-base64-format<screenShotFileBase64>
[or]
<screenShotFileName>File name</screenShotFileName>
<screenShotFileByte>image-file-in-byte-format<screenShotFileByte>
testcase | PUT | Update Test Case details
Available <testResult>Passed</testResult> options: Passed, Failed, Skipped, Running, NoStatus
Request(xml):
<testCase>
<testSuiteId>3656</testSuiteId>
<testGroupId>58614</testGroupId>
<testName>Test -1</testName>
<testArguments>test arguments1,2,3</testArguments>
<testResult>Completed</testResult>
<remoteEndTime>2013-01-29T10:32:33.800+05:30</remoteEndTime>
</testCase>
testlog | POST | Add Test log details
Request(xml):
<testLogs>
<testSuiteId>3656</testSuiteId>
<testGroupId>58614</testGroupId>
<testCaseId>316042</testCaseId>
<sequenceNumber>123</sequenceNumber>
<logLevel>INFO</logLevel>
<logTime>2013-01-29T10:31:33.800+05:30</logTime>
<className>com.redhat.reportengine.test</className>
<methodName>mytest</methodName>
<message>Sample log messgae</message>
<throwable></throwable>
</testLogs>