Forum Discussion
- LucianCommunity Hero
Hey,
Do you want count the number of REST endpoints? Do I understand this right?
- aaronpliuFrequent Contributor
yes. For Rest endpoints only. including the same URL alongwith different method (ie. GET, POST, PUT)
(Example)
GET /a/b/c/123
POST /a/b/c/123
There should be calculated as 2 endpoints.
Case 1
---- GET
---- POST
Case 2
----- GET
Should have 2 endpoints covered in case 1 and case 2.
- LucianCommunity Hero
Oh, you can count them like this:
// Get all interfaces in the project
def interfaces = testRunner.getTestCase().getTestSuite().getProject().getInterfaceList()
def restInterfacesCount = 0
interfaces.each {
if (it instanceof com.eviware.soapui.impl.rest.RestService) {
restInterfacesCount++
}
}
Related Content
- 8 months ago
- 5 years ago
Recent Discussions
- 2 hours ago
- 5 days ago