Software testing techniques Software testing techniques Object-oriented software testing...

15
Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology

Transcript of Software testing techniques Software testing techniques Object-oriented software testing...

Page 1: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Software testing techniquesSoftware testing techniques

Object-oriented software testing

Presentation on the seminar

Kaunas University of Technology

Page 2: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Theme overview

•Object-oriented software testing purposes

•Different testing levels

•Testing methods

•Benefits of object-oriented software testing

•Object-oriented software testing issues

Page 3: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

The purposes of object-oriented software testing

•It is used for testing object-oriented systems.

•It is necessary for testing system objects interactions and behavior in various situations.

•It tests interfaces of the system components that are put together.

Page 4: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Object-oriented software testing levels

•Testing an object

•Testing sets of objects

•Testing an entire system

Page 5: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Testing an object (unit testing)

•Unit is a smallest component that can be compiled and executed.

•There are two options for selecting single unit in object-oriented software:

–treat each class as unit;

–treat each method within a class as unit.

•Unit is normally a component which is only assigned to one programmer.

Page 6: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Single unit testing in object-oriented software

•Smallest testable unit is the encapsulated class.

•Test each operation as part of a class.

•Identify all object attributes.

•Test all object states behavior.

•Inheritance leads to a lot of difficulty for testing classes, because of lack of information localization.

Page 7: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Testing sets of objects (integration testing)

•Integration testing is the testing of the interaction between two or more object-oriented components by

sending a message.

•Integration testing assumes that unit testing has been done on the components and defects have been

removed.

•The goal of integration testing is to find defects that arise when object-oriented components interact with

each other in an incorrect way.

Page 8: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Testing an entire system

•Black box testing

–Creating test cases by using user requirements or specifications.

•White box testing

–Creating test cases by using software code.

Page 9: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Testing methods

•Use cases testing

•Random testing

•Partitioning testing

Page 10: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Use cases testing

•Based on use cases.

•Focus on user interaction, but not on system interaction.

•Describes a specific user needs.

Page 11: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Random testing

•Identify operations applicable to a class.

•Define constraints on operations use.

•Identify a minimum test sequence.

•Generate a variety of random valid test sequences.

Page 12: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Partitioning testing

•State-based partitioning:

–Categorize and test operations based on their ability to change the state of a class.

•Attribute-based partitioning:

–Categorize and test operations based on the attributes that they use.

•Category-based partitioning:

–Categorize and test operations based on the generic function each performs (state changing, queries, termination).

Page 13: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Object-oriented software testing benefits

•Allows to test individual software objects and their interaction.

• Allows to detect errors in the initial phase of system implementation.

•Allows easily automated testing with special tools.

Page 14: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Object-oriented software testing problems

•Integration testing may add a large cost (time resources) to software development process.

•Polymorphism - attribute may have more than one set of values and an operation may be implemented by

more than one method.

•Inheritance - object may have more than one super class.

•Encapsulation - information hiding.

Page 15: Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.

Questions

•Object-oriented software testing levels?

•Benefits of object-oriented software testing?

•Drawbacks of object-oriented software testing?