Contributions
Re: logging from Teardown script?
This questionwas posteda long time ago and the issue has probably been resolved since. Anyway,since it'squite on top on Google, it deserves an answer... SoapUI turns off logging during the load test (and probably other test items as well) as all the messages could be overwhelming and decreasing the test performance. What it literally does is calling the following on the groovy logger: log.setLevel(Level.OFF); After atest item finishes (project, test suite or test case), logging should be turned on again. But it looks like teardown iscalled as soon as thelast sub-item has been started (at least with the load test), but at that moment some time demandingtestmight still be running, sothe teardown logwon't bevisible. In order to turn it back on already during teardown, you only have to set the level to INFO again at the beginning of the teardown script: log.setLevel(org.apache.log4j.Level.INFO) Note thatlog entries from the still running test might appear as well, since the groovy logger is shared accross groovy scripts. Seesimilar questionfor more...953Views0likes0CommentsRun isolated test case copy in groovy
I have amodular test suite withparameterizable test cases. When referencing a test case (SON) using "Run TestCase" test step in another test case (MOM), I canoverride theproperties to be used with theSON test case, and after finishing, I can extract the properties from the SON test case to the test step scope of the MOM test case, andreference them in other test steps later. All that without actually modyfing the primary test case's properties, using an isolated copy instead. Now I'm trying to perform a load test, where some of these test cases are used using the "Run TestCase" steps, but I need to executesome other ones before the load test (in Setup script) and after it (in Teardown script).I know how to run a test case using therunmethod, but I cannot find a way how to create an isolated copy ofthe SON test case, set its properties before executingandextract them after finishing, the same way the "Run TestCase" test step does in "Isolated copy" run mode.Solved2.1KViews0likes2CommentsRe: Transferring a property within a "Run TestCase" step is successful but is not stored anywhere?
I am not sure whether this would always work. As long as I understand, this would work if the SON test case would run in primary mode. But when using isolated mode (i.e. a copy of the test case is being run), the properties are being transferred to the SON test case copy, but they do not overwrite the values in the primary test case, which are eventually being left unchanged and stay the same even after the "Run TestCase" test step finishes. I did not try it myself though. However, there are other means of gettingthe result properties from the SON test case in any mode. In the "Run TestCase" test step under options the user can specify, which properties should be extracted and returned (only propertiesalready declared in the SON test case are available, propertiescreated in underlying groovy scripts need to be created in advance). After the SON test case finished, the selected properties will be copied to the scope of the test step (bot not to MOM test case scope). There is also an additional option to NOT copy empty properties, which can come in handy if you rather want to keep the previous property value in the test step scope instead of it being overwritten by an empty string. Once the "Run TestCase" test step finishes and the properties from the SON test case are extracted to the test step scope, you can reference later them in a REST request, or when passing to another SON test case, etc., using ${Test Step Name#propertyName} This works also in groovy using the context.expand function.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes0Comments