P. 1
0672319837

0672319837

|Views: 90|Likes:
Published by M_Computer

More info:

Published by: M_Computer on Nov 13, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/13/2011

pdf

text

original

Driversare tools used to control and operate the software being tested. One of the simplest
examples of a driveris a batch file,a simple list of programs or commands that are executed
sequentially. In the days of MS-DOS,this was a popular means for testers to execute their test
programs. They’d create a batch file containing the names of their test programs,start the batch
running,and go home. With today’s operating systems and programming languages,there are
much more sophisticated methods for executing test programs. For example,a complex Perl
script can take the place of an old MS-DOS batch file,and the Windows Task Scheduler (see
Figure 14.2) can execute various test programs at certain times throughout the day.

Figure 14.3 shows another example of a driver tool. Suppose that the software you’re testing
requires large amounts of data to be entered for your test cases. With some hardware modifica-
tions and a few software tools,you could replace the keyboard and mouse of the system being
tested with an additional computer that acts as a driver. You could write simple programs on
this driver computer that automatically generate the appropriate keystrokes and mouse move-
ments to test the software.

Automated Testing and Test Tools

CHAPTER 14

14

A

U
T
O
M
A
T
E
D

T

E
S
T
I
N
G
A
N
D

T

E
S
T

T

O
O
L
S

223

Computer #1
Software Under Test

Computer #2
Software Under Test

Computer #3
Viewer Test Tool

Communications Line

Tapped
Line

19 1983-7 CH14 10/12/00 2:19 PM Page 223

FIGURE 14.3

A computer can act as a driver test tool to replace the keyboard and mouse of a system being tested.

You might be thinking,why bother with such a complicated setup? Why not simply run a pro-
gram on the first system that sends keystrokes to the software being tested? There are poten-
tially two problems with this:

•It’s possible that the software or operating system isn’t multitasking,making it impossi-
ble to run another driver program concurrently.

•By sending keystrokes and mouse movements from an external computer,the test system
is non-invasive. If a driver program is running on the same system as the software being
tested,it’s invasive and may not be considered an acceptable test scenario.

Supplementing Your Testing

PART IV

224

Normal System
Configuration

Test Driver
Configuration

Keyboard
Cable

Mouse Cable

FIGURE 14.2

The Windows Task Scheduler allows you to schedule when programs or batch files are to run on your PC.

19 1983-7 CH14 10/12/00 2:19 PM Page 224

When considering ways to drive the software that you’re testing,think of all the possible meth-
ods by which your program can be externally controlled. Then find ways to replace that exter-
nal control with something that will automatically provide test input to it.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->