Parameters | Type | Explanation | Example Value |
---|---|---|---|
technicalServiceName * | QUERY | Technical service which is going to post the data using this URL(Can be a Project Name, pipeline name,etc) | MCMP-DevOps-Intelligence/DevelopmentProject1 |
{testType} * | PATH | Type of test to be uploaded, it is defined according to the test which was performed(Unit, functional, code coverage) | unit |
fileType * | QUERY | Type of file to be uploaded corresponding to the file to be uploaded(junit, xunit, mocha,jmeter,etc) | xunit |
testEngine (optional) | QUERY | Test engine/tool name which was used to perform the test | XUNIT |
uploadFile(multipart/form-data) * | FORM DATA | This is the test report file generated by the testing tool (maximum file size is 4 MB) | junit_report.xml |
technicalServiceOverride | QUERY | Override flag for the technical service | true |
providerhref | QUERY | Provider URL | https://provider-url |
curl --location --request POST 'https://peer-core.gravitant.net/dash/api/test/v3/techical-services/tests/unit?fileType=xunit&testEngine=XUNIT&techncialServiceName=MCMP-DevOps-Intelligence/myservice&technicalServiceOverride=true&providerhref=https://provider-url' \ --header 'Content-Type: multipart/form-data' \ --header 'Authorization: TOKEN B8FkfCC3PRVrezteLHp0rPROs2p6yZk_swVLpP_36D7pd5HHLhx7UXqlH_BvpQGo' \ --form 'uploadfile=@/home/eshan/go/src/github.ibm.com/dash/dash_test/controller/testdata/junit_report.xml'
Parameters | Type | Explanation | Example Value |
---|---|---|---|
technicalServiceName * | QUERY | Technical service which is going to post the data using this URL.(Can be a Project Name, pipeline name,etc) | MCMP-DevOps-Intelligence/MCMP-Development |
{testType} * | PATH | Type of test to be uploaded, it is defined according to the test which was performed(Unit, functional, code coverage) | unit |
{runID} * | PATH | This id is used as a reference while re-running a particular test and updating its record | testRun1 |
fileType * | QUERY | Type of file to be uploaded corresponding to the file to be uploaded(junit, xunit, mocha,jmeter,etc) | junit |
testEngine(optional) | QUERY | Test engine/tool name which was used to perform the test | JUNIT |
uploadfile(multipart/form-data) * | BODY | This is the test report file generated by the testing tool | junit_results.json |
technicalServiceOverride | QUERY | Override flag for the technical service | true |
providerhref | QUERY | Provider URL | https://provider-url |
curl --location --request POST 'https://peer-core.gravitant.net/dash/api/test/v3/technical-services/tests/unit/run/5d8b192ac11e8a01f1493d21?fileType=xunit&testEngine=XUNIT&serviceName=MCMP-DevOps-Intelligence/dash123&serviceOverride=true&providerhref=https://provider-url' \ --header 'Content-Type: multipart/form-data' \ --header 'Authorization: TOKEN B8FkfCC3PRVrezteLHp0rPROs2p6yZk_swVLpP_36D7pd5HHLhx7UXqlH_BvpQGo' \ --form 'uploadfile=@/home/eshan/go/src/github.ibm.com/dash/dash_test/controller/testdata/junit_report_test_suite.xml'
Parameters | Type | Explanation | Example Value |
---|---|---|---|
tehnicalServiceName * | QUERY | Technical service which is going to post the data using this URL. (Can be a Project Name, pipeline name,etc) | MCMP-DevOps-Intelligence/JenkinsProject |
{runID} * | PATH | This id is used as a reference while re-running a perticular test and updating its record | jenkinsTest1 |
{testEngine} (optional) | QUERY | Test engine/tool name which was used to perform the test | xunit |
Request body JSON | BODY | Assign required values for each of the fields Note: duration is expected in seconds | {"duration": 10,"failed": 2,"passed": 20,"status": "passed","test_type": "unit"} |
technicalServiceOverride | QUERY | Override flag for the technical service | true |
curl --location --request POST 'https://peer-core.gravitant.net/dash/api/test/v3/technical-services/tests/run/fc08230e2e00d9befce356b744bf2f92d0ef20f8/status?technicalServiceName=MCMP-DevOps-Intelligence/myservice&serviceOverride=true' \ --header 'Authorization: TOKEN B8FkfCC3PRVrezteLHp0rPROs2p6yZk_swVLpP_36D7pd5HHLhx7UXqlH_BvpQGo' \ --header 'Content-Type: application/json' \ --data-raw '{ "duration": 3, "failed": 20, "passed": 25, "status": "passed", "test_type": "unit" }'
Test Type | File Type (File Format) |
---|---|
Unit Test | JUnit (json), xUnit (xml), Mocha (json), KarmaMocha (json) |
Function Test | JUnit (json), xUnit (xml), Mocha (json), KarmaMocha (json), JMeter(xml) |
Code Coverage | Cobertura (xml), lcov, Istanbul (json), JaCoCo (xml) |
Scale Test | Jmeter(xml) |