SOFTWARE TESTING
What Is Software Testing??
Software testing is a process of executing a program or application with the intent of finding the software bugs.
Intendent to show that a program does what it is intended to do and to discover program defects before it is put into use.
Execute a program using artificial / actual data.
Check the results of the test run for errors, anomalies or information about the program’s non-functional attributes.
Can reveal the presence of errors NOT their absence.
Why Software Testing Is Important
Something that works when one person is using it may not work when hundreds of people are using it.
There are lots of different devices, browsers, and operating systems out there.
There’s always a chance that a user really will do that – no matter how silly it seems.
To deliver the best application / high quality product.
lower maintenance cost
Increase accuracy, consistency and reliability.
Increase customer confidence / satisfaction.
Loss of money
Loss of time
Business reputation
Injury or death .
Main Goals - Software testing
To demonstrate to the developer and the customer that the software meets its requirements.
To discover situations in which the behavior of the software is incorrect, undesirable or does not confirm to its specification.
- A successful test makes the system perform incorrectly.
- The test cases are designed to expose defects.
An Input-Output Model Of Software Testing
Abroader process of Validation and Verification.
The process of Validating and Verifying that a software program or application or product: Meets the business and technical requirements that guided it's design and development.
Validation
"Are We Building the Right Product"
(The Software Should Do What The User Really Requires)
Verification
"Are We Building The Product Right"
(The Software Should Conform To Its Specification)
Validation and Verification (V & V) Goals
Confidence: system is ‘fit for purpose’.
Start as soon as requirements become available.
Continue through all stages of the development process.
Depends on
Software purpose: The level of confidence depends on how critical the software is to an organisation.
User expectations: Users may have low expectations of certain kinds of software.
Marketing environment: Getting a product to market early may be more important than finding defects in the program.
Verification And Validation Techniques
Software inspections & Review (Static)
Confidence: system is ‘fit for purpose’.
Start as soon as requirements become available.
Continue through all stages of the development process.
Depends on
Software purpose: The level of confidence depends on how critical the software is to an organisation.
User expectations: Users may have low expectations of certain kinds of software.
Marketing environment: Getting a product to market early may be more important than finding defects in the program.
Software inspections & Review (Static)
- Concerned with analysis of the static system representation to discover problems.
- Concerned with exercising and observing product behaviour
- The system is executed with test data and its operational behaviour is observed.
Applicable to any representation of the system (requirements, design, configuration data, test data, etc.).
Does not require execution of a system.
Can be used before implementation.
An effective technique for discovering program errors.
Examine the source representation with the aim of discovering anomalies and defects.
Does not require execution of a system.
Can be used before implementation.
An effective technique for discovering program errors.
Examine the source representation with the aim of discovering anomalies and defects.
Advantages of inspections
Errors may mask (hide)other errors. No need to be concerned with interactions between errors.
Incomplete versions of a system can be inspected without additional costs.
Can consider broader quality attributes of a program, such as compliance with standards, portability and maintainability.
Can look for inefficiencies, inappropriate algorithms and poor programing styles that could make the system difficult to maintain and update.
Incomplete versions of a system can be inspected without additional costs.
Can consider broader quality attributes of a program, such as compliance with standards, portability and maintainability.
Can look for inefficiencies, inappropriate algorithms and poor programing styles that could make the system difficult to maintain and update.
DEFECT TESTING
Development testing: The system is tested during development to discover bugs and defects.
Release testing: A separate testing team test a complete version of the system before it is released to users.
User testing: Users or potential users of a system, test the system in their own environment.
DEVELOPMENT TESTING
Includes all testing activities that are carried out by the team developing the system.
Unit testing
Component testing
System testing
UNIT TESTING
What is Unit Testing
Isolate each part of the system and show that the individual parts are correct.
i.e. Testing individual components in isolation.
Units may be:
Individual functions or methods within an object
Object classes with several attributes and methods
Composite components with defined interfaces used to access their functionality.
Isolate each part of the system and show that the individual parts are correct.
i.e. Testing individual components in isolation.
Units may be:
Individual functions or methods within an object
Object classes with several attributes and methods
Composite components with defined interfaces used to access their functionality.
Choosing unit test cases
The test cases should show
when used as expected, the component that you are testing does what it is supposed to do.
If there are defects in the component, these should be revealed by test cases.
Two types of unit test cases
normal operation of a program and should show that the component works as expected.
abnormal inputs to check that these are properly processed and do not crash the component.
Partition testing
Divide input test data into partitions.
Input data and output results often fall into different classes where all members of a class are related
Assumption: any input within the partition is equivalent the program behaves in an equivalent way for each class member.
Test cases should be chosen from each partition. Test each partition.
Equivalent partitioning.
Equivalence partitioning
Testing guidelines (sequences)
Using only a single value
Use different sizes in different tests.
Derive tests so that the first, middle and last elements of the sequence are accessed.
Sequences of zero length.
COMPONENT TESTING
What is a Component?
What is a Component?
Composite components are made up of several interacting objects.
Access the functionality of these objects through the defined component interface.
Testing composite components should focus on showing that the component interface behaves according to its specification.
Software.
Interface Testing
Detect faults due to interface errors or invalid assumptions about interfaces.
Interface types
Parameter interfaces: Data / function references passed from one component to another.
Shared memory interfaces: Block of memory is shared between components. Data is placed in memory by one sub-system and retrieved from there by another sub system.
Procedural interfaces: Sub-system encapsulates a set of procedures to be called by other sub-systems.
Message passing interfaces: Sub-systems request services from other sub-systems by passing a message.
Interface Errors
Interface misuse
A calling component calls another component and makes an error in its use of its interface e.g. parameters in the wrong order.
Interface misunderstanding
A calling component embeds assumptions about the behaviour of the called component which are incorrect.
Timing errors
The called and the calling component operate at different speeds and out-of-date information is accessed.
Interface misuse
A calling component calls another component and makes an error in its use of its interface e.g. parameters in the wrong order.
Interface misunderstanding
A calling component embeds assumptions about the behaviour of the called component which are incorrect.
Timing errors
The called and the calling component operate at different speeds and out-of-date information is accessed.
What is Stress Testing
It is a form of software testing that is used to determine the stability of a given system.
A type of non-functional testing.
It involves testing beyond normal operational capacity(breaking point), in order to observe the results.
It put greater emphasis on robustness, availability, and error handling under a heavy load, rather than correct behavior under normal circumstances.
SYSTEM TESTING
Involves integrating components to create a version of the system and then testing the integrated system.
The focus is testing the interactions between components.
System testing checks that components are compatible, interact correctly and transfer the right data at the right time across their interfaces.
System testing tests the emergent behavior of a system.
Use-case testing
The use-cases developed to identify system interactions can be used as a basis for system testing.
Each use case usually involves several system components so testing the use case forces these interactions to occur.
The sequence diagrams associated with the use case documents the components and interactions that are being tested.
No comments:
Post a Comment