Contributions
Re: Need to pass REST parameters from a file
Hi Rao, That worked! You rock. I know you said to remove the properties step before and I did remove it, but added it back later because it was the only step I could see that loaded the values from the file. The DATA_FILE custom property did the trick, and even though it uses code it does not look like it has to be exposed to any users. Thanks so much for your patience and perseverance! Linda1.8KViews0likes1CommentRe: Need to pass REST parameters from a file
I thought I answered the previous questions sorry if you did not receive them. Here they are: 1. How did you load the properties from file first time? The first time I loaded them was in the Properties step as Custom properties and I indicated the values came from an external file. Going forward I am executing a Properties step in the test case and pointing to the same external file. 2. Isn't this test uses always the same data file? Yes the file name and location is the same but the content of the external file changes each time I execute the test case. 3. How does the current data file looks like? See attached Word document. 4. Are you looking for data driven tests? No, not in the sense of needing to loop inside the test case. I am replacing the content of the external file prior to executing the test case. Other things have to happen in the application before the request is made, so the file is created new each time. I appreciate the script example but this project will be passed to business analysts who are not comfortable with writing or maintaining script code. I'm glad to hear it is possible to load the properties. I am using the Load properties step, is that the correct way? However when I do this and execute the test case the property values are not passed to the subsequent request. I have attached screen shots of each editor and step. If you can identify what I am doing incorrectly I will gladly correct this. Since I have been trying to make this work for almost three weeks I am under pressure from my project team to find a different solution, so any help would be greatly appreciated. Thanks, Linda1.9KViews0likes3CommentsRe: Need to pass REST parameters from a file
Hi Rao, If it is not possible to load properties and pass them to a REST parameter from a file during test case execution (as opposed to from the UI) then just let me know and we will look for another solution. Thanks for all your help and patience. Linda1.9KViews0likes5CommentsRe: Need to pass REST parameters from a file
Hi Rao, I made the changes you requested and it solved half the problem. The properties are now being substituted in the method (yay!), but the properties are not being refreshed from the file each time I run the test case. I need to submit multiple requests and I have an automated Worksoft script that will create a file containing the properties values, then execute my SOAP UI test case, then replace the file with new values and repeat. Let me ask it this way: where do I specify that the param values are to be loaded from an external file? And at what point in the test case execution are they loaded from the file? And how do I specify that they are to be loaded again for each execution of the test case? I was able to use this approach with a non-REST project and it worked well. I just used a project variable in the request that I reloaded with an external file containing the request XML. But for some reason I can't get the same concept to work with REST. You have been very patient and helpful and I appreciate it, but I just need to get to the goal. Thanks for any help. Linda1.9KViews0likes7CommentsRe: Need to pass REST parameters from a file
Thanks Rao. I did read the links, more than once. I referenced scripting because the link has scripting examples at the end. Can you identify any errors in the screen shots I sent you that would explain why the properties are not being passed? Please don't give up on me! Thanks, Linda2.8KViews0likes9CommentsRe: Need to pass REST parameters from a file
Thanks Rao. I must not be using them right. I am new to REST so not completely familiar with where the custom properties need to be included so they will pass as parameters. I have attached a set of screen shots with the flow. I am getting the right property values loaded but they are still not being passed to the request. Just FYI I am staying away from scripting because this project will be handed off to BAs who are not comfortable with script code. They can get around in SOAP UI and they can create the properties external file. I have done normal web services using custom properties in the past (you helped me then too, thanks) and it worked fine so it seems it should work here too. As always, appreciate all of your patient and kind help. Linda2.9KViews0likes11CommentsRe: Need to pass REST parameters from a file
Sorry for the delay in responding. I have attached the file. It seems to be working because the step that loads the parameters from the file is showing the correct values. They are just not being passed to step 2.. Step 3 is transferring the response to a custom project property that I use in my integration with my test tool.2.9KViews0likes13CommentsNeed to pass REST parameters from a file
I have a REST API that has three parameters in the URL. http://myservice.it.com:8080/data/inventory/generateItemInventory?item=&bin=&itemCount=&itemSize= I have defined the three parameters at the Resource level. I have a GET method that does not contain the parameters. My test case has three steps: Load Parameter Properties and I have specified the file containing the properties Set Item request which references the resource and method. Each parameter is a Query style at the Resource level Property Transfer which transfers the response to a custom Project property What's happening is that while the Load Parameter Properties step is working (the values are being set from the file) the Set Item request is failing because it says the parameters are missing. I don;t understand why the parameter values are not neing passed to the request? Any help appreciated! Thanks,LindaSolved4KViews0likes17CommentsLoading Property Values Dynamically from a File
I need to load a section of my request dynamically each time. I created a property at the test case level called Message ( ${#TestCase#Message} ) and added a Property step that is supposed to read the value from a file. There are 3 steps in my test case: Load the Message property (the value of the property is defined in the file) Execute the request (inserts the property value into the request) Property Transfer (returns the response status) The request has the property name substituted for the dynamic section.However the value is not read when I execute the test case, it only contains the value from when I manually execute from the Property step editor. It merges the property request into the request just fine, and the property transfer is also working, but the value is static and not dynamically loaded. How do I get it to update the property value every time I execute the test case? I am using an external tool that interfaces with SOAP UI so I want to stay away from scripting, just want to use standard SOAP UI steps. Screen shots attached, any and all help greatly appreciated!Solved1.5KViews0likes1Comment