1.basics of software testing

31
BASICS OF SOFTWARE TESTING Chapter 1

Upload: vesituniversity-of-mumbai

Post on 28-Jan-2018

26 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: 1.basics of software testing

BASICS OF SOFTWARE

TESTING

Chapter 1

Page 2: 1.basics of software testing

Topics to be covered

1. Humans and errors,

2. Testing and Debugging,

3. Software Quality- Correctness Reliability

4. Fundamentals of Test Process,

5. General Principles of Testing ,

6. Test Metrics

January 12, 20181.Basics of Software Testing/D.S.Jagli

2

2

Page 3: 1.basics of software testing

Errors, faults, failures

Humans and errors,

January 12, 2018

3

1.Basics of Software Testing/D.S.Jagli01/12/18 3

Page 4: 1.basics of software testing

Errors

January 12, 20181.Basics of Software Testing/D.S.Jagli

4

Errors are a part of our daily life.

Humans make errors in their thoughts, actions, and in the products that might result from their actions.

Errors occur wherever humans are involved in taking actions and making decisions.

These fundamental facts of human existence make testing an essential activity.

4

Page 5: 1.basics of software testing

Errors: Examples

January 12, 20181.Basics of Software Testing/D.S.Jagli

5

01/12/18 5

Page 6: 1.basics of software testing

Error, Faults, Failures

Error (erroneous action) human action that produces an incorrect result. [Ieee 610.12]

Fault is also called A defect or internal error. An example might be wrongly programmed or forgotten code

in the application Failure is A non fulfillment of A given requirement; A

discrepancy between the actual result or behavior (identified while executing the test) and the expected result or behavior (defined in the specifications or requirements).

Examples of failures are products that are too hard to use or too slow, but still fulfill the functional requirements.

January 12, 20181.Basics of Software Testing/D.S.Jagli

6

01/12/18 6

Page 7: 1.basics of software testing

Error, Faults, Failures

January 12, 20181.Basics of Software Testing/D.S.Jagli

7

7

Page 8: 1.basics of software testing

Differences

2.Testing and Debugging,

January 12, 2018

8

1.Basics of Software Testing/D.S.Jagli8

Page 9: 1.basics of software testing

Testing And Debugging

Testing is the process of determining if a program has any errors.

When testing reveals an error, the process used to determine the cause of this error and to remove it, is known as debugging.

January 12, 20181.Basics of Software Testing/D.S.Jagli

9

01/12/18 9

Page 10: 1.basics of software testing

1. The goal of testing is to detect errors

2. It is initiated with known conditions.

3. The o/p can be anticipated.

4. It is a conformation.

5. It find out reason for failure.

6. Design knowledge is not required.

7. It is performed by person who doesn't belong to development team.

8. Test design and execution are done automatically.

9. It should follow certain constraints or rules.

10. It is necessary to have proper planning

1. To detect errors and correct them.

2. It is initiated with un known conditions.

3. The o/p can not be anticipated.

4. It is a reduction process.

5. it is the programmer’s justification.

6. Detailed Design knowledge is required.

7. It is performed by person who belong to development team.

8. Design and execution can’t be done automatically.

9. It shoud have experimentations and guesses.

10. It is not required proper planning.

Testing debugging

January 12, 2018

10

1.Basics of Software Testing/D.S.Jagli01/12/18 10

Page 11: 1.basics of software testing

A Test/Debug Cycle

January 12, 20181.Basics of Software Testing/D.S.Jagli

11

01/12/18 11

Page 12: 1.basics of software testing

It s very important in testing

Software Quality,

January 12, 2018

12

1.Basics of Software Testing/D.S.Jagli

Page 13: 1.basics of software testing

Software Quality

We all want high quality software. There exist several measures of software quality. Attributes can be divided into static and dynamic

quality attributes. Static attributes refer to the actual code and

documentation. Dynamic attributes refer to behavior of the

application while in use.

January 12, 20181.Basics of Software Testing/D.S.Jagli

13

13

Page 14: 1.basics of software testing

Software Quality Attributes

Static quality attributes: structured, maintainable, testable code as well as the availability of correct and complete documentation.

Dynamic quality attributes: software reliability, correctness, completeness, consistency, usability, and performance

January 12, 20181.Basics of Software Testing/D.S.Jagli

14

01/12/18 14

Page 15: 1.basics of software testing

Software Quality (Contd.)

January 12, 20181.Basics of Software Testing/D.S.Jagli

15

Completeness refers to the availability of all features listed in the requirements, or in the user manual. An incomplete software is one that does not fully implement all features required.

Consistency refers to adherence to a common set of conventions and assumptions. For example, all buttons in the user interface might follow a common color coding convention. An example of inconsistency would be when a database application displays the date of birth of a person in the database.

01/12/18 15

Page 16: 1.basics of software testing

Software Quality

Usability refers to the ease with which an application can be used. This is an area in itself and there exist techniques for usability testing.

Psychology plays an important role in the design of techniques for usability testing.

Performance refers to the time the application takes to perform a requested task. It is considered as a non-functional requirement. It is specified in terms such as ``This task must be performed at the rate of X units of activity in one second on a machine running at speed Y, having Z gigabytes of memory."

January 12, 20181.Basics of Software Testing/D.S.Jagli

16

16

Page 17: 1.basics of software testing

Software Reliability: Two Definitions

January 12, 20181.Basics of Software Testing/D.S.Jagli

17

Software reliability [ANSI/IEEE Std 729-1983]: is the probability of failure free operation of software over a given time interval and under given conditions.

Software reliability is the probability of failure free operation of software in its intended environment.

01/12/18 17

Page 18: 1.basics of software testing

Software Reliability

In the standard, the quality characteristic is split into maturity, fault tolerance, and recoverability.

1. Fault tolerance is the capability of the software product to maintain a specified level of performance, or to recover from faults in cases of software faults, or of infringement of its specified interface.

2. Maturity means how often a failure of the software occurs as a result of defects in the software.

3. Recoverability is the capability of the software product to reestablish a specified level of performance and recover the data directly affected in the case of a failure.

January 12, 20181.Basics of Software Testing/D.S.Jagli

18

01/12/18 18

Page 19: 1.basics of software testing

Correctness vs. Reliability

Though correctness of a program is desirable, it is almost never the objective of testing.

To establish correctness via testing would imply testing a program on all elements in the input domain.

In most cases that are encountered in practice, this is impossible to accomplish.

January 12, 20181.Basics of Software Testing/D.S.Jagli

19

Thus correctness is established via mathematical proofs of programs.

01/12/18 19

Page 20: 1.basics of software testing

Correctness and Testing

While correctness attempts to establish that the program is error free, testing attempts to find if there are any errors in it.

Thus completeness of testing does not necessarily demonstrate that a program is error free.

January 12, 20181.Basics of Software Testing/D.S.Jagli

20

Testing, debugging, and the error removal processes together increase our confidence in the correct

functioning of the program under test.

01/12/18 20

Page 21: 1.basics of software testing

Fundamental of Test Process

January 12, 2018

21

1.Basics of Software Testing/D.S.Jagli

Page 22: 1.basics of software testing

Fundamental Of Test Process

The description of tasks in the process models is not sufficient to perform structured tests in software projects.

In addition to the embedding of testing in the whole development process, a more detailed process for the testing tasks is needed.

The development task testing must be split into subtasks

January 12, 20181.Basics of Software Testing/D.S.Jagli

22

Page 23: 1.basics of software testing

Fundamental Test Process

January 12, 20181.Basics of Software Testing/D.S.Jagli

23

01/12/18 23

Page 24: 1.basics of software testing

General Principles of Testing

Principle 1: Testing shows the presence of defects, not their absence.

Principle 2: Exhaustive testing is not possible. Principle 3: Testing activities should start as early as

possible. Principle 4: Defects tend to cluster together. Principle 5: The pesticide paradox. Principle 6: Test is context dependent. Principle 7: The fallacy of assuming that no failures

means a useful system

January 12, 20181.Basics of Software Testing/D.S.Jagli

24

Page 25: 1.basics of software testing

Test Metrics

Test Metrics:

1. Organizational

2. Project

3. Process

4. Product Static Dynamic

January 12, 20181.Basics of Software Testing/D.S.Jagli

25

01/12/18 25

Page 26: 1.basics of software testing

Types Of Testing

January 12, 20181.Basics of Software Testing/D.S.Jagli

26

C1: Source of test generation.

C2: Lifecycle phase in which testing takes place

C3: Goal of a specific testing activity

C4: Characteristics of the artifact under test

One possible classification is based on the following four classifiers:

01/12/18 26

Page 27: 1.basics of software testing

C1: Source of test generation

January 12, 20181.Basics of Software Testing/D.S.Jagli

27

1.Fundamentals of Testing/D.S.Jagli01/12/18 27

Page 28: 1.basics of software testing

C2: Lifecycle phase in which testing takes place

January 12, 20181.Basics of Software Testing/D.S.Jagli

28

28

Page 29: 1.basics of software testing

C3: Goal of specific testing activity

January 12, 20181.Basics of Software Testing/D.S.Jagli

29

01/12/18 29

Page 30: 1.basics of software testing

C4: Artifact under test

January 12, 20181.Basics of Software Testing/D.S.Jagli

30

30

Page 31: 1.basics of software testing

???

Thank you31

1.Basics of Software Testing/D.S.Jagli31