Success with Test Automation

Bret Pettichord

BMC Software


Personal Background


Overview


Planning test automation

1. Select a test tool

2. Record test scripts

3. Run scripts and test product

Don't be fooled. It's easy to create throwaway test scripts.


I.Q. Test

Which can you do in your spare time?

A. Automate Software Testing

B. Automate Employee Payroll

C. Automate Manufacturing Process

D. Automate Airline Reservation System

E. Coordinate Company Picnic

Don't try to automate testing in your spare time. Schedule and dedicate people and time.


Test Automation is
Software Development


Thinking Smart

1. Choose good people, get good training.

2. Early success, proof of concept.

3. Automate the right stuff.

4. Plan for maintenance.

Don't be fooled. This requires planning and feedback.


Getting Started


Get good people


Use Software Engineering Principles

Test automation is not a silver bullet


Plan to reduce maintenance.


Carefully pick what
to automate.


Get first results quickly.


Automating Acceptance Tests


Two Key Design Concepts

Test Driver Architecture

Error Recovery System


Test Driver Architecture


Test Case Files


Test Drivers


Advantages of Test Driver Architecture


Problem: Cascading Failures

1. One test fails.

2. The product is left in an odd state.

3. Subsequent tests automatically fail.

Tests must be run and rerun


Error Recovery System


Building an Error Recovery System


Testing MetaManage

Using Automation


BMC Products: MetaSuite


Test System Components

Tester's Perspective


Test System Components

Automator's Perspective


Example Testcase

-- otbed001|This testcase should use the ALTER TABLE command to edit

-- otbed001| the tables storage values

-- otbed001|OS:

-- otbed001|TF: otbed001.001

-- otbed001|RI: TBED0095

-- otbed001|RI: TBED0077

-- otbed001|RI: TBED0086

|A |otbed001 |E |TB | |SA1 |TB01 | |E |000 |pct_free |10 |99

| |otbed001 |E |TB | |SA1 |TB01 | |E |000 |pct_used |40 |1

| |otbed001 |E |TB | |SA1 |TB01 | |E |000 |next_extent | |1

| |otbed001 |E |TB | |SA1 |TB01 | |E |000 |max_extents | |100

-- | |otbed001 |E |TB | |SA1 |TB01 | |E |000 |new_extent | |5K


Test Data


Test Suites

11/15/95/ antbed.s - file contains only table edit testcases

antest otbed001 otbed001.001

antest otbed002 otbed001.001

antest otbed003 otbed001.001

antest otbed004 otbed001.001

antest otbed005 otbed001.001

antest otbed006 otbed001.001

antest otbed007 otbed001.001

antest otbed008 otbed001.001

antest otbed009 otbed001.001

antest otbed010 otbed001.001

antest otbed011 otbed001.001

antest otbed012 otbed001.001

antest otbed013 otbed001.001

antest otbed014 otbed001.001

antest otbed015 otbed001.001

antest otbed016 otbed001.001

antest otbed017 otbed001.001

antest otbed018 otbed001.001

antest otbed019 otbed001.001

antest otbed020 otbed001.001

antest otbed021 otbed001.001

antest otbed022 otbed001.001


Example Test Driver


Output Verification


Recovery System


Window Declarations


Custom Classes


Layered test components


Automation Accomplishments

In a week in September, we ran

310 unique "analysis" testcases a total of

1030 times. Of these,

127 were run once;

50 were run 2, 3 or 4 times;

80 were run 5 times;

53 were run 6 to 10 times.


Living with Test Automation

Committing people to test automation.

Avoid false positives.

Accept "Good Enough" test automation.

Test Failure Triage.


Commiting people to test automation


Avoid false positives


Accept "Good Enough"
Test Automation


Test Failure Triage


Benefits of Test Automation


False Benefits

Common hopes that won't pan out


Key Ideas


It's OK not to automate.

If you are going to do it,

do it right.


Bret Pettichord

BMC Software

bret_pettichord@bmc.com

512-795-6019