2024年4月30日发(作者:)

soapUI测试web service(官方教程)

使用soapUI测试web service十分简单。到官方网站/下载

最新版本,并安装。下面开始我们的soapUI测试之旅。

Create or Import a Web Service testing project

Right click on the workspace node in

the left navigation pane and select "New

WSDL Project"

and then for a local file where the project

should be saved

created in the workspace

Add a WSDL to create tests from

Now that you have a project you can start adding

Interfaces (i.e. Web Service PortTypes) to it.

Right click on the project node and select "Add WSDL from

URL"

You will be prompted for the URL to the Interfaces WSDL;

enter

/AWSECommerceService/AW

(注意这个时候你要启动你的Web

Service服务,并选择正确的Web Service地址)to add the

amazon web service and select "Ok".

soapUI will prompt you if you want to

create default

requests for each operation, simply select "Yes"

soapUI will now add the SOAP/Http Binding for the amazon

"AWSECommerceServicePortType" PortType to your project

and create nodes for each operation.

Try some Web Service requests

Now that you have added the amazon Web

Service you can start playing around with

some requests. When you added the interface

in the previous step soapUI created default

requests for each operation in accordance

with their WSDL and Schema definition.

Expand the Interface node and any

Operation node under it, you should see

the created "Request 1".

Double-click the request node to open the

request editor in the right part of soapUI

(see image below)

The request editor is divided into 3

parts:

o

A toolbar at the top with a number

of request related

actions/options

o

A request area to the left

o

A response area to the right

The default request created by soapUI

will have "?" for each value that needs

to be supplied in the request, replace or

remove any values as required and post

request by pressing the left-most toolbar

button (a green arrow) (?代表你需要填

充的值)

The request will run in the background and

its response will be displayed in the

right editor