Ask a Question

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

SOLVED
Jen_ReadyAPI
Occasional Contributor

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?

Jen_ReadyAPI_0-1624274277619.png

 

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

4 REPLIES 4
nmrao
Community Hero

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


Regards,
Rao.
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
Occasional Contributor

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

 

Jen_ReadyAPI_0-1624418826792.png

 

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

Jen_ReadyAPI_1-1624418989519.png

 

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

 

Jen_ReadyAPI_2-1624419049042.png

 

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

 

Jennifer

 

Glad to know that you can proceed with data driven approach.

Regarding the logging, while it can be optional while it can be optional when the tests are passing. If the test fails, it automatically shows the details, I believe.
However, there is a catch here. A test is marked Passed or Failed only when there are proper assertions in place.

Of course, the input data will be the same as that we send in the data sheet.


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: