cancel
Showing results for 
Search instead for 
Did you mean: 

Test Step Pass Individually but fails when run in Test Case

Highlighted
Occasional Contributor

Test Step Pass Individually but fails when run in Test Case

Hi,

I have JDBC Request/Data source Step followed by Rest Request step.When I run the test case its doesnt go to the step.But if I indivitually run its fetching data from DB.Because of this all my testcases are failing.I am using Readyapi 2.5

 

Thanks

Siji

5 REPLIES 5
Highlighted
Community Hero

Re: Test Step Pass Individually but fails when run in Test Case

Hi,

Can you confirm your test step hierarchy in your test step please? Im aa bit confused ny the description.....are you trying to use the query result as a parm for a subsequent REST step?
Diagnosing this would be a lot easier if you can provide the config associated to each of your test steps.

Cheers,

Richie
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Occasional Contributor

Re: Test Step Pass Individually but fails when run in Test Case

Hello,

testcase.jpg

In this  when I run my test suite , the JDBC request is initializes when I checked Raw it shows the query with the parameter(prev reesponse).But Result is not generated thats the reason next two steps failes.But If I go to that JDBC Request step and run that Indivitual Query returns data and passes all my testcases.Hope you understand

Thanks

Siji

Highlighted
Community Hero

Re: Test Step Pass Individually but fails when run in Test Case

Hi @sijianand08

 

So you'll have to forgive me - can you confirm the following:

 

Are you saying that testcase passes if you execute each step individually (Step by Step) but if you run the testcase itself the REST requests following the JDBC step fail?  

 

Without knowing a bit more about the config on your steps - I'd suggest sticking a Delay step in there to slow things down a little

 

You have  Datasource object before the JDBC step - whats this actually doing?  Can you provide the SQL on the JDBC step? whats the JDBC step doing?

 

the subsequent REST requests - what are they doing?  are they picking up parm values/properties from the previous JDBC step?

 

Cheers,

 

richie

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Occasional Contributor

Re: Test Step Pass Individually but fails when run in Test Case

@richie

Hi ,

Thanks for looking into this .I hope did answer all your questions.

Are you saying that testcase passes if you execute each step individually (Step by Step) but if you run the testcase itself the REST requests following the JDBC step fail?  

Yes

 

Without knowing a bit more about the config on your steps - I'd suggest sticking a Delay step in there to slow things down a little

I tried before putting the post .Is there any default value ?

 

You have  Datasource object before the JDBC step - whats this actually doing?  Can you provide the SQL on the JDBC step? whats the JDBC step doing?

I have

1.Rest Step  which gives response has key

2.JDBC request where I pass above key and retrieve data from table(select * from table where key={key})

 

the subsequent REST requests - what are they doing?  are they picking up parm values/properties from the previous JDBC step?

Yes

Highlighted
Community Hero

Re: Test Step Pass Individually but fails when run in Test Case

Hey,

 

we're still going to need a bit more info. you've provided an image of your teststep hierarchy - but what are the methods on your rest steps?  without you giving me the more detail or exact details (e.g. screenshots of the config on each step) or you provide more detail - theres only so much I can suggest.

 

There is no 'default' value one should specify in your 'Delay' step - there is a REadyAPI! default value of I think '1000' milliseconds - but you should be thinking about what is actually occurring within the system you are testing to determine what is an appropriate delay value.

 

Without knowing anything of the system - Id stick a 5 or even 10 second delay AFTER any POST - there are many reasons you can suffer a delay between making a db insert/update via a REST request and the change actually being persisted to the DB.

 

Perhaps the system you are testing has a an unusual amount of latency - you can start by being extreme and inserting 5 second delays in between each test step if you want and then thin them down - but thats all I've got unless you can provide a bit more info about exactly what is occuring.

 

Cheers,

 

richie

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors