- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
10-27-2022 01:13 AM - edited 10-27-2022 01:15 AM
Hi All,
Hope you are doing fine.
In todays article we will see how we can add a new custom test type and call the OOB DevOps API to push the payload for the same from external interfaces.
Symptoms
- Create a new Test Type called 'Infra Risk Score'
- Define it as a functional test unit
- Define the API to insert the test summary for the new test type
Diagnosis
For this we will be following the steps as given below
- Create new Test type
- Create new Test type mapping
- Configure the OOB API to call the same.
Solution
- Navigate to Test Types as DevOps --> Integration --> Test Types
- Create new Test Types reord
- Set categeory as one of Functional ,Performance or Unit
- Create new Test Type Mapping by navigating to DevOps --> Integration --> Test Type Mapping
- Configure the record as given below with the Tool integration defines the source from which this payload will be pushed.
- Now thats it on the configuration side and now we can use the OOB Webhook | Tool API to push the Test Summary for new test type
- Attributes for the call is as given below
- Request
Request HTTP Method : POST URI : https://<Instance name>.service-now.com/api/sn_devops/devops/tool/test?toolId=6fa7250287c38194c00c4116cebb357a&testType=Infra%20Risk%20Score Headers Accept : application/json Content-Type : application/json Request Body { "name": "Test-selenium#60", "duration": 78.802, "passedTests": 4, "failedTests": 0, "skippedTests": 0, "blockedTests": 0, "totalTests": 4, "startTime": "2020-06-30T18:12:31Z", "finishTime": "2020-06-30T18:12:31Z", "passingPercent": 100, "buildNumber": "30291", "stageName": "<Pipeline stage name>", "pipelineName": "<Azure Project Name>/<Pipeline name>" }- Response
Response
Status code : 201 Created
Response Body
{
"result": {
"status": "Success",
"sysId": null
}
}
Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.
Regards,
Amit Gujarathi
ServiceNow Community Amit Gujarathi
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Dear Amit,
I was working for one integration ,please see my question in the post.
https://www.servicenow.com/community/devops-forum/servicenow-to-azure-devops-integration/m-p/2503444
can i use this approach for my integration if so please provide me some steps to get started.
And in my API explorer i am unable to see sn_devops and devops API , please suggest
thanks in advance