+ All Categories
Home > Documents > Capture-Replay and Test Automation [email protected] Models and Analysis of Software...

Capture-Replay and Test Automation [email protected] Models and Analysis of Software...

Date post: 24-Dec-2015
Category:
Upload: miles-jones
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
36
Capture-Replay and Test Capture-Replay and Test Automation Automation Jerzy.Nawrocki@ put . poznan . pl www.cs.put.poznan.pl/ jnawrocki/models/ Models and Analysis of Software Lecture 9 Copyright, 2003 Jerzy R. Nawrocki
Transcript

Capture-Replay and Test AutomationCapture-Replay and Test Automation

[email protected]/jnawrocki/models/

Models and Analysis of SoftwareLecture 9

Copyright, 2003 Jerzy R. Nawrocki

The Scribble applicationThe Scribble application

1 Belgium2 Denmark3 Netherlands

New item added in order

1 Netherlands Initial state

1 Netherlands2 Belgium

New item added – end

1 Belgium2 Netherlands

Sorted

1 Denmark2 Netherlands

Old item deleted

Enter: Belgium

Enter: Denmark

Enter: 1

Sort

Manual test for ScribbleManual test for Scribble

BelgiumNetherlandsUK

Add 2 new items to the sorted list.

Move an item (the list gets unsorted).

Add an item to the unsorted list.

Delete an item.

Try to delete an invalid item (position)

countries.dcm

countries2.dcm

The screen shots – Starting the ScribbleThe screen shots – Starting the Scribble ScribbleFile LList ist

The screen shots – Openning a fileThe screen shots – Openning a file ScribbleFile LList ist

NewCCloselosePPrintrintExit

Open

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

The screen shots – Adding an item (Sweden)The screen shots – Adding an item (Sweden) ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End> Add ItemAdd Item

OKOK

CancelCancelSweden|Sweden|

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

New ListNew ListSort ListNew ListNew ListSort List

Del ItemMov ItemDel ItemMov Item

Add ItemAdd Item

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUK<List End>

The screen shots – Adding an item (USA)The screen shots – Adding an item (USA) ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUK<List End>

Add ItemAdd ItemOKOK

CancelCancelUSA|USA|

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUK<List End>

New ListNew ListSort ListNew ListNew ListSort List

Del ItemMov ItemDel ItemMov Item

Add ItemAdd Item

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUKUSA<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUKUSA<List End>

The screen shots – Moving an itemThe screen shots – Moving an item ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUKUSA<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsSwedenUKUSA<List End>

New ListNew ListSort ListAdd ItemDel Item

New ListNew ListSort ListAdd ItemDel Item

Mov ItemMov Item

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>1 Belgium2 Netherlands3 Sweden4 UK5 USA<List End>

Countries on our mailing list are:<List>1 Belgium2 Netherlands3 Sweden4 UK5 USA<List End>

Move ItemMove Item

OKOK

CancelCancel44From

11To

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSA<List End>

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSA<List End>

The screen shots – Adding an item (Norway)The screen shots – Adding an item (Norway) ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSA<List End>

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSA<List End>

Add ItemAdd ItemOKOK

CancelCancelNorway|Norway|

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSA<List End>

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSA<List End>

New ListNew ListSort ListNew ListNew ListSort List

Del ItemMov ItemDel ItemMov Item

Add ItemAdd Item

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSANorway<List End>

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSANorway<List End>

The screen shots – Deleting a valid itemThe screen shots – Deleting a valid item ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>1 UK2 Belgium3 Netherlands4 Sweden5 USA6 Norway<List End>

Countries on our mailing list are:<List>1 UK2 Belgium3 Netherlands4 Sweden5 USA6 Norway<List End>

Delete Item

From Position

Delete Item

From PositionOKOK

CancelCancel

22

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSANorway<List End>

Countries on our mailing list are:<List>UKBelgiumNetherlandsSwedenUSANorway<List End>

New ListNew ListSort ListAdd Item

New ListNew ListSort ListAdd Item

Mov ItemMov ItemDel ItemDel Item

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKNetherlandsSwedenUSANorway<List End>

Countries on our mailing list are:<List>UKNetherlandsSwedenUSANorway<List End>

The screen shots – Deleting an invalid itemThe screen shots – Deleting an invalid item ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>1 UK2 Netherlands3 Sweden4 USA5 Norway<List End>

Countries on our mailing list are:<List>1 UK2 Netherlands3 Sweden4 USA5 Norway<List End>

Delete Item

From Position

Delete Item

From PositionOKOK

CancelCancel

77

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKNetherlandsSwedenUSANorway<List End>

Countries on our mailing list are:<List>UKNetherlandsSwedenUSANorway<List End>

New ListNew ListSort ListAdd Item

New ListNew ListSort ListAdd Item

Mov ItemMov ItemDel ItemDel Item

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>1 UK2 Netherlands3 Sweden4 USA5 Norway<List End>

Countries on our mailing list are:<List>1 UK2 Netherlands3 Sweden4 USA5 Norway<List End>

Delete Error

Position Not Valid

OK

The screen shots – ClosingThe screen shots – Closing ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>UKNetherlandsSwedenUSANorway<List End>

Countries on our mailing list are:<List>UKNetherlandsSwedenUSANorway<List End>

OOpenpenNNew ew OOpenpenNNew ew

PrintEExitxitPrintEExitxit

CloseClose

ScribbleFile List File Name countriescountries List UnsortedUnsorted

Countries on our mailing list are:<List>1 UK2 Netherlands3 Sweden4 USA5 Norway<List End>

Countries on our mailing list are:<List>1 UK2 Netherlands3 Sweden4 USA5 Norway<List End>

Close

Save the document?

OKOK

ii

No

The screen shots – ExitingThe screen shots – Exiting ScribbleFile LList ist

Scribble

File LList ist

OpenNewCCloselosePPrintrintExit

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu

ScribbleFile LList ist

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click

ScribbleFile LList ist

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option

ScribbleFile LList ist

NewCCloselosePPrintrintExit

Open

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click

ScribbleFile LList ist

NewCCloselosePPrintrintExit

Open

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu10 Click

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu10 Click11 Move mouse to Add Item

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

New ListNew ListSort ListNew ListNew ListSort List

Del ItemMov ItemDel ItemMov Item

Add ItemAdd Item

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu10 Click11 Move mouse to Add Item12 Click

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

New ListNew ListSort ListNew ListNew ListSort List

Del ItemMov ItemDel ItemMov Item

Add ItemAdd Item

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu10 Click11 Move mouse to Add Item12 Click13 Type Sweden

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End> Add ItemAdd Item

OKOK

CancelCancelSweden|Sweden|

What was the test input?What was the test input?1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu10 Click11 Move mouse to Add Item12 Click13 Type Sweden14 Move mouse to OK button

ScribbleFile List File Name countriescountries List SortedSorted

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End>

Countries on our mailing list are:<List>BelgiumNetherlandsUK<List End> Add ItemAdd Item

OKOK

CancelCancelSweden|Sweden|

The manual test processThe manual test process1 Move mouse to Scribble icon2 Double click3 Move mouse to File menu4 Click5 Move mouse to Open option6 Click7 Move mouse to countries.dcm8 Double click9 Move mouse to List menu10 Click11 Move mouse to Add Item12 Click13 Type Sweden14 Move mouse to OK button

The amount of effort to automate a test case:

2 – 10 times the effort required to run the test manually (!)

The manual test processThe manual test processUnscripted manual testing:

1. Identify conditions to test

2. Think up specific inputs

3. Enter the inputs

4. Checked it worked OK

The manual test processThe manual test processUnscripted manual testing

Vague manual scripts:

1. Read what to do

2. Think up specific inputs

3. Enter the inputs

4. Checked it worked OK

Vague manual scriptVague manual script

1 Run up Scribble File menu displayed

2 Open file with sorted List File contents displayed

3 Add some items to List Items added in order

4 Move an item Item moved, List now unsorted

5 Add an item Item added at end of List

6 Delete item form list Item deleted

7 Use invalid position number Error message displayed

to delete an item

8 Save changes in new file End of test

The manual test processThe manual test processUnscripted manual testing

Vague manual scripts

Detailed manual scripts:

1. Read what to do

2. Enter the inputs

3. Checked it worked OK

Detailed manual scriptDetailed manual script

1 Click on Scribble icon Scribble opened, File menu enabled2 Move mouse to File menu, click Options available: Open, New, Exit3 Move mouse to Open option, Filenames displayed including click countries.dcm4 Move mouse to countries.dcm Text plus List of 3 countries:

Belgium, Netherlands, UK, File and List menus displayed

. . . . . .

Automating test executionAutomating test execution

Automated scripts are not like manual scripts

Don’t automate testing by simply recording

Automated execution with manual verification?

How much shoul be compared (whole, minimum, something between)?

Dynamic comparison and post-execution comparison

Automated comparison messages have to be manually checked

While tests fail the second time?

ConclusionConclusion

Automated is not automaticAutomated is not automatic

BibliographyBibliography

M. Fewster, D. Graham, Software M. Fewster, D. Graham, Software Test Automation, Addison-Wesley, Test Automation, Addison-Wesley, Harlow, 1999.Harlow, 1999.

QuestionsQuestions??


Recommended