Monday, 3 November 2014

Functional and Non Functional types of Testing

Functional Testing
Functional Testing refers to verifying if the module performs its intended functions in accordance with the specification. The purpose is to ensure that the application’s behavior is as expected.
Different types of functional testing are explained below.
Unit Testing
  • Primary test performed on software is the ‘Unit Testing’ to see if a standalone module is working as per the requirements.
  • Testing done on a single, standalone module or unit of code to ensure correctness of the particular module.
  • Focuses on implementation logic, so the idea is to write test cases for every method in the module.
  • The aim of unit testing is to segregate each part of the program and prove that each of them is correct.
  • This type of testing is predominantly undertaken by the developers.
Integration Testing
In this testing individual software modules are combined and tested as a group. It is done after unit testing and before system testing.
It takes the unit tested modules as input, groups them in larger aggregates, applies tests defined in an Integration test plan. An integrated system which is ready for system testing is then delivered as the output.
Data transfer between the integrated modules is thoroughly tested.
Dummy modules interface viz. Stubs and Drivers are used in integration testing.
Drivers are programs designed exclusively for testing the calls to lower layers. It provides emerging low-level modules with simulated inputs and the necessaryresources to function.
Stubs are dummy software components used to simulate the behavior of a real component. They do not perform any real computation or data manipulation. It can be defined as a small program routine that is used in place of a longer program, to be loaded later or that is located remotely.
Two methods of integration are
Incremental
It involves adding unit tested modules one by one and checking each resultant combination. This process repeats till all modules are integrated and tested.
Correction is easy as the source and cause of error could be easily detected.
Big bang
Modules unit tested at isolation are integrated at one go and the integration is tested.
Correction is difficult because isolation of causes is complicated.
strategies of integration are
Bottom-Up Strategy
Process starts with low level modules of the program hierarchy in the application architecture
Test drivers are used
Top-Down Strategy
Starts at the top of the program hierarchy in the application architecture and travels down its Branches
Stubs are used until the actual program is ready
Smoke Testing
This is a quick & non exhaustive test performed on the new version of the software to see whether is performance is up to the required levels to accept it for major testing. This test is used to validate if the major functions of a piece of software work as intended.
Reasons, why a build could be rejected include
  • Major functionalities are not working fine or missing
  • Navigations are not appropriate
  • Look and feel is not according to specification
System Testing
This is a black-box type testing based on overall system requirement specifications. It is carried out end-to-end on an integrated system. During system test execution phase, defects detectable only by testing the entire system are identified.
Regression Testing
Regression testing is performed to check whether a defect fix or enhancement to the system has introduced a new failure. This refers to continuous testing of an application for each new build.
Regression testing should be tightly linked to functional testing, and be built from the successful test cases developed and used in functional testing. These test cases are then run regularly as regression test to verify that the new code being added is not effecting the existing application
User Acceptance testing(in a Black box testing)
One of the last phases of testing is Acceptance testing.It is typically done at the customer place. Generally users perform these tests which are ideally derived from the User Requirements Specification.
Alpha Testing: Simulated or actual operational testing performed by end users within a company but outside the core group which was involved in development.
Beta Testing: Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Sometimes, beta versions are made available to the open public to increase the feedback field to a maximal number of future users.
 
Non Functional Testing
Non functional testing verifies if the application performs its intended functions as per the non functional requirements which could be performance, security, usability, compatibility etc.
Performance Testing:
This testing is carried out to analyze/measure the behavior of the system in terms of time, stability and scalability and the parameters generally used are response time, transaction rates etc. This is done to verify whether the performance requirements have been achieved.
Types of Performance Testing (Not a part of performance testing)
Load Testing
Load testing is defined as type of performance testing where performance of the application is monitored when subjected to different loads. Load is the measure of the number of users using the application. Real time work load situations are simulated for the application under test.
  • It models the expected usage of an application by a simulation of a large number of users’ simultaneously access of the program’s services
  • To determine at what load the system fails or system’s response time degrades
  • Relevance of this test is very high for multi-user systems
Stress testing
Stress testing is conducted to evaluate a system’s performance or that of a component at or beyond the limits of its specified requirements. Ideally, stress testing emulates the maximum capacity the application can support before causing a system outage or disruption. Based on the results of stress testing, system can be configured and fine tuned for optimal performance.
  • This test determines at which point the system fails while subjected to extreme pressure.
  • Useful when systems are being scaled up or being implemented for the first time.
  • System is monitored for performance loss and crashing during the load times.
Endurance Testing
This involves execution of the test with a sustained expected user load, over long period of time with normal ramp up and ramp down. Endurance testing helps in uncovering the performance bottlenecks like memory leaks, which becomes visible when the system is subjected to normal load for a prolonged time.
Volume Testing
Volume testing is the testing where the database is subjected to large data volumes to determine its point of failure. It is used to study the application behavior when the database is populated with production like data and to find the impact on the response time of the application and the overall health of the database.
Scalability Testing
Scalability testing is loading the system with increasing load simulating the expected business growth (user load growth) of the application down the years. This test is done to determine how effectively the system can scale to accommodate the increasing load and for system capacity planning for procurement of more resources down the line.
Compatibility Testing
Test to validate that the application functions the same way across different supported
  1. Hardware and software configurations
  2. Operating systems (OS)
  3. Web browsers
  4. Database types
Globalization Testing
To ensure that internationally localized versions do not have problems unique to language/currency etc
To validate whether application developed provide support for
1. Multi-language
  • Check whether messages are accurate
  • UI objects in all languages reflects same meaning
2. Multi Currency
Localization Testing
Subset of globalization testing and checks for a particular locale
Can be executed only on the localized version of a product
This test is based on the results of globalization testing, which verifies the functional support for a particular culture/locale.
Data Migration Testing
The Data Migration testing is done to validate the migration of the source data to the new platform say from one database to a different database or from one version of the database to a new version of the database.
Data Conversion Testing:
The Data Conversion testing is done to validate the Conversion of the source data to the target data. Data Conversion testing and implementation are practically inseparable. The Data Conversion testing plan should be made to confirm the following:
  • Whether or not the source data type has been converted to the target data type?
  • Is there any loss in the data?
  • Is data integrity maintained?
Security/Penetration Testing:
Security testing evaluates that an Information System maintains confidentiality, availability and integrity of data. The aim of security testing is to assess the sensitivity of the system against unauthorized internal or external access. Testing is done to ensure that unauthorized persons are not given access.
Special skills required for security testing
  • Ability to think like a hacker
  • Being aware of all known vulnerability & exploits
  • Thorough understanding of runtime environment
  • Identification of criticality and sensitivity of data assets
Usability testing
In usability testing, software is evaluated for the easiness with which user can learn and use the application.  Essentially it means testing the software to ensure its ‘user friendliness’.
Install/Un-Install Testing
Testing carried out to evaluate the instructions provided in the manual and the accuracy with which the installed application operates. This testing is carried out to evaluate that no residue remains after the un-installation of the application.
  • Occurs outside the development environment.
  • Includes the inventory of configuration items.
  • Installation test is conducted for demonstrating production readiness.
  • This type of testing frequently occurs on the computer system in which the software product will eventually be installed.
  • Done in case of full or partial upgrades












































































Test Levels

Testing levels are basically to identify missing areas and prevent overlap and repetition between the development life cycle phases. In software development life cycle models there are defined phases like requirement gathering and analysis, design, coding or implementation, testing and deployment.  Each phase goes through the testing. Hence there are various levels of testing.

The various levels of testing are:

1. Unit testing: It is basically done by the developers to make sure that their code is working fine and meet the user specifications. They test their smallest piece of code which they have written like classes, functions, interfaces and procedures. The input for the Unit Testing is from design document. It follows White box testing technique.

2. Component testing: It is also called as module testing. The basic difference between the unit testing and component testing is in unit testing the developers test their piece of code but in component testing the whole component is tested. A small functionality may have few units combining them forms a component.

For example, in a student record application there are two modules one which will save the records of the students and other module is to upload the results of the students. The modules are developed separately and when they are tested one by one then we call this as a component or module testing.

3. Integration testing: Integration testing is done when two modules are integrated, in order to test the behavior and functionality of both the modules after integration. Below are few types of integration testing:

  • Big bang integration testing – All the functionalities are integrated once and the interfaces are tested. It’s a failure model since the failures cannot be exactly pointed out
  • Top down – The main module is created and the sub system or sub modules are placed with the dummy modules called Stubs. The Stubs are the called modules.
  • Bottom up – The sub modules are created first and the main module is placed with the dummy module called Drivers. The Drivers are the calling module.
  • Functional incremental –The modules are functionally incremented and tested.

a. Component integration testing: In the example above when both the modules and components are integrated then the testing done is called as Component integration testing. This testing is basically done to ensure that the code should not break after integrating the two modules.

b. System integration testing: System integration testing (SIT) is a testing where testers basically test that in the same environment all the related systems should maintain data integrity and can operate in coordination with other systems.

4. System testing: In system testing the testers basically test the compatibility of the application with the system. The end to end or whole functionality is tested to verify that it meets all the requirements.

5. Acceptance testing: Acceptance testing is basically done to ensure that the requirements of the specification are met. This is done by the end users, follows the black box testing and the inputs are from the requirement document.

  • Alpha testing: Alpha testing is done at the developer’s site but not by the developers who have developed. It is done at the end of the development process.
  • Beta testing: Beta testing is also called as Field testing which is done at the customer’s site. It is done just before the launch of the product.