Software testing at a glance

What is software testing?

Software Testing is an activity to compare between actual results and expected results. It can also be said as executing software with the intention of finding defects.

Why Software Testing important?

Testing is important because software bugs could be expensive and cause monetary loss and even human loss too. Nissan recalled over 4 million cars due to airbag sensory detectors.

Principles of Testing?

  1. Testing shows the presence of defects
  2. Exhaustive testing is impossible
  3. Early testing
  4. Defect clustering
  5. Pesticide Paradox
  6. Testing is context dependent
  7. Absence of error fallacy

What is Software Development Life Cycle?

SDLC produces high-quality software that meets customer expectations.  Software Development has the following phases

  1. Requirements gathering: Business Analyst gathers requirements from clients and creates the Business Requirements Document (BRD) and shares the same to developers. (non-technical document)
  2. Analysis: In the Analysis phase, the Software Requirements Specification (SRS) is created and get it approved by the client. SRS consists of all product requirements to be designed and developed. Key people involved here are Project Manager, Business Analyst and senior developers.
  3. Design: In the design phase, HLD and LLD are created. HLD and LLD. HLD high-level design is overall system design covering system architecture and database design. LLD low-level design document is the detailed system design covering how each and every product should work, how a component should work. System Architect and senior developers are involved in this phase.
  4. Development: In this phase, the development of the code starts. The outcome is Source Code Document (SCD) and the developed product.
  5. Testing: Testing team starts testing either manually or by automation. Testing is to make sure the product developed works as per the customer requirements. Testers may find the defects and communicate to developer and developer fixes defects and send back the software for retesting. This process continues until the software is stable. The outcome of the phase opened and closed defect reports, tested product.
  6. Deployment & Maintenance: In this phase, the product is delivered to the customer. Key people involved here are development engineers, Implementation Engineers, and technical support. When the product is used by the customer, he might encounter some issues and needs to be resolved. This is maintenance.

SDLC Models

Waterfall Model: It is one of the widely used models and also the oldest methodologies in software development. We have many phases in the Waterfall model. The output of one phase acts as input to other.

  1. User Requirements: Because requirements are properly documented before other phases begin, Business Analyst might spend more time on this phase. Here the client defines what exactly he wants. These are captured in the Business Requirements Document (BRD). Business Analyst may spend more time to get a clear understanding of client’s requirement.
  2. Software Requirements: It is like Analysis phase. Here business requirements are converted to software requirements.
  3. Software Design: In this phase, global and detailed design can be produced based on Software requirements.
  4. Development: Here the actual development of the product happens as per the design specifications. Performed by development Engineers.
  5. Testing: In this phase, the system will be tested by testers and any defects will follow defect lifecycle.
  6. Deployment & Maintenance: Release team like Development team, Infrastructure team, and technical staff will deliver the code at the client end and client may encounter some issues while working on the product and so the Maintenance team has to resolve the issue as per SLA.

Pros

  1. Waterfall model is simple and easy to use.
  2. Waterfall model phases run sequentially and so do not overlap.
  3. Waterfall Model works well for smaller projects where requirements are clearly defined and well understood.

Cons

  1. Waterfall model is not advisable if the project is complex and frequently changing
  2. Waterfall model is not suitable for long projects

Software Test Levels

Four test levels.

  1. Unit testing: Individual components of the software are tested to make sure each component works as expected with respect to design documents. Developers conduct Unit testing. Unit testing can be done manually or automated. LLD
  2. Integration testing: Individual components are combined and tested as a group. The purpose of this testing is to expose the defects while different units are interacting. Popular integration tools are FitNesse, Rational integrated tester, protractor, etc. HLD
  3. System testing: In System testing, a complete and integrated software is tested. The purpose of System testing is to evaluate the system’s compliance with the specified software requirements. System testing can be done manually or automated. System testing is Black box testing. Popular test tools
  4. Acceptance testing: A software is tested for Acceptability. The purpose of Acceptance testing to evaluate the system’s compliance with business requirements. Acceptance test Environment and System test Environment are the same. Unit test environment and Integration test Environment are different.

Difference between User Acceptance Testing and Acceptance testing?

User Acceptance testing is a subset of Acceptance testing. In Acceptance testing, we have two subsets

  1. Alpha testing where testing is done by other people than developers and testers, maybe customer care executive
  2. Beta testing same as User Acceptance testing is done by or in front of end users.

Software Test types

  1. Functional testing: Is a kind of Black box testing to ensure the functionality of an application or system is behaving as expected as per use cases, user stories, functional specifications, etc. Functional testing should be performed at all levels of testing.
  2. Non-functional testing: Non-functional testing is a type of testing to check non-functional aspects (performance, load) of a software application or system. Non-functional testing should be done at all levels of testing.
  3. Structural testing: It is a type of testing where tests are derived from knowledge of internal implementation and software’s structure.
  4. Change related testing: It is a type of testing to check that upgrade or any changes to the software or to verify if the defect which was raised before has been corrected and working as expected.

Difference between Performance testing and Load testing?

Load testing is a subset of performance testing. Performance testing is about the response time of an application with the expected number of users. Load testing is about the response time of an application when subjected to more than usual load.

Test Design Techniques

  1. Static Techniques: Testing of the software documents manually or with a set of tools without executing the software.

    Two types of Static Techniques

    1. Reviews (Manual Analysis)

      Four types

      1. Informal review
      2. Walk Through
      3. Technical review
      4. Inspection
    2.  Static Analysis (Automated Analysis): Used by developers for static analysis
  2. Dynamic Techniques: The software is tested by executing it on a computer. It has three types.
    1. Black box technique

    1. a. Equivalence partitioning: It can be applied at any test levels. It involves dividing the input test data into partitions. These partitions can be for both valid and invalid data.

      Example: Small office with 100 employees with employee id from 1 to 100

      Partiton1      Partition2     Partition3
      -ve to 0                      1 to 100        100+
      Invalid                       valid               invalid

      b. Boundary value analysis: It can be applied at any test levels. Here we test on maximum and minimum input values of a boundary.

      Example: small office with 100 employees

      Partition1     Partition2     Partition3
      Minimum -1 Minimum 1  Minimum 101

      Maximum 0 Maximum 100        Maximum 1000
      Invalid                       valid               invalid

      c. Decision table testing: It helps capture system requirements that contain logical conditions.

      Example: Police selection age should be between 21 to 30

      Conditions:
      1. For SC ST it is 5 years relaxation
      2. For BC it is 2 years relaxation

      d. State transition testing: Test cases are designed to execute valid and invalid state transitions.

      1. Example: Online banking transactions with balance 1,00,000

        Number        Transaction Amount         Status           
        1                                  10,000                      success
        2                                  10,000                      success
        3                                  90,000                      fail

      e. Use case testing: In Use case testing, test cases are designed to execute User scenarios. In Use case testing, test cases are designed to execute User scenarios.

      Example: ATM cash withdrawal operation

    1. User: Inserts ATM card
      System: requests PIN
    2. User: Enters PIN
      System: Validates PIN and requests language
    3. User: Select language and asks for service
      System: selects service
    4. User: selects the withdrawal
      System: Asks for the amount to enter
    5. User: Enters amount
      System: gives the amount

    2. White box technique
    3. Experience-based technique

Software Testing process/ Software Test Life Cycle

STLC is about what test activities to carry out and when to accomplish those test activities. There are different phases in STLC

  1. Requirement Analysis: In the Requirements Analysis phase, test team studies and analyze business requirements from a testing perspective. This phase allows the test team to identify if the requirements are testable or not. Exit criteria is the Requirements Document.
  2. Test planning: In this phase, the team lead prepares Test plan. Test lead determines cost and effort estimates. Entry criteria is the Requirements Document. Exit criteria is approved test plan, test strategy document, effort estimation document.
  3. Test design: In this phase, test development starts and the testing team works with test cases and test data and get them approved. Test lead prepares RTM. Entry criteria is Test plan, test strategy document, and effort estimation document and Exit criteria is test cases and test data.
  4. Test environment set up: This phase can be started with the test design phase. The test environment is based on hardware and software requirement. Most often test environment set up is done by the development team. Entry criteria is Test cases and test data, Exit Criteria is the test environment.
  5. Test execution: Test cases will be executed by the test team based on planned test cases. If a test case is pass/ fail, the same should be updated in test cases. Failed test cases would be a defect report and reported to the development team. Should be retested once fixed by the development team until the product is stable. Entry criteria is test environment and Exit criteria is Defect report, test case execution report.
  6. Test cycle closure: This is the final phase where we create the closure report. Testing team will discuss and analyze the test completion cycle criteria. Identify the strategy to make it better. Entry criteria is test case execution report, defect report and Exit criteria is a test closure report.

Leave a Comment

Your email address will not be published.