0% found this document useful (0 votes)
57 views

Software Testing Unit3

The document discusses software testing, including definitions, objectives, types of testing, and the testing process. Some key points: - Software testing is the process of evaluating software to identify defects and ensure it meets requirements. Common types of testing include unit, integration, system, and black/white box testing. - The objectives of testing are to find errors, report deviations from expected output, and ensure required functionality. - Quality assurance encompasses multiple development activities including testing, while testing itself consists of specific evaluation techniques like unit and integration testing. - The testing process involves planning, designing test cases, implementing tests, executing tests, and reporting results. Both automated and manual testing are used at different stages.

Uploaded by

Jigar Shah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Software Testing Unit3

The document discusses software testing, including definitions, objectives, types of testing, and the testing process. Some key points: - Software testing is the process of evaluating software to identify defects and ensure it meets requirements. Common types of testing include unit, integration, system, and black/white box testing. - The objectives of testing are to find errors, report deviations from expected output, and ensure required functionality. - Quality assurance encompasses multiple development activities including testing, while testing itself consists of specific evaluation techniques like unit and integration testing. - The testing process involves planning, designing test cases, implementing tests, executing tests, and reporting results. Both automated and manual testing are used at different stages.

Uploaded by

Jigar Shah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Software Testing

Testing

■ Formal process in which software unit


or entire software package are
examined by running them on
computer.
■ This leads to higher quality code
What is testing?
■ Testing is a process of executing a software application with the
intent of finding errors and to verify that it satisfies specified
requirements (BS 7925-1)
■ Testing is the process of exercising or evaluating a system or a
system component by manual or automated means to verify that it
satisfies specified requirements or to identify differences
between expected and actual results. (IEEE)
■ Testing is a measurement of software quality in terms of defects
found, for both functional and non-functional software requirements
and characteristics. (ISEB Syllabus)
Objectives of testing

■ To identify and reveal as many errors


■ To report to the development team about
the deviations in the expected output.

■ Development of test plan and ensure for


the required functional requirements
Quality Assurance vs Testing

Quality Assurance Testing


Quality Assurance vs Testing

Quality Assurance

Testing
Quality Assurance
■ Multiple activities throughout the dev
process
⚪ Development standards
⚪ Version control
⚪ Change/Configuration management
⚪ Release management
⚪ Testing
⚪ Quality measurement
⚪ Defect analysis
⚪ Training
Testing
■ Also consists of multiple activities
⚪ Unit testing
⚪ Whitebox Testing
⚪ Blackbox Testing
⚪ Data boundary testing
⚪ Code coverage analysis
⚪ Exploratory testing
⚪ Ad-hoc testing
⚪ …
Testing Axioms
■ Testing cannot show that bugs do not exist

■ Exhaustive testing is impossible for non-trivial applications

■ Software Testing is a Risk-Based Exercise. Testing is done


differently in different contexts, i.e. safety-critical software is
tested differently from an e-commerce site.

■ Testing should start as early as possible in the software


development life cycle

■ The More Bugs you find, the More bugs there are.
Errors, Faults and Failures
■ Error – a human action that produces an
incorrect result
■ Fault/defect/bug – an incorrect step, process
or data definition in a computer program,
specification, documentation, etc.
■ Failure – The deviation of the product from
its expected behaviour. This is a
manifestation of one or more faults.
Common Error Categories

■ Boundary-Related
■ Calculation/Algorithmic
■ Control flow
■ Errors in handling/interpretting data
■ User Interface
■ Exception handling errors
■ Version control errors
What do we test? When do we test it?

■ Design
⚪ Does this satisfy the specification?
⚪ Does it conform to the required criteria?
⚪ Will this facilitate integration with existing
systems?
■ Implemented Systems
⚪ Does the system do what is it supposed to do?
■ Documentation
⚪ Is this documentation accurate?
⚪ Is it up to date?
⚪ Does it convey the information that it is meant to
convey?
Software Testing Strategies

■ BIG BANG TESTING


⚪ To test the software entirely once the
completed package is available
■ Incremental Testing
⚪ Unit Test : Test software in modules
⚪ Integration Test : Test for group of
modules
⚪ System Test : Entire package is tested as
a whole
Software Testing Strategies...

■ Stages of Incremental Testing


⚪ 1. Bottom Up
⚪ 2. Top Down
Software Testing Strategies...

■ Advantages of Incremental testing


⚪ Easy to identify high % of errors
⚪ Correction of errors are simple
⚪ Few resources are required
Levels of Testing
The Testing Process
Test Process...
■ i. Determining test methodology
⚪ Big bang/top down /bottom up
■ ii. Planning the test
⚪ What to test
⚪ Perform Unit/Integration/System testing
⚪ Who has to perform the test
⚪ Where to perform the test
⚪ When and how long testing needs to be carried out
Test Design and Specification
■ Review the test basis (requirements, architecture, design, etc)
■ Evaluate the testability of the requirements of a system
■ Identifying test conditions and required test data
■ Design the test cases
⚪ Identifier
⚪ Short description
⚪ Priority of the test case
⚪ Preconditions
⚪ Execution
⚪ Post conditions
■ Design the test environment setup (Software, Hardware, Network
Architecture, Database, etc)
Test Implementation

■ Only when using automated testing


■ Can start right after system design
■ May require some core parts of the
system to have been developed
■ Use of record/playback tools vs writing
test drivers
Test Implementation
Test Implementation....

STD – Software Test Description


STR - Software test report
TSR - Test Summary Report

..\..\..\software-test-report-template.doc
..\..\..\test-summary-report-template.doc
Test Execution

■ Verify that the environment is properly


set up
■ Execute test cases
■ Record results of tests (PASS | FAIL |
NOT EXECUTED)
■ Repeat test activities
⚪ Regression testing
Black box Testing

Inputs Outputs

■ Confirms that requirements are satisfied


■ Assumes no knowledge of internal workings
■ Examples of black box techniques:
⚪ Boundary Value Analysis
⚪ Error Guessing
⚪ State transition analysis
White box Testing
Method1(a,b){
}
Inputs Method2(a) { Outputs
while(x<5) {

}
}

■ Design tests based on your knowledge of system internals


■ Examples of white box techniques:
⚪ Testing individual functions, libraries, etc
⚪ Designing test cases based on your knowledge of the code
⚪ Monitoring the values of variables, time spent in each method,
etc-
⚪ Code coverage analysis – which code is executing?
Unit Testing

Component Component
A B

Component
C

Database
Integration Testing

Component Component
A B

Component
C

Database
System Testing

Component Component
A B

Component
C

Database
Unit/Integration Testing
Unit/Integration Testing
A good unit test…

■ tests one thing


■ always returns the same result
■ has no conditional logic
■ is independent of other tests
■ is so understandable that it can act as
documentation
Test case design techniques

■ A good test case


⚪ Has a reasonable probability of
uncovering an error
⚪ Is not redundant
⚪ Is not complex
■ Various test case design techniques
exist

You might also like