Friday 8 February 2013

SOFTWARE TESTING

                                INTRODUCTION

1.What is testing?

Testing is the practice of making objective judgments regarding the extent to which the system(device) meets,exceeds or finals to meet started objectives


Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test..

Testing involves any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results..


2.Why is testing important?

A good testing program is a tool for both the agency and the integrator/supplier; it typically identifies the end of the “development” phase of the project, establishes the criteria for project acceptance, and establishes the start of the warranty period.


Importance of Software Testing

As we all are human beings and human beings commit errors in any process, some of the errors do not impact much on our day to day life and can be ignored, however some errors are so severe that they can break the whole system or software. In such kind of situations you need to take care that such errors are caught well in advance before deploying the system/software in production environment.
EXAMPLE:

  1. Lets take some ABC banks net banking website, if any net banking customer logs into the website and transfers some amount to other account. After transferring he got the confirmation that amount got transferred successfully and it got deducted from his account. After sometime when he confirmed with other person whom he transferred the amount he got to know that he has not received the amount, now you need to visit your bank to settle this dispute. Also you will get annoyed by the net banking experience of that bank.
This is one situation where testing your software is very important before deploying it. Testing cannot be ignored because it impacts all the end users of software.
If the website would have got tested thoroughly for all the possible user operations this problem would have been found well in advance and got fixed before deploying the website.

3.Types of Software Testing:


In Software Testing you can classify testing in many types according to the specific test requirement which it addresses. There are many types of testing...

  • Accessibility Testing
The testing which determines the ease of usage of any system or software by end users with disabilities is known as accessibility testing.

  •  Ad-hoc Testing
Ad-hoc testing is not carried out formally, there is no formal documentation, no test preparation, no test design techniques used and end results are also not expected.

  •   Agile Testing

Testing done for the projects which is using agile development methodologies like Xtreme Programming(XP) and following test first design paradigm is known as agile testing. In agile testing test driven development is followed in which the development is considered as a customer of testing

  • Mutation Testing or Back to Back Testing
In back to back testing two or more varients of the software component or system are executed with the same set of inputs and the outcome of both components is compared and checked for any discrepancies.

  • Big Bang Testing

It is a type of Integration Testing, in this testing the software components or hardware components or both are combined all at once to form a major component or a whole system. It does not combine components in stages as in top down or bottom up approach.

  • Compliance Testing

Compliance Testing tests the software for compliance with various policies like organizational policies or Industry standard policies.

  • Concurrency Testing

As the name suggests concurrency testing tests the concurrent operation on the software. It tests how the software will handle two or more activities at the same time interval. 

  • Data Driven Testing

In data driven testing the test input and expected results are stored in a table or spreadsheet and a single script is executes all the test inputs in the spreadsheet.

  • Data Integrity Testing or Database Integrity Testing

Database integrity testing tests the processes and methods used to access database to make sure that the processes and methods work as expected and data is not corrupted, deleted, updated during the access to the database.

  • Documentation Testing

Documentation testing is done to test the quality of various software documentation like user guides, install guides, help etc.

  • Exhaustive Testing

Testing all the possible combinations of input values and preconditions is know as exhaustive testing.

  • Isolation Testing


In isolation testing the individual components are tested in isolation without the surrounding components and if required the surrounding components are simulated by STUB or DRIVER.

some other important types of testing


                                                             TEST LEVELS

1.Unit Testing

Unit is the smallest testable part of the software system. Unit testing is done to verify that the lowest independent entities in any software are working fine. The smallest testable part is isolated from the remainder code and tested to determine whether it works correctly.

  • Why is Unit Testing important

Suppose you have two units and you do not want to test the units individually but as an integrated system to save your time.
Once the system is integrated and you found error in an integrated system it becomes difficult to differentiate that the error occurred in which unit so unit testing is mandatory before integrating the units.
When developer is coding the software it may happen that the dependent modules are not completed for testing,in such cases developers use stubs and drivers to simulate the called(stub) and caller(driver) units. Unit testing requires stubs and drivers, stubs simulates the called unit and driver simulates the calling unit.
Lets explain STUBS and DRIVERS in detail.

  • STUBS:

Assume you have 3 modules, Module A, Module B and module C. Module A is ready and we need to test it, but module A calls functions from Module B and C which are not ready, so developer will write a dummy module which simulates B and C and returns values to module A. This dummy module code is known as stub.

  • DRIVERS:

Now suppose you have modules B and C ready but module A which calls functions from module B and C is not ready so developer will write a dummy piece of code for module A which will return values to module B and C. This dummy piece of code is known as driver.
2.Integration Testing


In integration testing the individual tested units are grouped as one and the interface between them is tested. Integration testing identifies the problems that occur when the individual units are combined i.e it detects the problem in interface of the two units. Integration testing is done after unit testing.

There are mainly three approaches to do integration testing.


  • Top-down Approach

Top down approach tests the integration from top to bottom, it follows the architectural structure.

Example: Integration can start with GUI and the missing components will be substituted by stubs and integration will go on.

  • Bottom-up approach

In bottom up approach testing takes place from the bottom of the control flow, the higher level components are substituted with drivers

  • Big bang approach

In big bang approach most or all of the developed modules are coupled together to form a complete system and then used for integration testing.

3.System Testing

Testing the behavior of the whole software/system as defined in software requirements specification(SRS) is known as system testing, its main focus is to verify that the customer requirements are fulfilled.

System testing is done after integration testing is complete. System testing should test functional and non functional requirements of the software.

Following types of testing should be considered during system testing cycle. The test types followed in system testing differ from organization to organization however this list covers some of the main testing types which need to be covered in system testing.

  • Sanity Testing

When there are some minor issues with software and a new build is obtained after fixing the issues then instead of doing complete regression testing a sanity is performed on that build. You can say that sanity testing is a subset of regression testing.
Sanity testing is done after thorough regression testing is over, it is done to make sure that any defect fixes or changes after regression testing does not break the core functionality of the product. It is done towards the end of the product release phase.
Sanity testing follows narrow and deep approach with detailed testing of some limited features.
Sanity testing is like doing some specialized testing which is used to find problems in particular functionality.
Sanity testing is done with an intent to verify that end user requirements are met on not.
Sanity tests are mostly non scripted

  • Usability Testing

Usability means the software's capability to be learned and understood easily and how attractive it looks to the end user.
Usability Testing is a black box testing technique. BlackBox testing doesn't requires knowledge of internal code/structure of the system/software.
Usability Testing tests the following features of the software.
1. How easy it is to use the software.
2. How easy it is to learn the software.
3. How convenient is the software to end user.
 

  • Stress Testing

Stress testing tests the software with a focus to check that the software does not crashes if the hardware resources(like memory,CPU,Disk Space) are not sufficient.
Stress testing puts the hardware resources under extensive levels of stress in order to ensure that software is stable in a normal environment.
In stress testing we load the software with large number of concurrent users/processes which can not be handled by the systems hardware resources.
Stress Testing is a type of performance testing and it is a non-functional testing.
Examples:
  1. Stress Test of the CPU will be done by running software application with 100% load for some days which will ensure that the software runs properly under normal usage conditions.
     
  2. Suppose you have some software which has minimum memory requirement of 512 MB RAM then the software application is tested on a machine which has 512 MB memory with extensive loads to find out the system/software behavior.


  • Load Testing
Load testing tests the software or component with increasing load, number of concurrent users or transactions is increased and the behavior of the system is examined and checked what load can be handled by the software.
The main objective of load testing is to determine the response time of the software for critical transactions and make sure that they are within the specified limit.
It is a type of performance testing.
Load Testing is non-functional testing.

  • Performance Testing

Performance Testing is done to determine the software characteristics like response time, throughput or MIPS (Millions of instructions per second) at which the system/software operates.
Performance Testing is done by generating some activity on the system/software, this is done by the performance test tools available. The tools are used to create different user profiles and inject different kind of activities on server which replicates the end-user environments.
The purpose of doing performance testing is to ensure that the software meets the specified performance criteria, and figure out which part of the software is causing the software performance go down.
Performance Testing Tools should have the following characteristics:
It should generate load on the system which is tested
It should measure the server response time
It should measure the throughput.

  • Regression Testing

Regression Testing is done to find out the defects that arise due to code changes made in existing code like functional enhancements or configuration changes.
The main intent behind regression testing is to ensure that any code changes made for software enhancements or configuration changes has not introduced any new defects in the software.
Anytime the changes are made to the existing working code, a suite of test cases is executed to ensure that the new changes have not introduced any bugs in the software.
It is necessary to have a regression test suite and execute that suite after every new version of software is available.
Regression test suite is the ideal candidate for automation because it needs to be executed after every new version.

  • Maintenance Testing

Maintenance Testing is done on the already deployed software. The deployed software needs to be enhanced, changed or migrated to other hardware. The Testing done during this enhancement, change and migration cycle is known as maintenance testing.
Once the software is deployed in operational environment it needs some maintenance from time to time in order to avoid system breakdown, most of the banking software systems needs to be operational 24*7*365. So it is very necessary to do maintenance testing of software applications.
In maintenance testing, tester should consider 2 parts.
  • Any changes made in software should be tested thoroughly.
  • The changes made in software does not affect the existing functionality of the software, so regression testing is also done.
Why is Maintenance Testing required

User may need some more new features in the existing software which requires modifications to be done in the existing software and these modifications need to be tested.
End user might want to migrate the software to other latest hardware platform or change the environment like OS version, Database version etc. which requires testing the whole application on new platforms and environment.

  • Security Testing

Security Testing tests the ability of the system/software to prevent unauthorized access to the resources and data. 
Security Testing needs to cover the six basic security concepts: confidentiality, integrity, authentication, authorization, availability and non-repudiation.

  1. Confidentiality  A security measure which protects against the disclosure of information to parties other than the intended recipient that is by no means the only way of ensuring the security.
  2. Integrity  A measure intended to allow the receiver to determine that the information which it is providing is correct.Integrity schemes often use some of the same underlying technologies as confidentiality schemes, but they usually involve adding additional information to a communication to form the basis of an algorithmic check rather than the encoding all of the communication.
  3. Authentication:The process of establishing the identity of the user.Authentication can take many forms including but not limited to: passwords, biometrics, radio frequency identification, etc.
  4. Authorization :The process of determining that a requester is allowed to receive a service or perform an operation.
Access control is an example of authorization.
      5.   Availability :Assuring information and communications services will be ready for use when expected.
Information must be kept available to authorized persons when they need it.
       6.   Non-repudiation :A measure intended to prevent the later denial that an action happened, or a communication that took place etc.
In communication terms this often involves the interchange of authentication information combined with some form of provable time stamp.


  • Accessibility Testing

The testing which determines the ease of usage of any system or software by end users with disabilities is known as accessibility testing.





No comments:

Post a Comment