Contributions
Re: Connection String for Oracle datasource
Hi Ole, From an earlier post i found that we have to specify the url in the following format jdbc:oracle:thin:scott/tiger@10.185.13.128:1521:ora9i I have done the same now in my DataSource jdbc:oracle:thin:FAST/FASTER@10.185.13.128:1521:dtwd but i am getting IO error Tue Mar 11 14:36:49 EDT 2008:ERROR:java.sql.SQLException: Io exception: The Network Adapter could not establish the connection This is not a network issue as I am able to access the DB using a groovy script. def sql = groovy.sql.Sql.newInstance("jdbc:oracle:thin:@10.185.13.128:1571:dtwd", "FAST", "FASTER", "oracle.jdbc.pool.OracleDataSource") Can you please tell me how i can use this sql connection that I have created in the groovy script in the DataSource Step.2.3KViews0likes0CommentsConnection String for Oracle datasource
Hi, I am trying to create an Oracle datasource specifying the following DriverClass oracle.jdbc.pool.OracleDataSource ConnectionString jdbc:oracle:thin:@localhost:1571:dtwd;user=FAST;password=FASTER; It fails giving SQLEXception invalid arguments in call. I think that the ConnectionString format which i have given is incorrect, can you please provide the correct format for the ConnectionString for Oracle. Thanks Tareque5.4KViews0likes3CommentsInvoking TestRunner from web application
Hi, I am creating a web application which will allow users to execute testRunner from a browser. Is there any way this can be achieved? Currently I am using the following piece of code in my Webapplication. This starts a new command window and executes the WebRunnerTestCase. String cmdLine = "cmd /c start testrunner.bat -r -c WebRunnerTestCase D:/soapUIprojects/DBDrivenTest-soapui-project.xml"; Process proc = Runtime.getRuntime().exec(commandLine.toString(), null, soapUIBinDir); The problem with this solution is that if the server is running on some remote system this will not work. Is there any way i can trigger the execution of com.eviware.soapui.SoapUIProTestCaseRunner from a Web Application? Would appreciate any suggestion. Regards T2.4KViews0likes1CommentSetting the query of a JDBC datasource dynamically in TestCase setupScript
Hi, Is it possible to set the query for a JDBC DataSource dynamically through the SetUp script of a TestCase? I have to fetch the query from a DB in the SetUp script and set it in the dataSource which has already been created def dataSource = testRunner.getTestCase().getTestStepByName("DataSource")3KViews0likes2CommentsRe: Adding assertions to TestRequest dynamically using Groovy
Thanks a lot for the code snippet that was what i was looking for. Using the following script I was able to achieve what i was trying to do. def assertionsList = testRunner.getTestCase().getTestStepByName("Test Request").getAssertionList() for( e in assertionsList){ testRunner.getTestCase().getTestStepByName("Test Request").removeAssertion(e) } def testCaseName = testRunner.getTestCase().getTestStepByName("DataSource").getPropertyValue("test_case_name") def assertText = testRunner.getTestCase().getTestStepByName("DataSource").getPropertyValue("assert_text") def assertion = testRunner.getTestCase().getTestStepByName("Test Request").addAssertion("XPath Match") println " \n\n ########## Start TestCase Name " + testCaseName assertion.name = testCaseName assertion.path = assertText assertion.expectedContent = true Thanks once again6.8KViews1like0CommentsRe: Adding assertions to TestRequest dynamically using Groovy
Hi Ole, I am trying to add XPath Match assertion. The api for addAssertion does not take any assertionType parameter, all it takes is a String which I am assuming is the XPath eg: declare namespace ns1='http://nextel.com/ovm'; //ns1:ovm/ns1:ovm-response/ns1:plans-response/ns1:price-plan/ns1:plan-id = 'FF1001H' Regards6.8KViews0likes0CommentsAdding assertions to TestRequest dynamically using Groovy
Hi, I have an urgent requirement in my project which needs to be implemented. The requirement is that all the Input XML and the XPath assertions will be moved to the database. The project file will not have the input XML or assertions in the Test Request. To execute this we have created the following steps. 1. Datasource step to read the request_xml and assertion_text from DB select request_xml, test_case_name, request_id, assert_text from TEST_REQUEST_DATA A, ASSERTIONS_DATA B where A.REQUEST_ID = B.ASSERT_REQUEST_ID 2. Property Transfer step to feed the request_xml property from the DataSource to the TestRequest Step. 3. Groovy Script to add assertions to the Test Request by getting the assertion_text from the DataSource def assertText = testRunner.getTestCase().getTestStepByName("DataSource").getPropertyValue("assert_text") testRunner.getTestCase().getTestStepByName("Test Request").addAssertion(assertText) Step 3 fails giving the following exception 2008-01-22 14:53:29,125 ERROR [errorlog] java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.panels.teststeps.AssertionsPanel$AssertionListModel.addAssertion(AssertionsPanel.java:358) at com.eviware.soapui.impl.wsdl.panels.teststeps.AssertionsPanel$AssertionListModel.assertionAdded(AssertionsPanel.java:350) at com.eviware.soapui.impl.wsdl.support.assertions.AssertionsSupport.fireAssertionAdded(AssertionsSupport.java:135) at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest.addAssertion(WsdlTestRequest.java:187) at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.addAssertion(WsdlTestRequestStep.java:539) at gjdk.com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep_GroovyReflector.invoke(Unknown Source) at groovy.lang.MetaMethod.invoke(MetaMethod.java:115) at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450) at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:119) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187) at Script1.run(Script1.groovy:14) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:59) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:51) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:140) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction.actionPerformed(GroovyScriptStepDesktopPanel My question is: Is it possible to dynamically add assertions to a TestRequest? And if it is could you please point out where I am going wrong. Would appreacite any help with this problem. Best Regards tareque21KViews0likes18CommentsData Driven Test Failing
Hi, I have created a data driven test in soapUI Pro. This test reads XML input from a spreadsheet and submits the request, the response is then validated using XPath assertions. This TestCase is working in soapUI Pro1.7.6 but not in soapUI Pro 2.0. After inspecting the input I noticed that in soapUI Pro 2.0 a header is being inserted in the input XML 2008-01-03T20:35:02.203Z 2008-01-05T00:21:42.203Z Can you advise how we can remove this header so that I do not get the XML validation error that I am getting now because of this header. Regards3.2KViews0likes1Comment