We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
1. Like it was mentioned earlier, you don't load from properties step
2. Please see the attached screen shot.
- Test case has custom property DATA_FILE where you provide the property file name
- In the setup script, use code from below script
https://github.com/nmrao/soapUIGroovyScripts/blob/master/groovy/testCaseSetup/LoadPropertiesFromFile.groovy
- You always run the test case (not individual test step, specially when property file content is changed)
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,
Linda
1. Like it was mentioned earlier, you don't load from properties step
2. Please see the attached screen shot.
- Test case has custom property DATA_FILE where you provide the property file name
- In the setup script, use code from below script
https://github.com/nmrao/soapUIGroovyScripts/blob/master/groovy/testCaseSetup/LoadPropertiesFromFile.groovy
- You always run the test case (not individual test step, specially when property file content is changed)
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!
Linda