Contributions
Re: Calling and passing values to DataSink from Groovy Script
Hi Vladimir, Thanks for your quick reply! I did try your suggestion, this is almost the solution I want - my main question is: is it possible to preserve output from a test case and load that ouput into another test suite's testcase(DBLogging:datasink)? I want to be able to pass the Data Source and TestRequest output from TestingStuff1 test suite to the Logging TestCase test suite. However, when I try to use the Run TestCase test step to load my TestingStuff1 test suite data it still looking at the LoggingTestCase test suite data, I can see this by looking at the data it's inserting into the DB which does not match the TestRequest(TestingStuff1) output. My goal is to have this LoggingTestCase separated from other test Suites because I need multiple test suites to run the LoggingTestCase test suite and use the Datasink to insert specific logging data into Oracle. This way in the future if I ever need to change the datasink I can do it in one location as opposed to multiple testsuites that all have the datasink cloned. LoggingTestCase <Test Suite> -DBLogging <Test Case> --Run TestCase <Test Step(1)> --Datasink <Test Step(2)> TestingStuff1 <Test Suite> -Test1 <Test Case> --DataSource <Test Step(1)> --TestRequest <Test Step(2)> --GroovyScript <Test Step(3)> Thank you for your time! All help is much appreciated!13 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes0CommentsCalling 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!13 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes4CommentsSoapUI Pro 4.0 Testrunner ClassCastException
Dear Support at Eviware, I hope you are doing well - I am having an issue with Testrunner functionality in SoapUI Pro 4.0. I have a project that I am trying to run from the command line using the Testrunner.bat - within the project itself there is a load script, written in Groovy, that asks the user for the environment they wish to run the project against(i.e. stg, prod, etc). I am seeing an error: java.lang.ClassCastException: com.eviware.soapui.impl.wsdl.WsdlProject cannot be cast to com.eviware.soapui.impl.wsdl.WsdlProjectPro This only started occurring when I tried to run the project with the testrunner.bat when using SoapUI-Pro 4.0 version previously, in SoapUi-Pro 3.6 I was able to run my project from the command line. Initially, I thought the problem might be with my load script, or possibly one of my test cases, so I methodically removed all my test cases and the load script. However, I found that even with the project empty of test cases - I was unable to get past this error. I also had SoapUI-Pro 4.0 generate a brand new soapui-settings.xml file because I thought possibly something in this file could be trying to cast the project as a WsdlProject instead of WsdlProjectPro. I've expanded the logging settings to "Debug" within the soapui-log4j.xml but even with all the extra detail - I cannot seem to find where SoapUI calls com.eviware.soapui.impl.wsdl.WsdlProject. Any suggestions? I've also included the project in it's raw form - with no test cases - I've left the load script - but even when I comment everything out - I still get this error. I've included the error log below. Could you please take a look and let me know what you think? Running soapUI TestRunner for [TESTING] > directory: C:\Program Files\eviware\soapUI-Pro-4.0.0\bin > command: cmd.exe /C testrunner.bat -r -j -fC:\X -RTESTING -FTXT -Gcli_environment=stg -tC:\Users\jalee\soapui-settings.xml C:\Users\jalee\Desktop\TESTING.xml > soapUI Pro 4.0.0 TestCase Runner > 2011-07-11 18:25:33,470 [main] INFO com.eviware.soapui.SoapUIProTestCaseRunner - Setting global property [cli_environment] to [stg] > Configuring log4j from [C:\Program Files\eviware\soapUI-Pro-4.0.0\bin\soapui-log4j.xml] > 18:25:33,739 INFO [SoapUI] Adding [C:\Program Files\eviware\soapUI-Pro-4.0.0\bin\ext\postgresql-8.3-604.jdbc3.jar] to extensions classpath > 18:25:33,740 INFO [SoapUI] Adding [C:\Program Files\eviware\soapUI-Pro-4.0.0\bin\ext\postgresql-8.3-604.jdbc4.jar] to extensions classpath > 18:25:33,740 INFO [SoapUI] Adding [C:\Program Files\eviware\soapUI-Pro-4.0.0\bin\ext\sqljdbc.jar] to extensions classpath > 18:25:34,037 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\jalee\soapui-settings.xml] > 18:25:34,482 INFO [DefaultSoapUICore] Adding listeners from [C:\Program Files\eviware\soapUI-Pro-4.0.0\bin\listeners\demo-listeners.xml] > 18:25:35,351 INFO [WsdlProject] Loaded project from [file:/C:/Users/jalee/Desktop/TESTING.xml] > [null] > 18:25:36,355 INFO [SoapUIProTestCaseRunner] Running soapUI tests in project [TESTING] > 18:25:36,358 ERROR [SoapUIProTestCaseRunner] java.lang.ClassCastException: com.eviware.soapui.impl.wsdl.WsdlProject cannot be cast to com.eviware.soapui.impl.wsdl.WsdlProjectPro > 18:25:36,358 ERROR [SoapUI] An error occured [com.eviware.soapui.impl.wsdl.WsdlProject cannot be cast to com.eviware.soapui.impl.wsdl.WsdlProjectPro], see error log for details > java.lang.ClassCastException: com.eviware.soapui.impl.wsdl.WsdlProject cannot be cast to com.eviware.soapui.impl.wsdl.WsdlProjectPro > at com.eviware.soapui.SoapUIProTestCaseRunner.runProject(SourceFile:184) > at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:384) > at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:151) > at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:86) > at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:48) Thank you for your time!13 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.1KViews0likes0CommentsRemote Script Library
We keep our soapUI projects in SVN. Users of them import them as a remote project and execute tests as needed. This is good because when a change is made to the project (new test,fixed testing issue, etc), the committed changes are propagated out very easily. I'd like to use Groovy classes in these tests as some of the scripts are getting a bit long, but I don't know of an "automatic" way to have committed Groovy classes also propagate out. If there such a thing a "remote script library"? Thanks for any pointers. -steve13 years agoPlace ReadyAPI QuestionsReadyAPI Questions958Views0likes0Comments