Contributions
Speed of groovyutils.getXmlHolder
Hi I'm using getxmlholder method to read the response data and insert into sql server database. Everything is working fine until I tried to run the same for a response which has hundreds of data which needs to be read from the response xml using getNodeValue and the Xpath of the field. This is very slow and it takes an long time to read the xml node value and insert the same. Is there an efficient way to do this? Sorry the question is vague, but I have couple thousand iteration of the same to perform using different sessions. I expected this should take about 30 minutes or so, but now for 250 sessions it took more than 3 hours. Thanks a appreciate your time! Please let me know if you need any other information -Sanjeev13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1CommentRe: [SOLVED]Property Transfer - Command Line - DataGeneration
Also when I use the "TestRunner" I see the datagenation step works for the first time and doesn't for the subsequent runs. Could someone please look into it ? Thanks! Sanjeev13 years agoPlace ReadyAPI QuestionsReadyAPI Questions760Views0likes0Comments[SOLVED]Property Transfer - Command Line - DataGeneration
Hi - Below is my usecase 1) I have a data generation step to Increment an integer 2) Transfer the value to a TestSuite Property 3) Use the TestSuite property in TestCase1 by transferring to to a property inside the testcase1 4) Use the same testsuite property in TestCase2 by transferring to a property inside testcase2 Above steps works fine as long as I run from the IDE When I run from command line, propery values doesn't get incremented. Since I'm generating the value inside the testcase, thought I don't need to pass the propery value in the command line. Is that correct? Not sure if I'm doing something wrong. Appreciate if you can point out anything I missed. Thanks! Sanjeev13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes3CommentsReporting - Data from JDBC Table
Hi - I'm looking into ways to include the result of a sql query in the report. The final PDF report should contain the result set of a sql select statement. Could someone please let me know if this is doable? Thanks! Sanjeev13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes1CommentDatasource loop groovy
Hi - I have a "datasource" and "datasource loop" step and all other steps in between those two. My datasource contains multiple rows. Is there a way to find when I'm looping through the 1st row and the last row. I have to process something during the 1st row ( run_id which increments only once during a run) and run a stored procedure at the end of the run (runs after it completes processing all the rows in the datasource) Appreciate your time.. Thanks! Sanjeev13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes1CommentRe: Best approach for version compatibitliy testing
Hi Henrik Can't you send requests to both versions in two subsequent TestSteps and comparing them on the fly? That's great. I never thought that way. I still had to store the response in the database. So I chose the 2nd method. Added two columns - run_id and version. run_id increments for each run. I send the same request for two different versions, capture the required response, use a stored procedure to compare the rows of two versions with the same run_id and write the result to another table. May be all of the above could have been done with groovy, but thought of using sql to do the heavy lifting. Is there a way to read the results table (which will contain the failed cases ) and populate in the report? Your tip helped me move forward with this. Thanks. -Sanjeev14 years agoPlace ReadyAPI QuestionsReadyAPI Questions586Views0likes0CommentsBest approach for version compatibitliy testing
Hi- I would like to know any suggestions/comments about the best way to perform version compatibility testing for the below scenario. I want to pass in the same input for different versions of the same webservice, to make sure if doesn't break any old functionality or returning a wrong value. Expected value is captured using Run 1. Run 1 : Web service version 1 Step 1: Get input values from datasource Step 2: Send a request and validate the response Step 3: Groovy script. Count number of nodes return. Insert the response values for each node to a sql database. Each response produces "n" number of rows and "k" columns Step 4: DataLoop - has "m" rows At the end of the run1, my sql table has "n X m" rows containing "k" columns each. Run 2: web service version 2 I would like to use the same input values from the datasource and perform Step 1 and Step2. Now my question is 1) Do I create a subreport instead of step 2 and compare the response against the db values captured from run1? 2) Do I write it to another sql table and then create another step to validate one table against another? If choice 1, I would have to compare "k" columns for "n X m" number of rows. Is it possible to perform that using groovy script? I have no idea how to deal with solution 2. Appreciate if someone had dealt with the same kind of scenario before and would like to give me some suggestion. Thanks! Sanjeev14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes2CommentsRe: Count number of child nodes
Ah never mind, figured that out. Just had to do some trial and error treesize = holder.getNodeValues("//ns1:GetPositionsAggregateResponse[1]/ns1:GetPositionsAggregateResult[1]/a:AccountPositions[1]/a:Securities[1]/count(*)")14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes0CommentsCount number of child nodes
How to find the number of child nodes in a xml node. For example : I can find the number of child nodes using xmlslurper() the below way. def path = new XmlSlurper().parse(new File('C://SoapUI//ResponseXML/Response.xml')) NumberOfPositions = path.Body.GetPositionsAggregateResponse.GetPositionsAggregateResult.AccountPositions.Securities.Positions.children().size() I'm able to get the value using "holder" (groovyutils.getxmlholder) with the below code. positionid1 = holder.getNodeValue("//ns1:GetPositionsAggregateResponse[1]/ns1:GetPositionsAggregateResult[1]/a:AccountPositions[1]/a:Securities[1]/a:Positions[1]/a:PositionSummary[1]/a:Legs[1]/a:PositionAggregate[1]/a:PositionID[1]") log.info ("$positionid1") Could you please let me know how to get the number of child nodes using the holder? Thanks! Sanjeev14 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.8KViews0likes1Comment