About SOAPUI introduction and Getting Started

Source: Internet
Author: User
Tags soapui

SOAPUI Introduction

SOAPUI is an open source test tool that examines, invokes, and implements the functionality/load/Compliance testing of Web service through Soap/http. The tool can be used as a single test software or as a plug-in integration into the eclipse,maven2. Used in X,netbeans and IntelliJ.

Soapui is a free and open source cross-platform functional testing solution. With an easy-to-use graphical interface and enterprise-class capabilities, Soapui lets you quickly create and perform automated functions, regressions, compliance, and load testing. In a test environment, SOAPUI provides complete test coverage and supports all standard protocols and technologies.

SoapUI is based on Java development, supports multiple platforms and is easy to install.

soapui:https://www.soapui.org/, download Open source version Soapui,soapui Pro is a commercial non-open source version of SoapUI

Getting Started instance parsing

The interface instance used is the Chinese TV listings Web Service

WSDL Address: http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl

Endpoint Address: http://ws.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx

Through the case study, can grasp the following aspects of operation:

1. Build the project

2. Run a single request

3. Build Test Cases

4. Passing parameters between interfaces

5. Run the entire test case

1. Build the project

1. Open Soapui software >file>new SOAP project, new project

2. Fill in the project name and WSDL address, the WSDL address is: HTTP://WWW.WEBXML.COM.CN/WEBSERVICES/CHINATVPROGRAMWEBSERVICE.ASMX?WSDL

The Create requests project creates an interface request file based on the WSDL file and creates a test suite for the WSDL by selecting "Create TestSuite" on the configuration.

3. Click OK after you have created the good one project, automatically add the WSDL inside some interface, according to the version of SOAP provides two interfaces, as shown in:

Interface Business:

Getareadataset: Supported Provinces and cities (regions) and categorized TV lists
Gettvstationdataset: Get a list of stations by province or city ID or classified TV ID
Gettvchanneldataset: Get a list of channels through the TV station ID
Gettvprogramdataset : get the Channel program list by channel ID

It is important to note that in addition to the Getareadataset interface is not required, the last three interfaces are required to input parameters, interface Gettvstationdataset request "? "Indicates that you want to enter the parameter as shown in:

If you do not enter the parameter, the error message will appear as follows:

Run a single request

1. Select Getareadataset under Request1, double click, click on the Run button, the results in the right panel will appear, the supported provinces and cities (regions) and category TV list, as shown in:

Specific information about the distribution of the area is shown.

2. Select Gettvstationdataset under the Request1, double-click, put in the middle panel? Replace with the City or city ID or category TV ID-1, click the Run button, you will see the results in the right panel, get a list of stations, as shown in:

3. Select Gettvchanneldataset under the Request1, double-click, put in the middle panel? Replace the TV station ID98, click the Run button, the results will appear in the right panel, get the channel list, as shown in:

4. Select Gettvprogramdataset under the Request1, double-click, put in the middle panel? To replace the channel ID292, click the Run button and the result will appear in the right panel to get the program list

Building Test Cases

1. Create a test suite: Select the project "CTV" right click on "New TestSuite", you can enter the test name, as shown in

Right-click the project

Create a name for your test project

2. Create complete, then just add your test case to your test project

Once created, the new TestCase contains three sections:

Testing steps: Test Steos loading test: Load Tests Safety test: Security Tests 3. Add the request to the test case: Select a request, then right-click on "Add to TestCase" and in the pop-up window select the " TestSuite 1 ", as shown in:

Add complete

4. Run the test: Open the TestCase window, click the Green Run button, green indicates the success of the run, the result is below the right panel, as shown in:

If it is full of forgiveness color, then congratulations on your success if it is red, then there must be problems pull!!!

5. Increase the Check Point

① opens the service request in the test step, as shown in:

Click Add

Passing parameters between interfaces, organizing test steps

Getareadataset: Supported Provinces and cities (regions) and categorized TV lists
Gettvstationdataset: Get a list of stations by province or city ID or classified TV ID
Gettvchanneldataset: Get a list of channels through the TV station ID
Gettvprogramdataset : get the Channel program list by channel ID

Join the test steps in TestCase 1, then organize the test steps to get a list of the "CCTV-1" programs

The specific test steps are:

1. Get the Category ID "1" for "Central TV"

2. Get "CCTV" ID in "Central TV" Thunder: "39"

3. Access to "CCTV" channel "CCTV-1" ID: "606"

4. Get a list of programs for the "CCTV-1" channel

1. First add the request to the use case as shown in the following sequence:

2. Add the Enter parameter operation for the interaction between the two service requests, as shown in:

Getareadataset the "Beijing" ID "1" in the result of the service request as a service request Gettvstationdataset

Get Beijing value is-1

In the right panel, enter the following code,//is not a comment, just a table relative path, (getareadataset result)

1 declare namespace diffgr= "Urn:schemas-microsoft-com:xml-diffgram-v1";  diffgr:diffgram/area/arealist[4]/areaid[1]  

Enter the following code in the lower section of the right panel (Gettvstationdataset entry)

1 declare namespace web= "http://WebXml.com.cn/";  web:gettvstationdataset/web:theareaid[1]  

Enter and then click Run to come out.

How to get the above code:

Top half Getareadataset results obtained:

Get the value of a local program 39

In the right panel, enter the following code (gettvstationdataset result)

1 declare namespace diffgr= "Urn:schemas-microsoft-com:xml-diffgram-v1";  diffgr:diffgram/station/tvstation[1]/tvstationid[1]  

Enter the following code in the lower section of the right panel (gettvchanneldataset entry)

Declare namespace web= "http://WebXml.com.cn/";  Web:gettvchanneldataset/web:thetvstationid[1]

Results

gettvchanneldataset the "CCTV" ID "606" in the result of the service request as a service request Gettvprogramdataset

The last to the desired value

And then we'll run through all the use cases.

Implementation through

You can also add checkpoints to a use case. This is random.

Check point is how to set up the above with detailed information can go to the above to view ...

I hope this little bit of my experience will bring you help.

About SOAPUI introduction and Getting Started

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.