Building awesome frameworks in SoapUI !
We have build an awesome framework in SoapUI using heavy groovy scripting. Since much of it was learned over time from internet, we feel its our time to show our gratitude and give back to community.
What we have found is you can pretty much achieve anything and everything that you need in your project, using Groovy scripting.
In this thread, I will share some of the cool things we achieved and some tips-tricks/code snippets to get you interested in exploring the power of groovy. I would also like to invite you to share your tips-tricks-questions in comments below. So here are some of the elements of our framework:
- Achieving data driven framework to run any number of input files in one run.
- Reading input files from external files and parse them into web service requests for each run.
- Ability to capture results of each script and store them in external log files.
- Ability to pass variables/list/arrays across multiple scripts (without use of inbuilt transfer variables).
- Ability to do all assertions in the code (without use of inbuilt assertions).
- Ability to assert xml input/outputs with real time database values (DB2/tandem/Oracle)
- Ability to trigger ftp tools via command line.
- Ability to invoke excel macros via command line.
- Able to trigger mainframe macros and submit jobs from Command line.
- Reading ini files to keep sensitive ID/PWD information separate from framework.
- Run time test folders creation to store test results for each run based on a TC name/date timestamp.
- and much more...
If you are curious to know more about any of these aspects, do let know in comments below. If you have some tricks up your sleeve, I will be happy to learn them from you. If you have a problem statement bothering you and you see similarities above, do ask here. May be I or someone in community have an answer?
Happy learning!
Regards Pramod
P.S: Special thanks to Mr @nmrao , who made my initial experience here in this community a memorable ones (when I started somewhere last year). Although we have only few questions to and fro, but you truly are doing a remarkable work helping folks in need :). Thank you.