Contributions
NullPointerException for running threads with 'Run TestCase' step
I am using SoapUI Basic 5.2.1 for testing SOAP APIs using threads to call 'Run TestCase' step through groovy script . I got a test case (Primary) where I have written a groovy script for data reading through external file, reading each row and setting it into properties of 'Run TestCase' step in my primary test case. 'Run TestCase' step executes target testcase which contains certain SOAP requests.I am using threads from ExecutorService to call target test case and 'Run TestCase' step is set to execute it with isolated copy for each run through its setting. During execution i see some of my threads miss to log output from my target test case and I get an exception which doesn't provide any message or stacktrace . Within my thread process i am using 'testRunner.runTestStepByName("Run TargetTestCase") ' to execute. I referred in community posts for any such concerns but didn't get any satisfactory results. I tried various options of executing this but all ends up with same issue. I checked with previous versions of SoapUI to see if issue is pre-existing and i see same issue in those as well. Surprisingly i got related error log with v5.1.3 as given below. Please let me know if we can get it sorted out. Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyBeforeRun(AbstractTestCaseRunner.java:296) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:111) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyBeforeRun(AbstractTestCaseRunner.java:296) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:111) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyAfterRun(AbstractTestCaseRunner.java:279) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:176) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Wed Jun 15 15:20:47 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.setVariable(SoapUIGroovyScriptEngine.java:147) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.runTearDownScript(WsdlTestCase.java:894) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTearDownScripts(AbstractTestCaseRunner.java:186) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:171) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Thanks,916Views0likes0CommentsRe: JDBC connectivity to SQL Azure using SoapUI Basic.
OK.. So I was able to figure out what happened here. While running through suite leveli got this error- TestCase failed [java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver : Unsupported major.minor version 52.0:java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver : Unsupported major.minor version 52.0], time taken = 0 So, I used an older version of SoapUI 5.1.3 instead of 5.2.0 , along with JDBC driver of version 4.1 instead of 4.2 and it worked :) Thanks, Arun2.6KViews1like0CommentsJDBC connectivity to SQL Azure using SoapUI Basic.
Hi , This is regarding JDBC connectivity to SQL Azure using SoapUI Basic. I was referring to Azure site to get the relevant driver and connection string. (https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-java-simple-windows/) . I downloaded SQLJDBC driver (version4.2) and added its jar to ext folder of SoapUI . For my SoapUI project i added a JDBC step with driver (com.microsoft.sqlserver.jdbc.SQLServerDriver) and connection string (jdbc:sqlserver://<myServer>.database.windows.net:1433;database=<mydatabase>;user=<myusername>;password=<mypassword>;encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30; ). My machine's port 1433 is open to make such communication. I am able to make connection through my eclipse editor using same string but this is not working through my SoapUI JDBC step or script step . I am neither able to see any error or logs for this , neither able to track any such TCP message sent through my machine. Can you please suggest if I am missing out anything here. Thanks, ArunSolved2.6KViews0likes1Comment