introduction to soapui day 2

44
ANY QUESTIONS?? Introduction to SOAPUI 1

Upload: qualitest-group

Post on 03-Jul-2015

268 views

Category:

Technology


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

Page 1: Introduction to SoapUI day 2

ANY QUESTIONS??

Introduction to SOAPUI

1

Page 2: Introduction to SoapUI day 2

BUILDING TEST CASES

Introduction to SOAPUI

2

Page 3: Introduction to SoapUI day 2

Building Test Cases

• Creating Test Suite, Test Cases & Test Steps

• Unit vs. Functional Tests

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

3

Page 4: Introduction to SoapUI day 2

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

Page 5: Introduction to SoapUI day 2

Test Suite• From the Project level you can create an

empty Test Suite

5

Page 6: Introduction to SoapUI day 2

Test Suite from Operation Level

6

Page 7: Introduction to SoapUI day 2

Adding a Request to a Test Case

7

Page 8: Introduction to SoapUI day 2

Options for Test Case

8

Page 9: Introduction to SoapUI day 2

Test Suite

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

• Name is operation name + request name

9

Page 10: Introduction to SoapUI day 2

Test Case Window

10

Page 11: Introduction to SoapUI day 2

Run the Test Case

11

Page 12: Introduction to SoapUI day 2

Test Case Properties

12

Add properties such as TestCase Description

Page 13: Introduction to SoapUI day 2

Adding New Test Steps• Click on type

of request

• Or drag and drop

existing request

13

Page 14: Introduction to SoapUI day 2

Parameterization of Data

• Input data to drive the tests can come from

– Text file

– Excel sheet

– Database

• Can also parameterize the expected outputs

14

Page 15: Introduction to SoapUI day 2

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

Page 16: Introduction to SoapUI day 2

Let’s set up another Test Suite

New Test Suite with Test Case

16

Page 17: Introduction to SoapUI day 2

Setup Internal Data Source

17

Page 18: Introduction to SoapUI day 2

Use Properties to add Columns

18

Page 19: Introduction to SoapUI day 2

Add in Data in Grid

19

Page 20: Introduction to SoapUI day 2

Add Test Soap Request Test Step

20

Page 21: Introduction to SoapUI day 2

Map the Inputs to Test Data

21

Page 22: Introduction to SoapUI day 2

Map the 2nd Input Field to the Data

22

Page 23: Introduction to SoapUI day 2

Also want to Verify Response

• Click Assertions tab under request

23

Page 24: Introduction to SoapUI day 2

Add Assertion

24

Page 25: Introduction to SoapUI day 2

Add XPath Assertion

25

Page 26: Introduction to SoapUI day 2

Map Expected Result to Data Source

26

Page 27: Introduction to SoapUI day 2

Finish Mapping & Save

27

Page 28: Introduction to SoapUI day 2

Now add the Loop

28

Page 29: Introduction to SoapUI day 2

Then Run the Test

• By default stops on error

29

Page 30: Introduction to SoapUI day 2

Double-Click to see Details

30

Page 31: Introduction to SoapUI day 2

Update Expected Results

31

Page 32: Introduction to SoapUI day 2

Data Source- Excel

• Convert existing data store to EXCEL

32

Page 33: Introduction to SoapUI day 2

33

Page 34: Introduction to SoapUI day 2

Add Properties Back

34

Page 35: Introduction to SoapUI day 2

Data Mapping

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

35

Page 36: Introduction to SoapUI day 2

Set Test Case Options

36

Page 37: Introduction to SoapUI day 2

PTO Patent Validation

• Let’s take a look at

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

• And the Bib WSDL

37

Page 38: Introduction to SoapUI day 2

38

Page 39: Introduction to SoapUI day 2

Quick or Advanced Search

39

Page 40: Introduction to SoapUI day 2

Pick one & Review Data

40

Page 41: Introduction to SoapUI day 2

Data

41

Page 42: Introduction to SoapUI day 2

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

Page 43: Introduction to SoapUI day 2

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

Page 44: Introduction to SoapUI day 2

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