cs351 © 2003 ray s. babcock software testing what is it?

35
CS351 © 2003 Ray S. Babcock Software Testing What is it?

Post on 19-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?

Page 2: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test?

Page 3: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?

Page 4: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?

Page 5: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?Who should do testing?

Page 6: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?Who should do testing?How do you do testing?

Page 7: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?Who should do testing?How do you do testing?Why do you do testing?

Page 8: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?Who should do testing?How do you do testing?Why do you do testing?What is the results of doing testing ?

Page 9: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?Who should do testing?How do you do testing?Why do you do testing?What is the results of doing testing ?

Deliverables?

Page 10: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Software Testing

What is it?What is a good test? Pass? Fail?When do you do testing?Who should do testing?How do you do testing?Why do you do testing?What is the results of doing testing ?

Deliverables?When do you stop testing?

Page 11: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

What is testing?

“Testing is a process of executing a program with the intent of finding an error.”

Page 12: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

What is testing?

“Testing is a process of executing a program with the intent of finding an error.”

“A good test case is one that has a high probability of finding an as-yet-undiscovered error.”

Page 13: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

What is testing?

“Testing is a process of executing a program with the intent of finding an error.”

“A good test case is one that has a high probability of finding an as-yet-undiscovered error.”

“A successful test is one that uncovers an as-yet-undiscovered error.”

Page 14: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

What is a good test?

What we need here is an attitude adjustment!

When we find errors, we often say “oh no!”

When we find errors, we should say “oh yes!, we found it earlier rather than later.”

There will always be one more bug.

Page 15: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

About that term bug

The term came from the old machine days when real bugs crawled into machines.

Admiral Grace Hopper used the term when referring to a moth that crawled into the Eniac and fouled a relay.

When using this term to refer to an error in a program, it implies that it somehow “CRAWLED IN FROM OUTSIDE”

Page 16: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Reality Check!

YOU PLACED EVERY SINGLE BUG INTO YOUR CODE YOURSELF!

Page 17: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Reality Check!

YOU PLACED EVERY SINGLE BUG INTO YOUR CODE YOURSELF!

You designed it. You implemented it. And now you're surprised that you have to find it???

Page 18: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you do testing?

In many life cycle models, there is a “testing phase”. This implies you don't do anything before this phase and that you are all done when the phase is over.

Acutally we now think of testing across the entire life cycle.

You are always thinking about testing.

Page 19: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you do testing?

You can consider testing in every step of the project.

● Test an idea.● As you analyze, consider testing.● Consider how you will test each and every

requirement.● Test your design.● Test your implementation (unit, integration,

system, performance, stress)● Test your documentation.● Test your usability.

Page 20: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Who should do testing?

There are two sides to doing your own testing?

● You know your code best so you can design test data quickly.

● You know your code best and often assume you have done it right. This often causes you to overlook the obvious errors.

Page 21: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Who should do testing?

Some suggestions:

● Project Manager● Software Engineer● Testing Specialists

Page 22: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

How do you do testing?

Idea : pass it by others?Analysis : Have you looked at everything?Requirements : How will you verify that this

requirement has been met by the software?

Design : Design/Requirement matrix.Implementation : This is where we tend to

concentrate most. Unit, Integration, System, Performance, Stress, Fail-Safe.

Documentation : Review by normal users.

Page 23: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Test Plan

A written document detailing how the testing for a product will be done.

A dynamic document, constantly updated throughout the project.

Used to keep track of adaptive and perfective maintenance after the project is delivered.

Page 24: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Why do you do testing?

It is a myth to say “Testing assures that there are no errors in your code.”

Testing CANNOT prove a program is error-free.

I like the following way to describe it:“Testing raises your confidence that the

program is performing correctly.”

Page 25: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Performing Correctly?

This normally means

MEETS REQUIREMENTS

Verification : “Are we building the product right?”

Validation : “Are we building the right product?”

Page 26: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

What is the results of doing testing?

You have more confidence that the program is working correctly.

You have documentated all tests.

You have developed test data sets and saved all test suites for future regressive testing.

You have satisfied your customer by delivering what they wanted.

Page 27: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct?

Page 28: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct? NO!

Page 29: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct? NO!

When you run out of time?

Page 30: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct? NO!

When you run out of time? NO!

Page 31: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct? NO!

When you run out of time? NO!

When you run out of money?

Page 32: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct? NO!

When you run out of time? NO!

When you run out of money? NO!

Page 33: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

When do you stop testing?

When you are satisfied that it is now completely correct? NO!

When you run out of time? NO!

When you run out of money? NO!

An author suggests the following as an answer:

“When the product is retired!”

Page 34: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Footnote 1 (to this testing introduction)

You've heard me state Babcock's first rule:“NEVER DEMONSTRATE ANYTHING”

I also have a rule related to software testing:

“IF IT LOOKS LIKE IT'S WORKING, MAYBE IT IS”

The “fire over there, looking over here” story.

Page 35: CS351 © 2003 Ray S. Babcock Software Testing What is it?

CS351

© 2003 Ray S. Babcock

Footnote 2(to this testing introduction)

Regression testing is the verification that the rest of the package still works when you change a small part of it.

The “MIDAS data base” story.