Forum Discussion
nmrao
9 years agoCommunity Hero
I feel that you know well when do you need to use the Groovy Script test step and other have also provided when do they use it.
I would like to add my 2 cents answering / clarifying your question.
- It all depends on the need and do not think that you are not using it(running tests from groovy script step) or missing something.
- Some people use it because of their use case or situation. It does not mean, every body needs to use it in the same way.
- Some people use it though it is not required just because they see some code some where or use it incorrectly / inappropriately. The example link you pointed is correct example for this kind. If you look at answers, 3rd one is mine (luckily happen to be there for the cited example) where it is possible to achieve the same thing (as author of the question wanted) with much lesser code and without needing to run the test step (which your main point in the question) as part of Script Assertion(that means without even needing to have an additional Groovy Script test step).
- Some people run a project or test suite from a groovy script test step of different project and that is not the right way to use it.
- The tool can be used to design your tests and try them. Once the project is ready, use the SOAPUI_HOME/bin/testrunner.bat (.sh) to execute the project from command line.
- Some people have dependency between the projects or suites which is again not the right way. I believe that each test should be independent.
- ChrisA9 years agoContributor
Hello Rao,
You make some good points here, thank you.
Re
- Some people run a project or test suite from a groovy script test step of different project and that is not the right way to use it.
- Some people have dependency between the projects or suites which is again not the right way. I believe that each test should be independent.
I agree, these approaches don't make sense to me, but after seeing a few posts I did wonder whether I was missing out on something useful. My first thoughts were "why would you want to do this?", but after seeing a few simlar posts, I then started thinking "is there a gap in my SoapUI knowledge? should I be exploiting this myself?" But, I couldn't think of practical reason in my test activites why it would be beneficial, so I asked here....
Thank you.