Starting & stopping soapui mock service through groovy script

If you want to automatize starting and stopping mock services while executing a test case in soapui you might consider following code: script setup: def project = null def projectName = “myproject” def workspace = testRunner.testCase.testSuite.project.getWorkspace(); //if running Soapui if(workspace != null){ project = workspace.getProjectByName(projectName) } else { log.error(“Can’t find workspace”) } if (project != […]

SOAPUI jdbc test step …

In order to connect to sql server and execute arbitrary sql you must do following:

  1. Obtain and copy jtds-1.3.1.jar file to  soapui\bin\ext folder (C:\Program Files\SmartBear\SoapUI-5.3.0\bin\ext)
  2. Optional but handy step is to create a global properties file (dictionary) and specify database connection user and password, like this:
    JDBC_CONNECTION_STRING=jdbc:jtds:sqlserver://localhost/yourdatabase
    DBUSER=user
    DBPASS=password
  3. Load global properties by going to SOAPUI preferences and load before saved global properties file:
    soapui_global_properties
  4. Set the driver: net.sourceforge.jtds.jdbc.Driver
  5. Set the connection referencing global properties: ${#Global#JDBC_CONNECTION_STRING};user=${#Global#DBUSER};password=${#Global#DBPASS}
  6. Write some sql and that’s it!

jdbc_soapui

Debugging WCF

<system.diagnostics>
<sources>
<source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true”>
<listeners>
<add name=”traceListener” type=”System.Diagnostics.XmlWriterTraceListener” initializeData=”….path\Trace.svclog”/>
</listeners>
</source>
</sources>
</system.diagnostics>