Introduction
Testing is
carried out primarily for unearthing any and all defects present in the system and
to prevent a defective product reaching the customers. Secondarily, testing is
also carried out to convince the customer that the product conforms to and fulfils
the specifications and the functionality specified and agreed to. Software
Testing is recognized as a very important activity in software development. Of late,
the importance of independent testing – that is testing by persons not involved
in the development of software – is increasingly being recognized, so much so,
software
companies
specialized only in software testing are established and are doing good business.
Also significant is the fact that - as the complexity and size of the software increased
multi-fold – so has the complexity of testing as well as the types of testing increased.
As a result, there is a paradigm shift in the estimation of testing effort from
being taken as a percentage of development effort, to independent size
estimation and effort estimation.
Testing Basics
There are
basically two techniques of testing:
1. White Box
2. Box Testing
White Box
testing involves stepping through every line of code, and every branch in the code.
To use this technique, the tester should be knowledgeable about the programming
language and should know the structure of the program.
In Black
Box testing, a set of inputs is given to the software and the outputs delivered
by the software are compared with the expected outputs. To use these
techniques, the tester should have knowledge about the functionality of the
system.
Testing Scenarios
Software
testing as stated above is carried in two independent scenarios –
1. Project Testing or Embedded Testing –
that is testing, which is carried out as part of a software development project
– this is carried out to ensure that the development work is defect-free.
2. Product Testing – testing that is
carried out for a COTS (Commercial Off-The-Shelf) software product. This is to
ensure that the products work without any defects in a variety of customer
scenarios. Those scenarios are described below:
Project Testing / Embedded Testing
When
software is developed as product that is delivered to a single client or intended
to be used at a single location, the following testing takes place, in addition
to software inspections (peer reviews) –
1. Unit Testing – it is performed
by the person who wrote the code and by an independent peer using white box
testing technique.
2. Integration Testing – carried
out either as one-off (that is, when all integration is completed) or
incrementally (that is, whenever one unit of software integrated and continued
till all units are integrated). Black Box testing is used in one-off Integration
Testing and white box testing can be, perhaps, used in incremental integration
testing.
3. System Testing – to ensure
that the software works in all intended target systems.
4. User Acceptance Testing – to obtain
customer sign-off so that software can be delivered. Optionally, many other
tests can be conducted at the behest of the customer.
Product Testing
Product
would be developed as a project first and would undergo all the tests that a project
normally undergoes, namely, unit, integration, and system testing. System
testing is carried out more rigorously and on multiple systems. In addition, it
needs some more rigorous tests. These are –
- Load Testing – in web applications and multi-user applications, large numbers of users are logged in and try to use the software in a random manner. The objective is to see if the software is managing multiple requests and serving up accurate results or mixing them up. . This unearths the issues connected with the bandwidth, database, sufficiency of RAM, hard disk etc
- Volume Testing – subject the software to a high volume of data and see the performance, whether it degrades.
- Functional Testing – test that all functions expected of the software are functioning correctly.
- End-to-End Testing – in this type of testing, one entity is tracked from birth to death in the application. For example, in a payroll application, an employee joins the system; then is promoted; then is demoted; salary increases are effected, salary decreases are effected; kept in abeyance; transferred, then retired, dismissed, terminated and so on to ensure that the state transitions designed in the applications happen as desired
- Parallel Testing – a number of users using the same function and are either inputting or requesting same data. This brings out the system’s ability to handle requests at the same time and preserving the data integrity.
- Concurrent Testing – Concurrent testing is carried out to unearth issues when two or more users use the same functionality and update or modify same data with different values at the same time – normally using a testing tool. For example, take ticket reservation scenario, there is only one seat and it is shown as available to two people. When both confirm purchase, the system should give to only one and reject the other request. It should not happen that money is collected from both credit cards and reserve for only one – the credit card transaction must be reversed for the rejected party. Scenarios like this will be tested.
- Stress Testing – cause stress to the software by making expected resources unavailable or causing deadlock like scenarios or not releasing resources and so on to ensure that the software has routines built in to handle such stress. This will bring out software responses for events like machine-rest, Internet disconnection, server timeouts etc.
- Positive Testing – test the software as specified and not trying any negative acts – to ensure that all defined functions are performing. Used mostly for customer / end user acceptance testing.
- Negative Testing – using the software in a manner that is not expected to be used – this will bring out all hidden defects in the software. This is to ensure even malicious usage would not affect the software or data integrity.
- User Manual Testing – use the software conforming to the user manual to ensure that they both are in synch with each other
- Deployment Testing – Simulate the target environment and deploy the software and ensure that deployment specified is appropriate.
- Sanity Testing – this cursory testing to ensure that the components, of software package, are complete and are of appropriate versions, carried out before delivery or before making a software-build.
- Regression Testing – testing carried out after unearthed defects are fixed
- Security Testing – testing to ensure vulnerability against the threat of viruses and spy-ware
- Performance Testing – testing to ensure that the response times are in acceptable range
- Usability Testing – testing the software for different types of usage to ensure that it satisfactorily fulfils the requirements of specified functional areas
- Install / uninstall Testing – test the software on all target platforms to ensure that install and uninstall operations are satisfactorily performed
- Comparison Testing – testing the product with competing products to contrast the differences for determining the relative position of the product
- Intuitive Testing – testing without reference to user manuals to see if the product can be used without much reference to user guides
It is rare
that all the above types of testing are carried out for every project that is executed
in the organization, but it is common for product testing to include many of
the above tests.