13
Software Testing

Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

Software Testing

Page 2: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

What is Testing?

Testing is the process of demonstrating that errors are not present

The purpose of testing is to show that a program performs its intended functions correctly

Testing is the process of establishing confidence that a program does what it is suppose to do.

These definitions are incorrect.Why???

“Testing is the process of executing a program with the intent of finding errors”

Page 3: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

Why should We Test?

Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost potentially much higher than of testing

“Life Critical System”, economics must not be the prime consideration while deciding whether a product should be released to a customer.

In commercial system it is often difficult to estimate the cost of errors.

Page 4: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

Who should Do the Testing?

It is very difficult for software developer to point out errors from own creations(Why?)

Testing persons are different from Development persons for the overall benefit of the system

Developers provide guide lines during testing Whole responsibility is owned by Testing persons

Page 5: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

What should We Test? It is not possible to test the software for all possible

combination of input cases (example) It is impossible to execute all path the program (example)Complete Testing is impossible, although we may wish

to do so. Organizations should develop strategies and policies

for choosing effective testing techniques

Page 6: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

TERMINOLOGIESError, Mistake, Bug, Fault and Failure

Error: People make errors. A good synonym is MISTAKE. Mistakes during coding is called Bug

Fault: An error may lead to one or more faults. Fault is the representation of error. Defect is a good synonym for fault

Failure: occurs when a fault executes. One fault may lead to many Failures

Page 7: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

TERMINOLOGIESTest, Test Case, Test Suite

A Test: is the act of exercising software with test cases. There are two distinct goals of a test: either to find failures, or to demonstrate correct execution.

Page 8: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

TERMINOLOGIESTest, Test Case, Test Suite

Test Case: Describes an input description and an expected output description (example) A Good Test Case has high probability of finding an error The main objective of Test Case Designer is to identify

good test cases Test Suite: the set of test cases. Any combination of test

cases may generate a Test Suite

Page 9: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

TERMINOLOGIESVerification and Validation

Verification: the process of conforming that software meets its specification (Checking the software with respect to specification)

Validation: the process of conforming that software meets the customer’s requirements (Checking the software with respect to customer’s expectation)

If there is a gap at RSR level that will only be know during validation activities

Poor understand of expectation may lead to incorrect specifications

Page 10: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

TERMINOLOGIESAlpha, Beta and Acceptance Testing

Alpha and Beta Testing: used when the software developed as a product for anonymous customers. Alpha tests are conducted at developer’s site by customer.

This test may be stared when formal testing process near completion

Beta tests are conducted by the customers/end users at their site. Beta testing is conducted in a real environment that cannot be control by the developer.

Page 11: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

TERMINOLOGIESAlpha, Beta and Acceptance Testing

Acceptance Testing: used when the software is developed for a specific customer.

A series of test are conducted to enable the customer to validate all requirements. These test are conducted by the end user/customer

Page 12: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

Example 1

A program requires two 8 bit integers as A program requires two 8 bit integers as inputs, so total possible combinations are: inputs, so total possible combinations are: 2288 x 2x 288

If one second is required to execute one set If one second is required to execute one set of inputs, it will take 18 hours. of inputs, it will take 18 hours.

Page 13: Software Testing 1 - tienhuong.files.wordpress.com · Although Software Testing is an expensive activity. However, if we produce a software product without Testing may lead to cost

Example 2 Suppose we have a program which uses loop Suppose we have a program which uses loop

and If statement as following:and If statement as following: The number of paths in The number of paths in

the example is 10the example is 101414

If only 1 minute is require If only 1 minute is require to test one path, it may to test one path, it may take 1/5 billion yearstake 1/5 billion yearsto execute all path. to execute all path.

<=20 times