PaulDonny
11 years agoRegular Contributor
Testing Automation with SoapUI Open SOurce
So I am on route to automate some testing with SoapUI Open Source.
Currently the way I am performing this is using property files in order to determine the values for each run, randomizing data that would need to be randomized, and then going through the steps of the test using groovy as a controller.
I was wondering if anyone had any experience with this and if so, what methods are you taking to perform such actions?
I know that SoapUI is not exactly designed to do this but it seems like a powerful enough tool to be able to perform the actions I require for it.
My current set up:
Groovy Test Step runs and launches a customized UI
User selects property files to run
Groovy randomizes the data in the property and stores everything into a <String,String> map
Groovy checks if test step should be ran using flags in the property file
If so, it enables the test step and reads the XML from the test step, it parses the XML using regex and replaces tags within the XML with values in the property map (The tags in the XML is just the key to the property map)
Groovy takes the parsed XML and stores it to a temporary property
Groovy deletes all assertions from my "Runner" step (The only step in the test case that ever actually runs)
Groovy places all assertions from the currently selected test step into the "Runner" step
Groovy runs the Runner step and checks the assertion
If the assertion fails, groovy asks the user to edit the input XML and try again, if not fail the TC
Drawbacks that I am finding from this method:
My assertions will often pass until it is well after the test step that actually failed.
I use a java controlled system which launches the system at times (The property files are made by a UI that I made as well that just passes it to SoapUI) which means 2 different sources to maintain in 2 different (similar) languages
My other idea is:
Write code in Java to just create the entire SoapUI project and then launch it. This will be 'easier' to maintain since I could encapsulate everything into a single source.
Any suggestions/comments?
Currently the way I am performing this is using property files in order to determine the values for each run, randomizing data that would need to be randomized, and then going through the steps of the test using groovy as a controller.
I was wondering if anyone had any experience with this and if so, what methods are you taking to perform such actions?
I know that SoapUI is not exactly designed to do this but it seems like a powerful enough tool to be able to perform the actions I require for it.
My current set up:
Groovy Test Step runs and launches a customized UI
User selects property files to run
Groovy randomizes the data in the property and stores everything into a <String,String> map
Groovy checks if test step should be ran using flags in the property file
If so, it enables the test step and reads the XML from the test step, it parses the XML using regex and replaces tags within the XML with values in the property map (The tags in the XML is just the key to the property map)
Groovy takes the parsed XML and stores it to a temporary property
Groovy deletes all assertions from my "Runner" step (The only step in the test case that ever actually runs)
Groovy places all assertions from the currently selected test step into the "Runner" step
Groovy runs the Runner step and checks the assertion
If the assertion fails, groovy asks the user to edit the input XML and try again, if not fail the TC
Drawbacks that I am finding from this method:
My assertions will often pass until it is well after the test step that actually failed.
I use a java controlled system which launches the system at times (The property files are made by a UI that I made as well that just passes it to SoapUI) which means 2 different sources to maintain in 2 different (similar) languages
My other idea is:
Write code in Java to just create the entire SoapUI project and then launch it. This will be 'easier' to maintain since I could encapsulate everything into a single source.
Any suggestions/comments?