sfosdal
13 years agoOccasional Contributor
Calling and passing values to DataSink from Groovy Script
Hello,
I hope you are doing well! I am trying to run a test case that will call another test case, which will only contain a datasink test step to insert values in a oracle database.
So the test suite structure setup looks something like this:
LoggingTestCase <Test Suite>
-DBLogging <Test Case>
--Datasink <Test Step(1)>
TestingStuff1
-Test1
--DataSource
--TestRequest
--GroovyScript
Within the GroovyScript - I call the DataSink from within the DBLogging testcase.
Below code
-------------------------------------------------------------------------
def loggingTestCase = testRunner.testCase.testSuite.project.testSuites["LoggingTestCase"].testCases["DB Logging"]
def runner = loggingTestCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false)
The groovy script executes accordingly and the Datasink is run however it is unable to insert data correctly because it is unable to see data from my TestingStuff test suite.
I need to preserve the DataSource and TestRequest output from the Test1 test case (within the TestingStuff1 test suite). Could you please explain how I can pass the values from the TestingStuff test suite to the LoggingTestCase test suite so the datasink will work with the values from the TestingStuff test suite?
Thanks and hopefully this explanation makes sense.
Thanks!
I hope you are doing well! I am trying to run a test case that will call another test case, which will only contain a datasink test step to insert values in a oracle database.
So the test suite structure setup looks something like this:
LoggingTestCase <Test Suite>
-DBLogging <Test Case>
--Datasink <Test Step(1)>
TestingStuff1
-Test1
--DataSource
--TestRequest
--GroovyScript
Within the GroovyScript - I call the DataSink from within the DBLogging testcase.
Below code
-------------------------------------------------------------------------
def loggingTestCase = testRunner.testCase.testSuite.project.testSuites["LoggingTestCase"].testCases["DB Logging"]
def runner = loggingTestCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false)
The groovy script executes accordingly and the Datasink is run however it is unable to insert data correctly because it is unable to see data from my TestingStuff test suite.
I need to preserve the DataSource and TestRequest output from the Test1 test case (within the TestingStuff1 test suite). Could you please explain how I can pass the values from the TestingStuff test suite to the LoggingTestCase test suite so the datasink will work with the values from the TestingStuff test suite?
Thanks and hopefully this explanation makes sense.
Thanks!