Software Testing Tutorial

With a purpose to deliver the best software, Software Testing plays a key role in the life cycle of an application.

Software Testing Tutorial

Learn Software Testing with this most complete Software Testing tutorial quickly. Explaining all the concepts of Software Testing, this tutorial explains all the models, levels, types, techniques and tools with the help of interesting diagrams.

Who is this Software Testing Tutorial designed for?

This tutorial on Software Testing will be extremely useful to all beginners, freshers, BCA, BE, BTech, MCA and college students in developing your notes, exam preparation, lab exercises, assignments and viva questions. If you are a professional trying to begin in the field of software testing, you will also find it useful.

What do I need to know to begin with?

A basic understanding of SDLC and programming will help you quickly grab the concepts taught in this tutorial.

Software Testing syllabus covered in this tutorial

This tutorial covers:

Development Process Models, Levels of Software Testing, Software Test Types, Static Testing Techniques, Dynamic Testing Techniques, Management of Testing, Automated Testing & Test Tools, Software Quality Assurance.

This covers almost everything that you would need to learn in Software Testing. So, let's begin!

Introduction

  • Software testing is the process of executing a software program or an application for finding the bugs.
  • It is the process of validating and verifying that a software program, application or product meets businesses and technical requirements.
The definition of software testing can be broken into the following parts:

1. Process
Testing is not a single activity. It is a process in which a series of activities are involved.

2. All Life Cycle Activities
  • Testing process actually takes place throughout the SDLC(Software Development Life Cycle).
  • The process of designing tests early in the life cycle helps to prevent defects that creep into the code.
3. Static testing
  • In static testing, testing and identification of defects is carried out without executing the code.
  • This testing is done in verification process. This testing consists of static analysis and reviewing of documents. For example, reviewing, walkthrough, inspection, etc.
4. Dynamic testing
  • In this testing, the software code is executed for showing the result of tests performed.
  • Dynamic testing is done in validation process i.e unit testing, integration testing, system testing, etc.
5. Planning
In planning, plan the test activities, make a report on testing progress and keep the status of the software under test.

6. Preparation
In preparation, we are required to decide on the type of testing based on the test conditions and designing test cases accordingly.

7. Evaluation
In evaluation, it is necessary to check the results, evaluate the software under test and the criteria of completion. This helps to decide whether the testing is finished and the product has passed the tests.

8. Software products and related work products
In addition to testing the code it is also important to test requirements, design specification and related document i.e operation, user and training material.

Software Bugs

A software bug is an error, mistake, flaw, failure, fault in a computer program.

Terms in software failure

The terms of software failure depend on the working environment of the tester.

Major terms used for software failure are:

1. Defect
2. Variance
3. Fault
4. Failure
5. Problem
6. Inconsistency
7. Error
8. Feature
9. Incident
10. Bug
11. Anomaly

The basic process of testing

The basic process of testing has the following steps:

1. Planning and control
2. Analysis and design
3. Implementation and execution
4. Evaluating exit criteria and reporting
5. Test closure activities

test process

1. Planning and Control

In test planning, it is necessary to understand the goals and objectives of the customer, stakeholders, project and risks.

Following are the major tasks for test planning:
  • To determine the scope and risk, recognize the objectives of testing.
  • Determine the test approach i.e techniques, test items, coverage, recognizing and interfacing with the teams involved in testing.
  • Implement the test policy or test strategy.
  • Determine the essential test resources i.e people, test environment, PC's.
  • Schedule test analysis and design tasks, test implementation, execution and evaluation. It is necessary to schedule all the tasks and activities in such a way that the tester can complete the testing on time.
  • Determine the exit criteria. It is necessary to set the coverage criteria. This criteria is executed during the testing.
Following are the major tasks for test control:
  • The results of reviews and testing are measured and analyzed.
  • It is important to inform project team how much testing has been completed, what are the results, conclusions and the outcome of risk assessment.
  • Provide information on testing. It is necessary to provide regular reports to project manager, customer and other stakeholders to help them and informed about the project status.
  • In test control, begin the corrective actions and make decisions.

2. Analysis and design

Test analysis and design has the following major tasks:
  • Review the test basis i.e risk analysis, requirement architecture, design specifications and interfaces. Test basis is the information which is necessary to start the test analysis and create own test cases.
  • Recognize the test conditions on the basis of test items, their specifications, behavior and structure.
  • Design the tests and evaluate the testability of requirements and system.
  • Design the test environment set-up and recognize any needed infrastructure and tools.

3. Implementation and execution

Test implementation has the following major tasks to be performed:
  • In implementation, test cases are developed using decided techniques and test data for those test cases is generated.
  • For the efficient test execution generate test suites from the test cases.
  • It is necessary to implement and check the test environment.
Following are the major tasks for test execution:
  • To execute the test suites and individual test cases, use the text execution tools as stated by planned sequence or perform manual testing.
  • In execution, compare the actual results with the expected result.

4. Evaluating exit criteria and reporting

On the basis of risk evaluation of the project, set the criteria for each test level and measure “enough testing” against this criteria. This criteria varies from project to project and is called as exit criteria.

Following are the major tasks for evaluating exit criteria:
  • The exit criteria is defined in test planning. Here, test records are checked across the exit criteria.
  • Evaluate more test if designed tests do not run.
  • Write a test summary report to all the customers and stakeholders.

5. Test closure activities

  • In test closure activity, collect data from completed test activities.
  • Test closure activities are completed at the time of delivery of software.
  • Finalize testware i.e scripts, test environment for the future use.

The necessity of testing

Following are the important reasons to perform testing:
  • Software testing is required to identify the defects and errors during the development phases.
  • It is necessary for customer reliability and their satisfaction.
  • It is necessary to verify the quality of the product.
  • It is necessary to give the facilities to the customers i.e the delivery of the quality product or software application that requires lower maintenance cost as results are accurate, consistent and reliable.
  • Testing is needed for an effective performance of the software product.

Basic testing Principles

The basic principles of testing are:

i) Testing shows presence of defects
Testing shows the defects that are present, but it cannot prove there is no defect.

ii) Exhaustive testing is impossible
Testing everything is not possible. Instated of testing exhaustive testing use risks and priorities to focus testing efforts.

iii) Early testing
Testing activities are necessary to start as early as possible in the software development life cycle.

iv) Defect clustering
In testing, most of the defects are related to small number of modules in a system.

v) Pesticide paradox
  • If the same tests are running again and again then the same set of test cases no longer find the new defects.
  • To overcome this 'pesticide paradox' test cases need to be regularly reviewed and revised.
vi) Testing is context dependent
Testing is context dependent. Various kinds of sites are tested differently.

vii) Absence-of-errors fallacy
If the system built is unusable and does not meet the user expectation, then finding and fixing defect does not help.