Unit4

Unit 4: Software Engineering Overview

Date: 24/12/16Instructor: Abhimanyu Mishra (CSE) JETGI

Contents of Unit 4

  • Testing Objectives

  • Unit Testing

  • Integration Testing

  • Acceptance Testing

  • Regression Testing

  • Testing for Performance

  • Top Down & Bottom Up Strategies: Test Driver and Test Stub

  • Test Data Suit Preparation

  • Alpha & Beta Testing of Products

  • Static Testing Strategies: Formal Technical Reviews, Walkthrough

  • Compliance with Design and Coding Standards

Testing Objectives

Definition

Software testing is the systematic process of executing a program with the intention of identifying errors or bugs in the code. This process focuses on checking that the system works correctly and meets the required standards. No system design is devoid of defects, often due to various factors such as:

  • Communication Issues: Misunderstandings between users and developers can lead to inadequate requirements.

  • Time Constraints: Limited development time can result in shortcuts that introduce bugs.

  • Conceptual Mistakes: Errors in the initial conception of software can lead to issues later in the development process.

Purpose

The key purpose of software testing is to identify errors or faults at an early stage to prevent potential losses and failures. Early detection allows for prompt corrective actions, which can save time and resources in the long run.

Importance

System testing, conducted comprehensively, assumes that if all components of the system function correctly and as expected, the overall system goals will be achieved without any failures.

Scope

Testing should be integrated comprehensively throughout all phases of the Software Development Life Cycle (SDLC), ensuring that quality is built into the product from the outset.

Objectives of Software Testing

  1. Software Quality Improvement: Critical applications require high reliability; any bugs could result in substantial financial losses or reputational damage.

  2. Verification & Validation: This ensures that the system functions are correctly built and meet the specified user requirements.

    • Verification: Confirms that the product is developed correctly according to specifications.

    • Validation: Checks that the finished product meets the actual needs of the user by testing it in real-world scenarios.

  3. Software Reliability Estimation: It aids in the identification of design defects before delivering the software to customers, thus enhancing overall product quality.

Types of Testing

Acceptance Testing

Acceptance Testing is important because it checks if the system meets business requirements before delivering it to customers. End-users usually conduct the tests with help from developers to make sure the software meets their needs.

System Testing

System testing assesses the entire software system as a whole to ensure all integrated components function correctly together.

Integration Testing

Integration testing combines individual components after unit testing to form either a complete or partial system, focusing on ensuring that modules interact without errors.

Unit Testing

Unit testing specifically focuses on the smallest unit of software design, testing individual components or modules for proper functionality. The smaller size of modules makes it easier to locate and identify errors efficiently and swiftly.

Unit Testing

Definition

Unit testing involves the rigorous testing of individual components for their expected functionalities before they are integrated into the larger system.

Reason for Unit Testing

Since unit tests operate on small modules, it significantly eases the process of identifying and fixing errors, leading to more reliable components.

Characteristics

Unit testing is exhaustive due to the manageable size of the modules, which can lead to a higher level of product quality.

Integration Testing

Definition

Integration testing refers to the phase of bringing together individual modules that have been unit tested to form a complete or partial system.

Objective

The primary goal is to check for errors that may arise during the interactions between integrated modules.

Techniques

  • Top Down Integration Testing: Begins with testing high-level modules first and then progressively integrating lower-level components step by step.

  • Bottom Up Integration Testing: Starts with testing lower-level components individually before integrating them with the higher-level components.

Top Down Testing

Process

This process involves testing high-level components initially, incrementally integrating the lower-level components into the test case.

Advantages
  1. Early detection of design flaws can lead to time savings in development.

  2. Characteristics and usability can be assessed from the start.

Disadvantages
  1. Challenges in creating workable surrogate objects for complex components late in development.

  2. Difficulty in localizing errors that may arise from lower-level components can complicate debugging.

Bottom Up Integration Testing

Process

This technique tests lower-level components separately before combining them with higher-level components to assess functionality.

Advantages
  1. Proven method that has shown reliability over time.

  2. Easier to create and define relevant test cases early in the development process.

Disadvantages
  1. The behavior of the completed product is only understood after the integration phase, which may lead to unexpected issues.

  2. Increased costs associated with maintaining separate testing environments throughout development.

Acceptance Testing

Purpose

Acceptance testing is required to confirm that the final system satisfies the business requirements and is ready for delivery to the customers.

Process

Conducted by user representatives and overseen by the development team, this testing phase benchmarks against customer-prepared test cases, ensuring functionality and user satisfaction.

Stress Testing

Stress testing evaluates the robustness of software by subjecting it to extreme conditions beyond normal operational limits. This method focuses on ensuring the system's resilience, availability, and error handling capabilities when under heavy loads.

Regression Testing

Regression testing aims to identify any new faults that may have been introduced during subsequent error correction processes. It involves validating:

  • Representative samples from all software functions

  • Testing functionalities that were likely affected by recent changes

  • Checking components that have been modified during development or debugging

Test Drivers & Test Stubs

Test Driver

A test driver is a specialized program that invokes and controls the execution of tests. It provides necessary data inputs and manages the control flow during testing, allowing for testing of sub-modules without reliance on the main control module.

Test Stub

Conversely, test stubs are dummy components that simulate the functionality of real modules for testing purposes, particularly during the integration phase, enabling interaction testing without complete module availability.

White Box Testing

Definition

White box testing involves analyzing the program structure and requires complete knowledge of the internal logic. It is often referred to as structural testing and is generally applied to smaller segments of code to validate intricate details of functionality.

Black Box Testing

Definition

Black box testing focuses on testing functionalities without any knowledge of the internal workings of the software. This testing form emphasizes input and output behavior rather than the intricacies of the code itself and is also known as functional testing.

Advantages
  • The testing process is independent of the software design, allowing for user-oriented evaluation.

Disadvantages
  • Potential redundancy exists if tests overlap with designer testing, which could lead to inefficiencies.

  • Designing accurate and effective test cases can be complex due to the lack of internal visibility.

Test Data Suit Preparation

Aim

The aim of a test data suite is to identify defects in a program systematically through structured testing processes.

Activities Include

  • Designing the test suite to cover all major functionalities

  • Running various test cases to assess system behavior in different scenarios

  • Debugging any identified issues and correcting errors to improve software quality.

Formal Technical Review (FTR)

Definition

Formal technical reviews are systematic evaluations applied throughout the software development life cycle to uncover and address potential errors in the software product.

Objective

The goal is to ensure that the software adheres to functional requirements and design standards, enhancing uniform development processes across the board.

Designing & Coding Standards

Purpose

Standardizing coding conventions helps enhance readability and maintainability of code.

Focus Areas

  1. Program Robustness: Ensures that the software can handle erroneous inputs and unexpected scenarios without crashing.

  2. I/O Behavior: Consistency in data input and output behavior enhances user experience.

  3. Modular Structure: Promotes code reuse and reduces complexity.

  4. Minimize Coupling: Keeping module dependencies low enhances maintainability and testability of the codebase.

robot