Forum Discussion

Olga_T's avatar
Olga_T
SmartBear Alumni (Retired)
7 years ago

Develop a Script – Win in API Summer!

Hi all,

 

Have you accepted our API Summer 2018 challenge yet? If not, you can still join us anytime and win great prizes from SmartBear! Just post more new topics on the ReadyAPI forums.

 

Haven’t you found a subject for your new topic? Recently, I have made a post on the ideas for your posts, and now, I have some more!

Please share your scripts by creating new topics according to the tasks below:

 

  • Test run statistics in Groovy

Share your scripts or create new ones, which would output the following test execution info to the log:

  1. Status of TestSuites and TestCases (PASS, FAIL)
  2. Duration of TestSuites and TestCases execution
  3. Number of passed/failed TestCases in each TestSuite

 

  • Count elements in JSON response body

Share your scripts or create new ones, which would take a JSON object and JSONPath expression as an input and would return the number of elements found by the specified path. 

Example: for this object and JSONPath $.cars.* the output value should be 3.

{
"name" : "John",
"age" : 30,
"cars" : [
{
"car" : "BMW",
"color" : "red"
},
{
"car" : "Ford",
"color" : "black"
},
{
"car" : "Fiat",
"color" : "green"
}
]
}

 

Who dares, wins!

Stay tuned for preliminary results of the API Summer 2018 challenge this week,