Contributions
Assertions Pass in Test Case but Fail in Load Test
Hello. I am trying to create a Load Test from a Test Case, and the assertion that I used successfully in the test case fails in the Load Test. My test case is fairly straight forward. Step 1 is Data Source retrieval from XML. Step 2 makes the Soap call. Step 3 runs the assertions. Step 4 is the data source loop. When running in load test, the error is Xpath Match Failed. Not sure why it is successful in test case but fails in load. This is the assertion I am using: Declare declare namespace com="http://oss.companyname.com/xsd/service/Common/CommonServiceMsg"; //res Expected Result <res IsSuccess="true" xmlns:com="http://oss.companyname.com/xsd/service/Common/CommonServiceMsg" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <exception> <errorCode xsi:nil="true"/> <errorDescription xsi:nil="true"/> <errorType xsi:nil="true"/> <errorShortDescription xsi:nil="true"/> <errorBusinessDescription xsi:nil="true"/> <errorStack xsi:nil="true"/> </exception> </res>11 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews1like1CommentRe: [Res]Using a Property Transfer Value in Data Source Query
Thank you very much. I used this and it works well! def box = context.expand( '${GetBoxNum#Box}' ) box = "'%$box%'" // manipulate the string testRunner.testCase.setPropertyValue( "boxWithPercentageSigns", box) // store as a TestCase Property11 years agoPlace ReadyAPI QuestionsReadyAPI Questions845Views0likes0Comments[Res]Using a Property Transfer Value in Data Source Query
I would like to use a value obtained in a Property Transfer step in a Data Source but the query directly inserts the value. It looks like this: Select count(*) From odsmgr.boxinvtry @odsp Where BNUMB Like ${GetBoxNum#Box} ${GetBoxNum#Box} is interpreted as "SASJH1656" and so the query tries to run as: Select count(*) From odsmgr.boxinvtry @odsp Where BNUMB Like "SASJH1656" and returns an error invalid identifier. If I go to the properties step where the value is stored from the transfer and update from SASJH1656 to '%SASJH1656%', the query runs fine. Is there a syntax I can use in the query to use this value and encapsulate in '%...%' or might I need some Groovy script to perform string manipulation? Thank you.11 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes2Comments