Forum Discussion

Jen_ReadyAPI's avatar
Jen_ReadyAPI
Occasional Contributor
4 years ago

Newbie Question: How to create a test case/step where a "no record found" is a pass in ReadyAPI?

Hi,

I am new to API, HTML and ReadyAPI - so pls understand if my question may seem daft of if I have expressed myself incorrectly.

 

My question is how do I create a test case/step where a "no record found" is a pass in ReadyAPI?

 

Any advice will be appreciated.

I may have laid out the test case/steps incorrectly - so please let me know.

Or let me know if there is a more efficient or standard way of doing things.

 

Thanks.

Jennifer

  • Excuse me if my understanding is not what you conveyed.

    I believe that you have a service with a query parameter which takes a value and validating response.
    - I think you have a test case with multiple tests with varying values which is fine. This is one of way doing it. However, need to have an appropriate assertion so that next time when the tests are run, you will come to know which case failed / passed
    - Another way is data driven approach. Please check the below video how to do the same. If you are going to adopt this, then you can also pass the expected value from the same data file.
    https://www.youtube.com/watch?v=nWXtt8hgp8I
  • nmrao's avatar
    nmrao
    Champion Level 3
    Excuse me if my understanding is not what you conveyed.

    I believe that you have a service with a query parameter which takes a value and validating response.
    - I think you have a test case with multiple tests with varying values which is fine. This is one of way doing it. However, need to have an appropriate assertion so that next time when the tests are run, you will come to know which case failed / passed
    - Another way is data driven approach. Please check the below video how to do the same. If you are going to adopt this, then you can also pass the expected value from the same data file.
    https://www.youtube.com/watch?v=nWXtt8hgp8I
    • Jen_ReadyAPI's avatar
      Jen_ReadyAPI
      Occasional Contributor

      Hi Rao,

       

      Thanks kindly for your suggestion of using data driven approach. 

      Since watching the link - I was able to do this pass parameters to test steps for a REST API using data source and data source loop.  

      I noticed that though the test cases passed.

      How do I see the details of each step - ie of the parameters passed for each loop and what the response was.

      I had a look at the transaction tab of the test case and it had details of the loop but not details of the parameters and the response.

      Maybe I am looking in the wrong place?

       

      Still lots to learn.

      Jennifer

      • Jen_ReadyAPI's avatar
        Jen_ReadyAPI
        Occasional Contributor

        In the transaction log, I can see the loop details:

         

         

        But no details on the body - ie request and response,

         

        I was expecting to see the following details, what I see when I run the test step as a single step.

         

         

        Am I looking in the wrong place or a limitation of ReadyAPI?

         

        Jennifer