Forum Discussion

werther78's avatar
werther78
New Contributor
6 years ago

Assertion for a query for a rest request

I need help. I have a query that counts the number of accounts for an for a company that has. So the query counts how many accounts that company which is odentified by a refrence number like 8971 or 7563. So my rest request has an input parameter for the reference number and the repsonse comes as true or false. Like if reference number has no accounts then it gives false. I don't what is the simplest way to automate this since there are over 300 reference numbers. Do i put the query in the test assertion using groovy. I am new to this and I don't know scripting well.

1 Reply

  • Hi werther78

     

    If at a time you need to fetch only one record that you can do parameterization by either save reference number into Properties Step or at TestCase Level(if there is a need to using that reference Number somewhere else)

     

    Refer this article on how to transfer properties 

    Transferring Properties