Integration Testing: Must Know Stuff!

Definition and Terminologies:

In Integration Testing, individual software modules are integrated logically and tested as a group.
A typical software project consists of multiple software modules, coded by different programmers.  Integration testing focuses on checking data communication amongst these modules.
Hence it is also termed as 'I & T' (Integration and Testing), 'String Testing' and sometimes 'Thread Testing'.

Need of Integration Testing:

Although each software module is unit tested, defects still exist for various reasons like
  • A Module in general is designed by an individual software developer whose understanding and programming logic may differ from other programmers. Integration testing becomes necessary to verify the software modules work in unity
  • At the time of module development, there are wide chances of change in requirements by the clients. These new requirements may not be unit tested and hence integration testing becomes necessary.
  • Interfaces of the software modules with the database could be erroneous
  • External Hardware interfaces, if any, could be erroneous
  • Inadequate exception handling could cause issues.
Integration Test Case:
Integration Test case differs from other test cases in the sense it focuses mainly on the interfaces & flow of data/information between the modules. Here priority is to be given for the integrating links rather than the unit functions which are already tested.
Sample Integration Test Cases for the following scenario:Application has 3 modules say 'Login Page', 'Mail box' and 'Delete mails' and each of them are integrated logically.
Here do not concentrate much on the Login Page testing as it's already been done in Unit Testing. But check how it's linked to the Mail Box Page.
Similarly Mail Box: Check its integration to the Delete Mails Module.
hodologies/Strategies of Integration Testing:
The Software Industry uses variety of strategies to execute Integration testing , viz.
  •  Big Bang Approach :
  •  Incremental Approach: which is further divided into following
    •  Top Down Approach
    •  Bottom Up Approach
    •  Sandwich Approach - Combination of Top Down and Bottom Up
Below are the different strategies, the way they are executed and their limitations as well advantages.

Big Bang Approach:

Here all component are integrated together at once, and then tested.

Advantages:

  • Convenient for small systems.

Disadvantages:

  • Fault Localization is difficult.
  • Given the sheer number of interfaces that need to be tested in this approach, some interfaces links to be tested could be missed easily.
  • Since the integration testing can commence only after "all" the modules are designed, testing team will have less time for execution in the testing phase.
  • Since all modules are tested at once, high risk critical modules are not isolated and tested on priority. Peripheral modules which deal with user interfaces are also not isolated and tested on priority.

Incremental Approach:

In this approach, testing is done by joining two or more modules that are logically related. Then the other related modules are added and tested for the proper functioning. Process continues until all of the modules are joined and tested successfully.
This process is carried out by using dummy programs called Stubs and Drivers. Stubs and Drivers do not implement the entire programming logic of the software module but just simulate data communication with the calling module.
Stub: Is called by the Module under Test.
Driver: Calls the Module to be tested.
Incremental Approach in turn is carried out by two different Methods:
  • Bottom Up
  • Top Down

Bottom up Integration

In the bottom up strategy, each module at lower levels is tested with higher modules until all modules are tested. It takes help of Drivers for testing
Diagrammatic Representation:

Advantages:

  • Fault localization is easier.
  • No time  is wasted waiting for all modules to be developed unlike Big-bang approach

Disadvantages:

  • Critical modules (at the top level of software architecture) which control the flow of application are tested last and may be prone to defects.
  • Early prototype is not possible

Top down Integration:

In Top to down approach, testing takes place from top to down following the control flow of the software system.
Takes help of stubs for testing.
Diagrammatic Representation:

Advantages:

  • Fault Localization is easier.
  • Possibility to obtain an early prototype.
  • Critical Modules are tested on priority; major design flaws could be found and fixed first.

Disadvantages:

  • Needs many Stubs.
  • Modules at lower level are tested inadequately.

 

Integration Testing Procedure

The integration test procedure irrespective of the test strategies (discussed above):
  1. Prepare the Integration Test Plan
  2. Design the Test Scenarios, Cases, and Scripts.
  3. Executing the test Cases followed by reporting the defects.
  4. Tracking & re-testing the defects.
  5. Steps 3 and 4 are repeated until the completion of Integration is successfully.

Brief Description of Integration Test Plans:

It includes following attributes:
  • Methods/Approaches to test (as discussed above).
  • Scopes and Out of Scopes Items of Integration Testing.
  • Roles and Responsibilities.
  • Pre-requisites for Integration testing.
  • Testing environment.
  • Risk and Mitigation Plans.

Entry and Exit Criteria.

Entry and Exit Criteria to Integration testing phase in any software development model
Entry Criteria:
  • Unit Tested Components/Modules
  • All High prioritized bugs fixed and closed
  • All Modules to be code completed and integrated successfully.
  • Integration test Plan, test case, scenarios to be signed off and documented.
  • Required Test Environment to be set up for Integration testing
Exit Criteria:
  • Successful Testing of Integrated Application.
  • Executed Test Cases are documented
  • All High prioritized bugs fixed and closed
  • Technical documents to be submitted followed by release Notes.

Best Practices/ Guidelines for Integration Testing

  • First determine the Integration Test Strategy that could be adopted and later prepare the test cases and test data accordingly.
  • Study the Architecture design of the Application and identify the Critical Modules. These need to be tested on priority.
  • Obtain the interface designs from the Architectural team and create test cases to verify all of the interfaces in detail. Interface to database/external hardware/software application must be tested in detail.
  • After the test cases, it's the test data which plays the critical role.
  • Always have the mock data prepared, prior to executing. Do not select test data while executing the test cases.

Unit Testing: Complete Guide

Unit testing of software applications is done during the development (coding) of an application.
The objective of unit testing is to isolate a section of code and verify its correctness. In procedural programming a unit may be an individual function or procedure
The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. Unit testing is usually performed by the developer.

Why do Unit Testing? Why it is important?

Sometimes software developers attempt to save time by doing minimal unit testing. This is a myth because skimping on unit testing leads to higher defect fixing costs during system testing, integration testing and even beta testing after the application is completed. Proper unit testing done during the development stage saves both time and money in the end.

Unit testing in Software Testing Life Cycle

Building unit Test Cases
Unit testing is commonly automated, but may still be performed manually. The IEEE does not favor one over the other. A manual approach to unit testing may employ a step-by-step instructional document.
Under the automated approach-
  • A developer could write another section of code in the application just to test the function. They would later comment out and finally remove the test code when the application is done.
  • They could also isolate the function to test it more rigorously. This is a more thorough unit testing practice that involves copy and pasting the function to its own testing environment to other than its natural environment. Isolating the code helps in revealing unnecessary dependencies between the code being tested and other units or data spaces in the product. These dependencies can then be eliminated.

A coder may use a Unit Test Framework to develop automated test cases. Using an automation framework, the developer codes criteria into the test to verify the correctness of the unit. During execution of the test cases, the framework logs those that fail any criterion. Many frameworks will also automatically flag and report in a summary these failed test cases. Depending upon the severity of a failure, the framework may halt subsequent testing.

 Mock Objects

Unit testing relies on mock objects being created to test sections of code that are not yet part of a complete application. Mock objects fill in for the missing parts of the program. For example, you might have a function that needs variables or objects that are not created yet. In unit testing, those will be accounted for in the form of mock objects created solely for the purpose of the unit testing done on that section of code.

Unit Testing Tools

There are several automated tools available to assist with unit testing. We will provide a few examples below:
  • Rational Software - Rational Software by IBM has a unit test feature known as "Rational Test Realtime". The software contains a complete range of testing tools for much more than just unit testing. It is used for Ada, Java, C and C++. It creates unit tests by reverse engineering the software.  Operating systems it supports include Windows, Linux, Solaris, HP-UX and AIX. Go to http://www-01.ibm.com/software/rational/ to learn more.
  • JavaScript Assertion Unit- Also known as jsAsserUnit, this Freeware JavaScript unit testing tool can be used on any platform that supports JavaScript. It is available athttp://jsassertunit.sourceforge.net/docs/index.html
  • CUT - CUT is a Freeware unit test tool for C, C++ and Objective C. It is great for embedded software testing frameworks and desktop applications on Linux and Windows operating systems. Learn more at sourceforge.net by going to http://sourceforge.net/projects/cut/.
  • Dotunit - Dotunit is a .net framework Freeware unit testing tool. Part of Junit on the Microsoft .net framework, Dotunit is used for automating unit testing on windows systems. This is another tool from sourceforge.net, so look for it at: http://dotunit.sourceforge.net/
 Those are just a few of the available unit testing tools. There are lots more, especially for C languages and Java, but you are sure to find a unit testing tool for your programming needs regardless of the language you use.

Extreme Programming & Unit Testing

Unit testing in Extreme Programming involves the extensive use of testing frameworks. A unit test framework is used in order to create automated unit tests. Unit testing frameworks are not unique to extreme programming, but they are essential to it. Below we look at some of what extreme programming brings to the world of unit testing:

  • Tests are written before the code
  • Rely heavily on testing frameworks
  • All classes in the applications are tested
  • Quick and easy integration is made possible

 Unit Testing Myth

It requires time and I am always overscheduled
My code is rock solid! I do not need unit tests.

Myths by their very nature are false assumptions.  These assumptions lead to a vicious cycle as follows -

 
Truth is
Unit testing increase the speed of development.
Programmers think that integration testing will catch all errors and do not unit test. Once units are integrated, very simple errors which could have very easily found and fixed in unit tested take very long time to be traced and fixed.

Unit Testing benefits

  • Developers looking to learn what functionality is provided by a unit and how to use it can look at the unit tests to gain a basic understanding of the unit API.
  • Unit testing allows the programmer to refactor code at a later date, and make sure the module still works correctly (i.e. Regression testing). The procedure is to write test cases for all functions and methods so that whenever a change causes a fault, it can be quickly identified and fixed.
  • Due to the modular nature of the unit testing, we can tests parts of project without waiting for others to be completed.

Unit Testing Limitations

  • Unit testing can't be expected to catch every error in a program. It is not possible to evaluate all execution paths even in the most trivial programs
  • Unit testing by its very nature focuses on a unit of code. Hence it can't catch integration errors or broad system level errors.
 It's recommended unit testing be used in conjunction with other testing activities.
 Unit testing best practices
  • Unit Test cases should be independent. In case of any enhancements or change in requirements, unit test cases should not be affected.
  • Test only one code at a time.
  • Follow clear and consistent naming conventions for your unit tests
  • In case of change in code in any module, ensure there is a corresponding unit test case for the module and the module passes the tests before changing the implementation
  • Bugs identified during unit testing must be fixed before proceeding to the next phase in SDLC
  • Adopt a "test as your code" approach. The more code you write without testing the more paths you have to check for errors.
 Summary
As you can see, there can be a lot involved in unit testing. It can be complex or rather simple depending on the application being tested and the testing strategies, tools and philosophies used. Unit testing is always necessary on some level. That is a certainty.

Automated Testing: Process, Planning, Tool Selection

Manual testing is performed by a human sitting in front of a computer carefully executing the test steps. Automation Testing means using an automation tool to execute your test case suite.   The automation software can also enter test data into the System Under Test ,  compare  expected and actual  results and generate detailed test  reports.
Test Automation demands considerable investments of money and resources. Successive development cycles will require execution of same test suite repeatedly. Using a test automation tool it's possible to record this test suite  and re-play it  as required. Once the  test suite is automated,  no human intervention is required . This improved ROI of Test Automation.
Goal of Automation is to reduce number of test cases to be run manually and not eliminate manual testing all together.
Why Automated Testing?
why automation testing

  Automated testing is important due to following reasons: 
  • Manual Testing of all work flows, all fields , all negative scenarios is time and cost consuming
  • It is difficult to test for multi lingual sites manually
  • Automation does not require Human intervention. You can run automated test unattended (overnight)
  • Automation increases  speed of test execution
  • Automation helps increase  Test Coverage
  • Manual Testing can become boring and hence error prone.

 

Which Test Cases to Automate?

Test cases to be automated can be selected using the following criterion to increase the automation ROI
  • High Risk - Business Critical test cases
  • Test cases that are executed repeatedly
  • Test Cases that are very tedious or difficult to perform manually
  • Test Cases which are time consuming

The following category of test cases are not suitable for automation:
  • Test Cases that are newly designed and not executed manually  atleast once
  • Test Cases for which the requirements are changing frequently
  • Test cases which are executed on ad-hoc basis.

Automation Process

Following steps are followed in an Automation Process


Test tool selection

Test Tool selection largely depends on the technology the Application Under Test is built on. For instance QTP does not support Informatica.  So QTP cannot be used for testing Informatica applications. It's a good idea to conduct Proof of Concept of Tool on AUT
Define the scope of Automation
Scope of automation is the area of your Application Under Test which will be automated. Following points help determine scope:
  • Feature that are important for the business
  • Scenarios which have large amount of data
  • Common functionalities across applications
  • Technical feasibility
  • Extent to which business components are reused
  • Complexity of test cases
  • Ability to use the same test cases for cross browser testing
 Planning, Design and Development 
During this phase you create  Automation strategy & plan, which contains following details-
  • Automation tools selected
  • Framework design and its features
  • In-Scope and Out-of-scope items of automation
  • Automation test bed preparation
  • Schedule and Timeline of scripting and execution
  • Deliverables of automation testing
 Test Execution
Automation Scripts are executed during this phase. The scripts need input test data before there are set to run. Once executed they provide detailed test reports.  
Execution can be performed using the automation tool directly or through the Test Management tool which will invoke the automation tool.
Example: Quality center is the Test Management tool which in turn it will invoke QTP for execution of automation scripts. Scripts can be executed in a single machine or a group of  machines. The execution can be done during night , to save time.
Maintenance
 As new functionalities are added to the System Under Test with successive cycles, Automation Scripts need to be added, reviewed and maintained for each release cycle. Maintenance becomes necessary to improve effectiveness of Automation Scripts. 
Automation tools
Following are the most popular test tools :
testing tools
 QTP HP's  Quick Test Professional ( now known as HP Functional Test) is the market leader in Functional Testing Tool. The tool supports plethora of environments including SAP , Java , Delphi amongst others. QTP can be used  in conjunction with Quality Center which is a comprehensive Test  Management Tool.  know  is light tool which can be recommended for web or client/server applications.
Rational RobotIt  is an IBM tool used to automate regression, functional and configuration tests for client server, e-commerce as well as  ERP applications. It can be used with Rational Test Manager which aided in Test Management Activities 
Selenium: Its an open source Web Automation Tool. It supports all types of web browsers. Despite being open source its actively developed and supported
  

How to Choose an Automation Tool? 

Selecting the right tool can be a tricky task. Following criterion will help you select the best tool for your requirement-
  • Environment Support
  • Ease of use
  • Testing of Database
  • Object identification
  • Image Testing
  • Error Recovery Testing
  • Object Mapping
  • Scripting Language Used
  • Support for various types of test - including functional, test management, mobile, etc...
  • Support for multiple testing frameworks
  • Easy to debug the automation software scripts
  • Ability to recognize objects in any environment
  • Extensive test reports and results
  • Minimize training cost of selected tools 
Tool selection is one of biggest challenges to be tackled before going for automation. First, Identify the requirements, explore various tools and its capabilities, set the expectation from the tool and go for a Proof Of Concept.
Framework in Automation 
A framework is  set of automation guidelines  which help in  
  • Maintaining consistency of Testing
  • Improves test structuring
  • Minimum usage of code
  • Less Maintenance of code
  • Improve re-usability
  • Non Technical testers can be involved in code
  • Training period of using the tool can be reduced
  • Involves Data wherever appropriate 
There are four types of framework used in software automation testing:

  1. Data Driven Automation Framework
  2. Keyword Driven Automation Framework
  3. Modular Automation Framework
  4. Hybrid Automation Framework 

Automation Best Practices: 

To get maximum ROI of automation, observe the following
  • Scope of Automation needs to be determined in detail before the start of the project. This sets expectations from Automation right.
  • Select the right automation tool: A tool must not be selected based on its popularity but it's fit to the automation requirements.
  • Choose appropriate framework
  • Scripting Standards- Standards have to be followed while writing the scripts for Automation .Some of them are-
    • Create uniform scripts, comments and indentation of the code
    • Adequate Exception handling - How error is handled on system  failure or unexpected behavior of the application.
    • User defined messages should be coded or standardized for Error Logging for testers to understand.
  • Measure metrics- Success of automation cannot be determined by   comparing the manual effort with the automation effort but by also capturing the following metrics.
    • Percent of defects found
    • Time required for automation testing for each and every release cycle
    • Minimal Time taken for release   
    • Customer satisfaction Index
    • Productivity improvement
The above guidelines if observed can greatly help in making your automation successful.

Benefits of automated testing

 Following are benefits of automated testing:
automation benefits

  • 70% faster than the manual testing
  • Wider test coverage of application features
  • Reliable in results
  • Ensure Consistency
  • Saves Time and Cost
  • Improves accuracy
  • Human Intervention is not required while execution
  • Increases Efficiency
  • Better speed in executing tests
  • Re-usable test scripts
  • Test Frequently and thoroughly
  • More  cycle of execution can be achieved through automation 
  • Early time to market
 Conclusion
Right selection of automation tool, testing process and team, are important players for automation to be successful. Manual and automation methods go hand-in hand for successful testing.

Manual Testing Tutorials for Beginners

In Manual Testing , Testers manually execute test cases without using any automation tools. Manual testing is the most primitive of all testing types and helps find bugs in the software system.
 Any new application must be manually tested before its testing can be automated. Manual testing requires more effort, but is necessary to check  automation feasibility.
Manual Testing does not require knowledge of any testing tool. One of the  Software Testing Fundamental is "100% Automation is not possible". This makes Manual Testing imperative. 
Goal of Manual Testing
Goal of Manual Testing
The goal of Manual Testing is to ensure that the application is error free and it is working in conformance to the specified functional requirements. Test Suites or cases ,are designed during the testing phase and should have 100% test coverage.
It also makes sure that reported defects are fixed by developers and re-testing has been performed by testers on the fixed defects. Basically, this testing checks the quality of the system and delivers bug-free product to the customer.

Manual Testing types:

Below given diagram depicts Manual Testing Types. In fact any type of software testing type can be executed both manually as well using an automation tool.

Myths of Manual Testing


Following are few common myths and facts related to testing:
Myth: Anyone can do manual testing
Fact: Testing requires many skill sets
Myth: Testing ensures 100% defect free product
Fact: Testing attempts to find as many defects as possible. Identifying all possible defects is impossible.
Myth: Automated testing is more powerful than manual testing
Fact: 100% test automation cannot be done. Manual Testing is also essential.
Myth: Testing is easy
Fact: Testing can be extremely challenging .Testing an application for possible use cases with minimum test cases requires high analytical skills. 

Comparison of Manual and Automated Testing

 Automation Testing is use of tools to execute test cases whereas manual testing requires human intervention for test execution.
Automation Testing saves time, cost and manpower. Once recorded, it's easier to run an automated test suite when compared to manual testing which will require skilled labor.
Any type of application can be tested manually but automated testing is recommended only for stable systems and is mostly used for regression testing. Also, certain testing types like ad-hoc and monkey testing are more suited for manual execution.
Manual testing can be become repetitive and boring. On the contrary, the boring part of executing same test cases time and again, is handled by automation software in automation testing.

Conclusion
Manual testing is an activity where the tester needs to be very patient, creative &  open minded.They need to think and act with an End User perspective.

Guide to SDLC , STLC & V-Model

his tutorial explains in detail the Software/System Development Life Cycle (SDLC) like the Waterfall cycle & Iterative cycle like RAID & Agile. And further, it proceeds to explain the V-Model of testing and STLC (Software Test Life Cycle).

Suppose, you are assigned a task, to develop a custom software for a client. Now, irrespective of your technical background, try and make an educated guess about the sequence of steps you will follow, to achieve the task.
The correct sequence would be.

Different phases of Software Development Cycle
Activities performed in each stage
Requirement Gathering stage
  • Gather as much information as possible about the details & specifications of the desired software from the client. This is nothing but the Requirements gathering stage.
Design Stage
  • Plan the programming language like Java, PHP, .net; database like Oracle, MySQL, etc. Which would be suited for the project, also some high-level functions & architecture.
Built Stage
  • After design stage, it is built stage, that is nothing but actually code the software
Test Stage
  • Next, you test the software to verify that it is built as per the specifications given by the client.
Deployment stage
  • Deploy the application in the respective environment
Maintenance stage
  • Once your system is ready to use, you may require to change the code later on as per customer request
All these levels constitute the waterfall method of software development lifecycle. As you may observe, thattesting in the model starts only after implementation is done.
But if you are working in the large project, where the systems are complex, it's easy to miss out the key details in the requirements phase itself. In such cases, an entirely wrong product will be delivered to the client and you might have to start afresh with the project OR if you manage to note the requirements correctly but make serious mistakes in design and architecture of your software you will have to redesign the entire software to correct the error.
Assessments of thousands of projects have shown that defects introduced during requirements & design make up close to half of the total number of defects.
Also, the costs of fixing a defect increases across the development life cycleThe earlier in life cycle a defect is detected, the cheaper it is to fix it. As the say, "A stitch in time saves a nine."
To address this concern, the V model of testing was developed where for every phase, in the Development life cycle there is a corresponding Testing phase
  • The left side of the model is Software Development Life Cycle - SDLC
  • The right side of the model is Software Test Life Cycle - STLC
  • The entire figure looks like a V, hence the name V - model
Apart from V model, there are iterative development models, where development is carried in phases, with each phase adding a functionality to the software. Each phase comprises of its independent set of development and testing activities.
Good examples of Development lifecycles following iterative method are Rapid Application Development, Agile Development

Conclusion

There are numerous development life cycle models. Development model selected for a project depends on the aims and goals of that project.
  • Testing is not a stand-alone activity, and it has to adapt the development model chosen for the project.
  • In any model, testing should performed at all levels i.e. right from requirements until maintenance.

Learn Fundamental Principles of Software Testing

This tutorial introduces the seven basic principles governing Software Testing.
  • Consider a scenario where you are moving a file from folder A to Folder B. Think of all the possible ways you can test this.
  • Apart from the usual scenarios, you can also test the following conditions
  • Trying to move the file when it is open
  • You do not have the security rights to paste the file in Folder B
  • Folder B is on a shared drive and storage capacity is full.
  • Folder B already has a file with the same name, infact the list is endless
  • Or suppose you have 15 input fields to test, each having 5 possible values, the number of combinations to be tested would be 5^15
  • If you were to test the entire possible combinations project EXECUTION TIME & COSTS will rise exponentially.
  • Hence, one of the testing principles states that EXHAUSTIVE testing is not possibleInstead, we need an optimal amount of testing based on the risk assessment of the application.
  • And the million dollar question is, how do you determine this risk?
  • To answer this let's do an exercise
  • In your opinion, Which operations are most likely to cause your Operating system to fail?
  • I am sure most of you would have guessed, Opening 10 different application all at the same time.
  • So if you were testing this Operating system you would realize that defects are likely to be found in  multi-tasking and needs to be tested thoroughly which brings us to our next principle Defect Clustering which states that a small number of modules contain most of the defects detected.
  • By experience, you can identify such risky modules. But this approach has its own problems
  • If the same tests are repeated over and over again, eventually the same test cases will no longer find new bugs
  • This is the another principle of testing called "Pesticide Paradox"
  • To overcome this, the test cases need to be regularly reviewed & revised, adding new & different test cases to help find more defects.
  • But even after all this sweat & hard work in testing, you can never claim you product is bug-free. To drive home this point, let's see this video of public launch of Windows 98
  • You think a company like MICROSOFT would not have tested their O.S thoroughly & would risk their reputation just to see their O.S crashing during its public launch!
  • Hence, testing principle states that - Testing shows presence of defects i.e. Software Testing reduces the probability of undiscovered defects remaining in the software but even if no defects are found, it is not a proof of correctness.
  • But what if, you work extra hard, taking all precautions & make your software product 99% bug-free. And the software does not meet the needs & requirements of the clients.
  • This leads us to our next principle, which states that-
  • Absence of Error is a Fallacy i.e. Finding and fixing defects does not help if the system build is unusable and does not fulfill the users needs & requirements
  • To fix this problem, the next principle of testing states that
  • Early Testing - Testing should start as early as possible in the Software Development Life Cycle. So that any defects in the requirements or design phase are captured as well. More on this principle in a later training tutorial.
  • And the last principle of testing states that the Testing is context dependent which basically means that the way you test an e-commerce site will be different from the way you test a commercial off the shelf application.
Summary of the Seven Testing Principles
Principle 1
Testing shows presence of defects
Principle 2
Exhaustive testing is impossible
Principle 3
Early Testing
Principle 4
Defect Clustering
Principle 5
Pesticide Paradox
Principle 6
Testing is context dependent
Principle 7
Absence of errors - fallacy

Introduction to Software Testing & its Importance

This tutorial introduces software testing to the audience and justifies its importance.
Software testing is a process used to identify the correctness, completeness, and quality of developed computer software. It includes a set of activities conducted with the intent of finding errors in software so that it could be corrected before the product is released to the end users.
  • In simple words, software testing is an activity to check whether the actual results match the expected results and to ensure that the software system is defect free.
  • Why is testing is important?
  • This is China Airlines Airbus A300 crashing due to a software bug on April 26, 1994, killing 264 innocent lives
  • Software bugs can potentially cause monetary and human loss, history is full of such examples
  • In 1985, Canada's Therac-25 radiation therapy machine malfunctioned due to software bug and delivered lethal radiation doses to patients, leaving 3 people dead and critically injuring 3 others
  • In April of 1999, a software bug caused the failure of a $1.2 billion military satellite launch, the costliest accident in history
  • In may of 1996, a software bug caused the bank accounts of 823 customers of a major U.S. bank to be credited with 920 million US dollars
  • As you see, testing is important because software bugs could be expensive or even dangerous
  • As Paul Elrich puts it - "To err is human, but to really foul things up you need a computer."

What is Software Testing?

Software testing is a process of executing a program or application with the intent of finding the software bugs.
  • It can also be stated as the process of validating and verifying that a software program or application or product:
    • Meets the business and technical requirements that guided it’s design and development
    • Works as expected
    • Can be implemented with the same characteristic.
Software TestingLet’s break the definition of Software testing into the following parts:
1)  Process:  Testing is a process rather than a single activity.
2)  All Life Cycle Activities: Testing is a process that’s take place throughout theSoftware Development Life Cycle (SDLC).
  • The process of designing tests early in the life cycle can help to prevent defects from being introduced in the code. Sometimes it’s referred as “verifying the test basis via the test design”.
  • The test basis includes documents such as the requirements and design specifications.
 3)  Static Testing:  It can test and find defects without executing code. Static Testing is done during verification process. This testing includes reviewing of the documents (including source code) and static analysis. This is useful and cost effective way of testing.  For example: reviewing, walkthrough, inspection, etc.
4)  Dynamic Testing:  In dynamic testing the software code is executed to demonstrate the result of running tests. It’s done during validation process. For example: unit testing, integration testing, system testing, etc.
 5)  Planning:  We need to plan as what we want to do. We control the test activities, we report on testing progress and the status of the software under test.
6)  Preparation:  We need to choose what testing we will do, by selecting test conditions and designing test cases.
7)  Evaluation:  During evaluation we must check the results and evaluate the software under test and the completion criteria, which helps us to decide whether we have finished testing and whether the software product has passed the tests.
8)  Software products and related work products:  Along with the testing of code the testing of requirement and design specifications and also the related documents like operation, user and training material is equally important.