Reading excel column into property, parsing REST response for property member
In a test case, I have a data source step. It reads a column range into a property. When I run the step, the data log shows each row from the desired column range. I have a REST request after data step. I would like to make assertions to the response to check that each row member of the property from the data step appears in the response. This does not need to be directly checking items in the same index, as the order may change. I want to check only that each item from data property is in the JSON response.Solved2.4KViews0likes8CommentsProperty transfer from an html response
I have a test step of type http request and want now to extract from the resulting response an html value. Therefore I have created another test step of type "Property Transfer" which contains an XPATH query that I have tested with another tool, so the XPath is ok. Furthermore I have validated the html response which also seems to be valid xml (although the document starts with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> which is an unclosed tag) So, my question is: Is it possible to do a a property transfer from an html response using xpath?768Views0likes1CommentHow to use properties from external file in automatically run SOAP UI tests?
How to use properties from external file in automatically run SOAP UI tests? Hello community, I want to keep my Web Service username and password separately from SOAP UI Test XML file. So, I save username and password as custom properties in external file called properties.xml. But the problem is that after I manually import the property values (defined on the project level) and save the test, the values are added to the test XML file distinctly. So, anybody who will open the test XML file after me, will be able to read the username and password in my property values. Which I do not want. Inside the test XML file it looks like this: <con:name>USERNAME</con:name><con:value>!MYUSERNAMEVALUE</con:value></con:property><con:property><con:name>PASSWORD</con:name><con:value>!MYPASSWORD</con:value> Can I use reference to my username and password through the external file properties.xml, while automatically running the test, but not show values in test XML? I thought this configuration would work: <con:name>USERN</con:name><con:value>${projectDir\properties#USERNAME}</con:value></con:property><con:property><con:name>PASSWORD</con:name><con:value>${projectDir\properties#PASSWORD}</con:value> or this one: <con:name>USERN</con:name><con:value>${projectDir\properties.xml#USERNAME}</con:value></con:property><con:property><con:name>PASSWORD</con:name><con:value>${projectDir\properties.xml#PASSWORD}</con:value> But they are not resolving the propertiy values correctly. Please help. Thank you!1.1KViews0likes2CommentsRequest Not Modified
I need to test multiple requests in a same testcase.Below Steps have been followed to achieve this. Declared Property at Testsuite Level (eg. Number 1,2,3) Split those values and set the property in Property Step level. So each time during the iteration the property at Property Step will change. Then run the request. But the issue i am facing is, the property at PropertyStep gets updated for every iteration. But the values is not passed to the request. This is my code. ef number = testRunner.testCase.testSuite.getPropertyValue( "number" ) String[] nu = number.split(",") for (int i=0;i<nu.size();i++) { nums=nu[i] testRunner.testCase.testSteps["Prop"].setPropertyValue( "number",nums ) def prop = testRunner.testCase.testSteps["Prop"].getPropertyValue( "number" ) log.info prop def Response = "" Response = testRunner.testCase.testSteps["request1"].testRequest.response.contentAsString log.info Response def file = new PrintWriter ("C:\\Users\\Laksh\\PycharmProjects\\BRMCODE\\response_"+i+".xml") file.println(Response) file.close() }Solved1.9KViews0likes2CommentsTransfer property to aplication/x-www-urlencoded request
Hi, I've created a test suite which contains a test case. 1. I am calling an API that returns in it's response a clientId. eg. /api/v1/getClients 2. I am retrieving that clientId and use it to call another API, e.g /api/v1/client/{clientId} 3. The API from point 2 is returning accountNumber 4. I am trying to call another API (eg. api/v1/client/getAccount ) where I need to pass the accountNumber in the payload of the request, but the payload needs to be inapplication/x-www-form-urlencoded format : accountNumber=abc123¤cy=USD&country=US I am failing in transfering the retrieved accountNumber into the payload. Any ideas? Thank you!Solved1.4KViews0likes2Commentsjson block as a property value
Is it possible to have a json block as my property value? { "firstName": "John", "lastName" : "doe", "age" : 26, "address" : { "streetAddress": "naist street", "city" : "Nara", "postalCode" : "630-0192" } I tried it by making it a single line and it worked. However, when it comes to large json data, it will be very hard to maintain it.Solved5.1KViews0likes8Comments