You are on page 1of 17

Software Testing Short Note

Software is a set of programs or set of instructions which is design to perform a well


define function.
Through testing we can identify errors or missing requirements.
Why testing is needed?

 To save time.
 To save money
 To check errors.
 To identify whether there are bugs or not.
 To identify whether requirements achieve or not.
 To avoid harmfulness to people, environment, companies, and other system.
Identify the cause of software bug.
 Error – a human action that produces an incorrect result.
 Fault – an error in software also known as a defect or bug.
 Failure – deviation of the software from its expected delivery or service.

Most Important phase 

STLC – Software Testing Life Cycle

Requirement Analysis

Test Planning

Test Designing

Test Environmental Setup

Test Execution

Test Closure
Requirement Analysis
 After SRS (System Requirement Specification) is ready the testing team starts a
high level analysis concerning application under test. (What to test/how to test).
 The requirements may be functional or non-functional.
 This phase will produce Requirement Traceability Matrix (RTM) document.
 This document will link requirements throughout the validation process.
 This purpose of RTM document is to ensure that all requirements define for a
system are tested.
Activities perform
 Define the scope.
 Prepare the RTM document.
 Automation analysis.
Test Planning

 Test planning is the activity of verifying the mission of testing.


 In here test team plans the strategy and approach. (What is to be tested?/
What resources are required to test?)
 Major deliverable of this phase is the Test Plan.
 Test plan is a document describing the scope approach, resources and
schedule of intended test activities.
 It identifies other test items, the features to be tested, the testing task and
who will do each task.
 It identifies the test environment, the test design techniques and entry and
exit criteria.
A test plan includes,
 Introduction to test plan document.
 List of test cases included in testing the application.
 List of features to be tested.
 List of deliverables that need to be tested.
 The resources allocated for testing application.
 A schedule of task and milestones to be achieve.
Qualities of a good test plan,
 Concise – should be shorted
 No redundancy – should not be repeated
 Specific
 List and tables have been used
 No lengthy paragraph
 Updated
Activities perform
 Determine the scope of the project.
 Determine the risks of the project.
 Identify the objectives of the testing.
 Determine the test approach, test techniques, test items, coverage,
identify teams.
 Determine the resources required.
 Schedule.
 Implement rest strategy
 Determine exit criteria.

Test Designing
 This phase involves creation, verification and rework of test cases and test
scripts.
 Test data is identified, created and is reviewed.
 Deliverables are test cases, test scripts and test data.

Activities perform
 Create test cases.
 Review test cases and test scripts.
 Create test data
Test Case,
 Set of conditions under which a tester will determine whether a system under
test satisfies requirements or work correctly.
 This may include test case identifier, test case name, objective, test
conditions, input data requirements, test procedure, expected results.
A good test case,
 Use only one thing to test at a given time.
 Ensure that all positive scenarios and negative scenarios are covered.
 Write in a simple language, use active voice and use exact names.

Test Script
 A test script is a set of instructions that is performed on a system under test to
verify that the system perform as expected.
 Written using a scripting languages. (Javascript, python).
 Used to automated tested.

Test Environmental Setup


 Test environment decide the software and hardware conditions under which a
product is tested.

Activities perform

 Understand the required architecture and environment setup.


 Prepare hardware and software requirement list for the test environment.
 Setup the test environment and test data.
 Deliverable is ready with test data setup.

Test Execution
 Execution of test cases/scripts in the test environment is done.
 Bugs will be reported back to development team for correction and retesting
will be performed.
Activities perform

 Execute test as per the test plan.


 Document the test result and log defects for failed test cases.
 Re test the fixed defects.
Deliverables are,
 Completed RTM with execution status.
 Update the test cases with results.
 Defect report.

Test Closure
 Evaluate cycle completion criteria based on time, test coverage, cost, critical
business objectives, and quality.
 Document the learning out of the project.
 Prepare test closure report.( Document that gives a summary of all the test
conducted during the STLC).
 Test results analysis.


SDLC – Software Development Life Cycle

Planning

Analyses

Designing

Development

Testing

Implementation

Maintenance
Test Models

 V Model
 Spiral Model
 Waterfall Model (Sequential Model)
 Incremental Model
 Iterative Model

V Model

Business Requirement Acceptance test planning Acceptance testing


Analysis and designing

System testing
System test planning
System Design
and designing

Integration testing
Integration test
Architectural
planning and designing
Design

Unit test planning and Unit testing


Module
designing
Design
Verification
Validation

Coding

 V model is a SDLC model.


 It is also known as verification and validation model.
 Execution of phases happens in a sequential manner.
 V model links development activities to their corresponding later testing
activities.
 It is an extension of the waterfall model.
 This is a highly disciplined model.
 There are two main process.
 Verification
 Validation
Verification Process
Business requirement analysis

 Product requirements are understood.


 Acceptance test design planning is done.
System Design

 Complete system is designed according to the product requirement.


 System test plan is developed based on the system design.
Architectural Design

 Broken down further into modules taking up different functionality.


 Integration test is designed.
 Based on the technical and financial feasibility the final decision is taken.
 Referred as High Level Design.
Module Design
 Referred as Low Level Design.
 Compatible with the other modules in the system architecture and the other
external systems.
Coding

 System modules are designed.


 Suitability programming language is decided based on the system and
architectural requirements.
Validation Process
Unit Testing
 Unit tests designed in the module design executed in this phase.
 Each module is designed separately.
Integration Testing
 Perform to test the coexistence and communication of the internal modules
within the system.
System Testing

 Check the entire system functionality and the communication of the system
with external systems.
 Checks compatibility issues with the other systems available in the user
environment.
 Also discovered defects in the actual user environment.

Advantages Disadvantages

Highly disciplined model High risk


Not a good model for complex and
Phases are completed one at a time
object oriented projects
Well for small projects where
requirements are very well Poor model for long and ongoing
understood

Waterfall Model

Requirement Analysis

System Design

Implementation

Testing

Deployment

Maintenance
Requirement Analysis

 All possible requirements of the system are captured.


 They are documented. (SRS document)
System Design

 Requirement specifications studied and the system design is prepared.


Implementation
 With the help of system design the system is first developed in small programs
called units.
 Each unit is developed and tested for its functionality.
Testing

 All the units developed in the implementation phase are integrated into a
system after testing of each unit.
 Then the entire system is tested for any faults.
Deployment

 Once the functional and non-functional testing is done the product deploy in
the customer environment and also release into the market.
Maintenance

 Some changes are done to fix the issues in the system.

Testing Levels
Unit Testing
 Unit testing is a method by which individual units of source code are tested to
determine if they are fit for use. A unit is the smallest testable part of an
application like functions / procedures, classes, interfaces.
 A unit test provides a strict, written contract that the piece of code must satisfy.
As a result, it affords several benefits. Unit tests find problems early in the
development cycle.
Integration Testing

 Integration testing tests integration or interfaces between components,


interactions to different parts of the system such as an operating system, file
system and hardware or interfaces between systems.
 Integration Testing types are,
Big Bang Testing
Top Down Testing
Bottom Up Testing
Big Bang Testing
 All components or modules are tested as a whole.
 Advantage is everything is finished before the integration testing starts.
 Main disadvantage is time consuming and difficult to trace the cause of failures.
Bottom Up Testing

 This testing begins with unit testing followed by tests of progressively higher
level combinations of units called modules or builds.
Top Down Testing
 Highest level modules are tested first and progressively lower level modules are
tested after that.
System Testing

 It verify whether all the system elements have been integrated & perform the
allocated functions.
 System testing is so important because of the following reasons:
 First step in the Software Development Life Cycle, where the application
is tested as a whole.
 The application is tested thoroughly to verify that it meets the functional
and technical specifications.
 The application is tested in an environment which is very close to the
production environment where the application will be deployed.
 Enables tp test, verify and validate both the business requirements as
well as the Applications Architecture.
Acceptance Testing
 Acceptance tests are not only intended to point out simple spelling mistakes,
cosmetic errors or Interface gaps, but also to point out any bugs in the
application that will result in system crashers or major errors in the application.
 There are also legal and contractual requirements for acceptance of the system
Alpha testing
 Alpha testing is one of the most common software testing strategy used in
software development. It’s specially used by product development
organizations.
 Alpha testing is testing of an application when development is about to
complete. Minor design changes can still be made as a result of alpha testing.
 Alpha testing is final testing before the software is released to the general
public. It has two phases:
 In the first phase of alpha testing, the software is tested by in-house
developers. They use either debugger software, or hardware-assisted
debuggers. The goal is to catch bugs quickly.
 In the second phase of alpha testing, the software is handed over to
the software QA staff, for additional testing in an environment that is
similar to the intended use.
Beta testing

 It is also known as field testing. It takes place at customer’s site. It sends the
system to users who install it and use it under real-world working conditions.
 Originally, the term alpha test meant the first phase of testing in a software
development process. The first phase includes unit testing, component testing,
and system testing. Beta testing can be considered “pre-release testing.
Testing Varieties

Functional Testing Non-Functional Testing

Functional Testing

 Based on what the system does.


 Based on documented functions of the system.
 Performed at all test levels.
 Consider external behavior of the system.
 Types are,
 Unit testing
 Integration testing
 System testing
 Regression testing
 Acceptance testing
 Alpha testing
 Beta testing
 Smoke testing
 Sanity testing
 User acceptance testing

Non Functional Testing

 Based on how system works.


 Performed at all test levels.
 Test the characteristics of the system.
 Types are,
 Performance testing
 Load testing
 Stress testing
 Usability testing
 Security testing
 Portability testing
 Maintainability testing
 Install and Uninstall testing
 Recovery testing
 Compatibility testing

White-Box Testing
• White box testing is the detailed investigation of internal logic and structure of
the code.
• White box testing is also called glass testing or open box testing.
• In order to perform white box testing on an application, the tester needs to
possess knowledge of the internal working of the code.
• The tester needs to have a look inside the source code and find out which
unit/chunk of the code is behaving inappropriately.

What do you verify in White Box Testing?

 White box testing involves the testing of the software code for the following:

 Internal security holes


 Broken or poorly structured paths in the coding processes
 The flow of specific inputs through the code
 Expected output
 The functionality of conditional loops
 Testing of each statement, object and function on an individual basis

 The testing can be done at system, integration and unit levels of software
development.
 One of the basic goals of white box testing is to verify a working flow for an
application.
 It involves testing a series of predefined inputs against expected or desired
outputs
 so that when a specific input does not result in the expected output, you have
encountered a bug.
Steps to perform White Box Testing

1) UNDERSTAND THE SOURCE CODE

2) CREATE TEST CASES AND EXECUTE

Sources for test case design


o The requirements to the program (its specification)
o An informal description
o A set of scenarios (use cases)
o A set of sequence diagrams
o A state machine
o Heuristics
o Experience

Tools used for White Box Testing:


 Googletest
 NUnit
 JUnit

Types of White Box Testing

 Unit testing

Advantages of White Box Testing

 Code optimization by finding hidden errors.


 White box tests cases can be easily automated.
 Testing is more thorough as all code paths are usually covered.
 Testing can start early in SDLC even if GUI is not available.
Disadvantages of White Box Testing

 White box testing can be quite complex and expensive.


 Developers who usually execute white box test cases detest it.
 White box testing requires professional resources, with a detailed
understanding of programming and implementation.
 White-box testing is time-consuming, bigger programming applications
take the time to test fully.

Black Box Testing

 Black box testing is a software testing techniques in which functionality of the


software under test (SUT) is tested without looking at the,

 internal code structure,


 implementation details, and
 knowledge of internal paths of the software.

 This type of testing is based entirely on the software requirements and


specifications.
 In BlackBox Testing we just focus on inputs and output of the software
system without bothering about internal knowledge of the software program.

Black-box testing uncovers errors of the following categories:


– In-correct or missing functions
– Interface errors
– Errors in the data structures or external data base access
– Performance errors
– Initialization and termination errors

Steps to perform Black Box Testing

 Initially requirements and specifications of the system are examined.


 Tester chooses valid inputs (positive test scenario) to check whether SUT
processes them correctly .
 Also some invalid inputs (negative test scenario) are chosen to verify that
the SUT is able to detect them.
 Tester determines expected outputs for all those inputs.
 Software tester constructs test cases with the selected inputs.
 The test cases are executed.
 Software tester compares the actual outputs with the expected outputs.
 Defects (if any) are fixed and re-tested.

Types of Black Box Testing

 Functional testing
 Non-functional testing
 Regression testing

Tools used for Black Box Testing:

Tools used for Black box testing largely depends on the type of black box testing
you are doing.

 For Functional/ Regression Tests you can use –

 QTP,
 Selenium

 For Non-Functional Tests, you can use –

 Loadrunner,
 Jmeter

Black Box Testing -Advantages:

– Well suited and efficient for large code segments.

– Code Access not required.

– Clearly separates user’s perspective from the developer’s perspective through


visibly defined roles.

– Large numbers of moderately skilled testers can test the application with no
knowledge of implementation, programming language or operating systems.

Black Box Testing -Disadvantages:

– Limited Coverage since only a selected number of test scenarios are actually
performed.

– Inefficient testing, due to the fact that the tester only has limited knowledge
about an application.

– Blind Coverage, since the tester cannot target specific code segments or error
prone areas.
– The test cases are difficult to design.

You might also like