Contributions
- 11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes0Comments
Re: Scripted assertions in JDBC Requests - Issue
Iteration 1 : The assertion fails and the test step - JDBC_Request_HixGroupSetup_Initial is marked as failed. The logs after the failed assertion are skipped. Iteration 2 : The assertion is successful. But still the test step JDBC_Request_HixGroupSetup_Initial is marked as failed. All the infos after the assertion logged. I am able to look up the results in the database too. The generic behavior I observed is if a test step x fails in iteration n due to assertion failure, the same test step x fails in iteration n+1 even if the assertion is successful. the subsequent iterations are successful. It seems like the test step result is cached and is returning the same result for the next iteration. when I run the script assertion stand alone, it runs absolutely fine and all the infos are logged. The 'expectedResult' is fed from the data source (Excel) and is always either "True" or "False". I ran through the debugger and the response looks absolutely fine. I am getting the expected response from the SQL and the assertion passes. I can confirm that as the infos specified after the assertions are logged.11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes0CommentsRe: Scripted assertions in JDBC Requests - Issue
I have attached the project and the data source file. when run, the first iteration shall fail at JDBC_Request_HixGroupSetup_Initial sue to assertion failure. In the second iteration, though the assertions are successful, the same test step - JDBC_Request_HixGroupSetup_Initial shows as failed.11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes0CommentsRe: Scripted assertions in JDBC Requests - Issue
The error log is empty. And just to reiterate, the assertion fails in one iteration and the test step fails. This same test step though successful in the next iteration, is marked as failed.11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes0CommentsRe: Scripted assertions in JDBC Requests - Issue
Attached are some screen shots of the results. Following is the script log first Part is the one for the failed iteration. Second one is for the next iteration where it has been asserted successfully. but the test step status shows failed. Wed Jul 10 15:36:54 PDT 2013:INFO:*****Checking ODS_HIX_GROUPSETUP_MAINTENANCE***** Wed Jul 10 15:36:54 PDT 2013:INFO:messageID - 1373495811314 Wed Jul 10 15:36:54 PDT 2013:INFO:Expected Result - Pass Wed Jul 10 15:36:54 PDT 2013:INFO:Number of Rows fetched- 0 Wed Jul 10 15:36:54 PDT 2013:ERROR:Inside Pass Wed Jul 10 15:36:54 PDT 2013:INFO:*****Checking ODS_HIX_REJECTION***** Wed Jul 10 15:36:54 PDT 2013:INFO:messageID - 1373495811314 Wed Jul 10 15:36:54 PDT 2013:INFO:Number of Rows Fetched - 0 Wed Jul 10 15:36:54 PDT 2013:INFO:Expected Result - Pass Wed Jul 10 15:36:54 PDT 2013:INFO:Inside PAss Wed Jul 10 15:36:54 PDT 2013:INFO:Asserted successfully Wed Jul 10 15:36:54 PDT 2013:INFO:*****Completed checking ODS_HIX_REJECTION***** Wed Jul 10 15:36:54 PDT 2013:INFO:============================================== Wed Jul 10 15:36:57 PDT 2013:INFO:*****Checking ODS_HIX_GROUPSETUP_MAINTENANCE***** Wed Jul 10 15:36:57 PDT 2013:INFO:messageID - 1373495814549 Wed Jul 10 15:36:57 PDT 2013:INFO:Expected Result - Pass Wed Jul 10 15:36:57 PDT 2013:INFO:Number of Rows fetched- 1 Wed Jul 10 15:36:57 PDT 2013:ERROR:Inside Pass Wed Jul 10 15:36:57 PDT 2013:ERROR:Asserted Successfully Wed Jul 10 15:36:57 PDT 2013:INFO:*****Completed checking ODS_HIX_GROUPSETUP_MAINTENANCE***** Wed Jul 10 15:36:57 PDT 2013:INFO:=========================================================== Wed Jul 10 15:36:57 PDT 2013:INFO:*****Checking ODS_HIX_REJECTION***** Wed Jul 10 15:36:57 PDT 2013:INFO:messageID - 1373495814549 Wed Jul 10 15:36:57 PDT 2013:INFO:Number of Rows Fetched - 0 Wed Jul 10 15:36:57 PDT 2013:INFO:Expected Result - Pass Wed Jul 10 15:36:57 PDT 2013:INFO:Inside PAss Wed Jul 10 15:36:57 PDT 2013:INFO:Asserted successfully Wed Jul 10 15:36:57 PDT 2013:INFO:*****Completed checking ODS_HIX_REJECTION***** Wed Jul 10 15:36:57 PDT 2013:INFO:==============================================11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes0CommentsScripted assertions in JDBC Requests - Issue
Hello, I have a test case with 8 steps - Data source, Groovy script, SOAP request, Delay, Groovy script, JDBC request1, JDBC Request2 and Data source loop. In each of the JDBC requests, I have a scripted assertion. I have a strange issue. If in any iteration, if the scripted assertion in any of the JDBC requests fail, In the next iteration, the same test step is marked as Failed though there is no issue and the assertions also pass. The later iterations are fine. If test step 6 fails in iteration 4, the same test step again fails in iteration 5 though all the assertions pass. Following are the scripted assertions in my JDBC Requests. Assertion in JDBC Request 1 - import com.eviware.soapui.support.XmlHolder def holder = new XmlHolder( messageExchange.responseContentAsXml ) def totalRows = holder.getNodeValue('//Results/ResultSet/Row/TOTALROWS') def expectedResult = context.expand( '${GetDataForGM#ExpectedResult}' ) def messageID = context.expand( '${JDBC_Request1#messageID}' ) if (expectedResult == "Pass") { assert totalRows.toInteger() >= 1 } else if (expectedResult == "Fail"){ assert totalRows.toInteger() == 0 } Assertion in JDBC Request 2 - import com.eviware.soapui.support.XmlHolder def holder = new XmlHolder( messageExchange.responseContentAsXml ) def totalRows = holder.getNodeValue('//Results/ResultSet/Row/TOTALROWS') def expectedResult = context.expand( '${GetDataForGM#ExpectedResult}' ) def messageID = context.expand( '${JDBC_Request2#messageID}' ) if (expectedResult == "Pass"){ assert totalRows.toInteger() == 0 } else if (expectedResult == "Fail") { assert totalRows.toInteger() >= 1; } Also wanted to add - This is very random and happens most of the times. sometimes, if I make changes to the scripted assertions like adding a log statement or changing the else if to if statement, it works fine but resurfaces after some time. does this have anything with the cache? Once this issue occurs, it occurs even if I exit soapui Pro and get back in. I posted the same earlier on Community forum too before I dug out my pro login credentials. I apologize.11 years agoPlace ReadyAPI QuestionsReadyAPI Questions8.6KViews0likes14Comments