soapui

XPATH Dispatch in SoapUI Mock service/ Mock operation

风流意气都作罢 提交于 2019-12-07 18:54:56
问题 I am new in SoapUI, and was trying to understand the use of XPATH dispatch for a mock operation in a mock service. Here is what I have done so far Created a mock service for a calculator Added mock operation substract Following is a sample request for the operation <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cal="http://www.parasoft.com/wsdl/calculator/"> <soapenv:Header/> <soapenv:Body> <cal:subtract> <cal:x>1</cal:x> <cal:y>1</cal:y> </cal:subtract> <

SoapUI mocking asynchronous services

孤人 提交于 2019-12-07 13:57:25
问题 We use SoapUI to mock web services to test our application (APP) before we have access to real webservices. Creating a synchronous Mock Service which will return predefined response is straightforward. However I have to mock some asynchronous services where the APP sends a request, the SoapUI immediately responds back with confirmation (e.g. SUCCESS) and then after a predefined interval the SoapUI will call our application back (the APP is then acting as a server). I managed to do it using

SOAPUI - SOAPRequest - Expand properties to access name property of current TestStep

假装没事ソ 提交于 2019-12-07 12:08:46
问题 SoapUI provides a common syntax to dynamically insert properties in SOAP Request. In their documentation they explain how to access different properties depends on property scope: #Project# - references a Project property #TestSuite# - references a TestSuite property in the containing TestSuite #TestCase# - references a TestCase property in the containing TestCase #MockService# - references a MockService property in the containing MockService #Global# - references a global property (optional)

How to import existing SOAP request messages to SoapUI?

▼魔方 西西 提交于 2019-12-07 11:48:02
问题 I have a bunch of SOAP request messages in XML format. Is there a way to import them to a SoapUI project? I want to import them and add as "Test Request" Test Step to an existing Test Case. 回答1: An easy and more automatic way to do so is using a groovy script to automatically create the testStep request from a directory where you have you xml request files: Create a TestCase manually. Add an empty TestStep request which we will use as a template to create the other requests. Add a groovy

Integrating SoapUI with JUnit

孤街醉人 提交于 2019-12-07 11:01:06
问题 I am trying to integrate SoapUI into my preexisting JUnit tests. I have created a test in SoapUI 3.6.1. It works. My next step is to apply it to my development environment. In my Eclipse project I have added the jar to my classpath. I also created the following test. public class TestMySoapUICase { @Test public void testCase() throws Exception { SoapUITestCaseRunner runner = new SoapUITestCaseRunner(); runner.setProjectFile( "test/java/com/path/Test-soapui-project.xml" ); runner.run(); } }

Get text value from xml in soapui groovy script

感情迁移 提交于 2019-12-07 10:29:43
问题 My task is get value from xml in soapui to create next test in a sequence. I use groovy script My target is get text inside tag. It's easy to recognize becouse it's base64 encoded string. def project = testRunner.testCase.testSuite.project ; def tcase = project.testSuites["ChangeRetentionByCopyDemoSuite"].testCases["Milestone2"] ; def tstep = tcase.getTestStepByName("getDocuments - GetContentURLRequest"); def responseTestSuite1 = tstep.getPropertyValue("response"); log.info(responseTestSuite1

soapUI access MS SQL DB from groovy script

可紊 提交于 2019-12-07 08:25:21
问题 I am trying to connect to MS Sql 2005 DB from SoapUI using Groovy script. import groovy.sql.Sql sql = Sql.newInstance("jdbc:jtds:sqlserver://servername\\inst1/databaseName", "username", "password", "com.microsoft.sqlserver.jdbc.SQLServerDriver") Error: No suitable driver found for jdbc:jtds:sqlserver://32esx802\inst1/tlMain I have tried to use "net.sourceforge.jtds.jdbc.Driver" but i still get the same error Please let me know what i am doing wrong. Thanks 回答1: Found the answer first remove

Create groovy script for run REST request

巧了我就是萌 提交于 2019-12-06 20:30:28
I have a task to create groovy script which will run REST request and setup property. I setup property by script: testRunner.testCase.setPropertyValue( "ScriptProFrom", "BIF" ) testRunner.testCase.setPropertyValue( "ScriptProTo", "STD" ) But I can't find how to run REST request. I tried to do it like this: myInterface = (RestService) testRunner.testCase.testSuite.project.getInterfaceByName("http://www.webservicex.net") myOperation = myInterface.getOperationByName("ConversionRate") myRequest = myOperation.getRequestByName("Request 1") and get "Script-result: com.eviware.soapui.impl.RestRequest

Create WS security headers for REST web service in SoapUI Pro

跟風遠走 提交于 2019-12-06 17:41:43
问题 We are developing a REST web service with the WS security headers to be passed through as header parameters in the REST request. I am testing this in SoapUI Pro and want to create a groovy script to generate these and then use them in the REST request. These parameters include the password digest, encoded nonce and created dateTime and password digest which is created from encoding the nonce, hashed password and created date and time, i.e. the code should be the same as that which generates

SOAP Action mismatch error while testing a WCF service with SoapUI

[亡魂溺海] 提交于 2019-12-06 17:30:44
问题 Am testing a WCF service with a sample input in SOAPUI. when i hit the run,I get an SOAP Exception like below: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> <s:Header> <a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/fault</a:Action> </s:Header> <s:Body> <s:Fault> <s:Code> <s:Value>s:Sender</s:Value> <s:Subcode> <s:Value>a:ActionMismatch</s:Value> </s:Subcode> </s:Code> <s:Reason> <s:Text xml:lang="en-US">The