Вы находитесь на странице: 1из 23

Creating Project in SOAPUI Tool.

How To Add WSDL to project.


Creating Test Suit ,Test Cases , And Test Steps.
Adding Assertions.
How to Add Properties(Global And Local)
Accessing The Data from the Properties to test

step.
How to Create Properties Using Groovy Script

Step

in the SOAPUI main window Right click on


projects and select New SOAPUI project.

Create A new SOAPUI Project Dialogue Box

Appears.
Enter The Project Name Ex: Currency
converter
And Press Ok

Right Click on the project name which u have created in the

previous step and click on Add WSDL To the project.


Add WSDL Dialogue box appears.
Paste the WSDL URL in the WSDL Location Field
Check The create sample request for all operations check
box And Press ok . WSDL will be validated and added to
current project With a sample request.

Right Click on the Service


Select the generate test suit option.

Generate Test suit Dialogue appears click ok.

Enter the test suit name and press ok


Test suit is created with a single test step
To create more test requests right click on the test step and

select add step test request.


Give the teststep name press ok

Give the test step name press ok

And select the operation to which you want to

add this request


Give the name for the test case and Uncheck
All default and click ok.

Add request to test case dialogue appears


Give a name To the test case and uncheck all

the defaults and click ok

Schema Compliance

XPath Match

Contains

XQuery Match

Not Contains

Script Assertion

SOAP Fault

WS-Security Status

Not SOAP Fault

WS-Addressing
Response Assertion

SOAP Response

WS-Addressing
Request Assertion

Response SLA

Schema Compliance - validates the response message against the


definition in the WSDL and contained XML Schema
SOAP Response - checks that the response is a valid SOAP
Response
Contains - checks for the existence of a specified string
Not Contains - checks for the non-existence of a specified string
Reponse SLA - check the response time against a specified value
XPath Match - compares the result of an XPath expression to an
expected value
XQuery match - compares the result on an XQuery expression to
an expected value
Script - runs an arbitrary script that can be used to validate the
received message as desired
SOAP Fault - checks that the response is a SOAP Fault (The SOAP
Fault element holds errors and status information for a SOAP
message. E.g.; Namespace Mismatch)
Not SOAP Fault - checks that the response is not a SOAP Fault

WS-Security Status - validates the WS-Security


headers and tokens in the response
WS-Addressing Response - validates the WSAddressing Headers in the response
Xpath is a language for finding information in an
XML document.
Xpath Match is an assertion in soapUI.
It compares the result of an XPath expression to
an expected value

Step 1:Open test step Click on the add assertion button


Step 2:Select the assertion Contains from the dropdown

list and click ok

Step 3:Enter the Content you are

expecting in the response and click ok

Step 1:Right click on the Test case select add

test step select Properties test step.

Step 2:Give a name and click ok the

properties dialogue appears.

Click on the Add property button and a unique

property name press ok

Give Value to the property in the value Colum.

Go to the Test request Right Click on the field

navigate Get data->properties->Property

Double Click on the Test suit


In test suit Editor Window Click On the Properties Tab
Click On the Add Properties Button Enter The Global

property name and value

Create a text file for the properties and save it.


Add Groovy Script test request.
Write the groovy script in the groovy script editor
Click on run button

Thank You