Introduction to SoapUI day 2

Post on 03-Jul-2015

265 views 2 download

description

A method of communicating between two devices A software function provided at a network address over the web with the service always on It has an interface described in a machine-processable format http://www.qualitestgroup.com/

Transcript of Introduction to SoapUI day 2

ANY QUESTIONS??

Introduction to SOAPUI

1

BUILDING TEST CASES

Introduction to SOAPUI

2

Building Test Cases

• Creating Test Suite, Test Cases & Test Steps

• Unit vs. Functional Tests

• Parameterization of Data (Text file, excel, Database)

3

Hierarchy

• Test Suite

– Test Case

• Test Steps– Soap request

– REST request

– HTTP request

– AMF request

– JDBC request

– Data source/Data Gen

– Manual test

– Mock Response

4

Test Suite• From the Project level you can create an

empty Test Suite

5

Test Suite from Operation Level

6

Adding a Request to a Test Case

7

Options for Test Case

8

Test Suite

• Defaults placeholders for Load Tests and security tests are also added:

• Name is operation name + request name

9

Test Case Window

10

Run the Test Case

11

Test Case Properties

12

Add properties such as TestCase Description

Adding New Test Steps• Click on type

of request

• Or drag and drop

existing request

13

Parameterization of Data

• Input data to drive the tests can come from

– Text file

– Excel sheet

– Database

• Can also parameterize the expected outputs

14

DataSource test step

• DataSource – reads test data into properties from some external source

• TestStep – uses the available properties

• DataSource Loop – calls the test step(s) for each record of data

15

Let’s set up another Test Suite

New Test Suite with Test Case

16

Setup Internal Data Source

17

Use Properties to add Columns

18

Add in Data in Grid

19

Add Test Soap Request Test Step

20

Map the Inputs to Test Data

21

Map the 2nd Input Field to the Data

22

Also want to Verify Response

• Click Assertions tab under request

23

Add Assertion

24

Add XPath Assertion

25

Map Expected Result to Data Source

26

Finish Mapping & Save

27

Now add the Loop

28

Then Run the Test

• By default stops on error

29

Double-Click to see Details

30

Update Expected Results

31

Data Source- Excel

• Convert existing data store to EXCEL

32

33

Add Properties Back

34

Data Mapping

• If data source name and properties are the same, no need to remap

35

Set Test Case Options

36

PTO Patent Validation

• Let’s take a look at

• http://patft.uspto.gov/netahtml/PTO/index.html

• And the Bib WSDL

37

38

Quick or Advanced Search

39

Pick one & Review Data

40

Data

41

Exercise

• Create Excel based expected results for several of the web services

• Create test cases to provide inputs to these web services

• Set up an excel data source for the validation of the responses

• Execute your tests

42

Instead of Excel, lets pull from DB

• PALMFQT.ETC.USPTO.GOV =

• (DESCRIPTION =

• (ADDRESS = (PROTOCOL = TCP)(HOST = dev-jackson-scan.etc.uspto.gov)(PORT = 1610))

• (CONNECT_DATA =

• (SERVER = DEDICATED)

• (SERVICE_NAME = PALMFQT)

• )

• )

• USER – FTDUSR

• Pass - FTDUSR_USPTO2014

43

SQL

• select appl_Id, Invn_ttl_tx, INV_SUBJ_MATTER_TY, FILE_DT,

• FRGN_FILE_LIC_DT, DOMESTIC_IN, PCT_PUB_NO, PCT_PUB_DT,

• APPL_TY,

• PCT_NO,

• PATENT_NO,

• DN_PTO_ART_CLASS_NO,

• DN_PTO_ART_SUBCLASS_NO,

• b.fmly_nm,

• b.givn_nm

• from apc a, expousrp.ped_inventor b

• where appl_id = '61245662'---like '293%'

• AND A.FK_PC_ID = B.FK_PED_FK_PC_ID

• order by 1;

44