ST-02 Dynamic Testing

Table of Contents

    ST-02 Dynamic Testing

    Dynamic Testing

    • Also known as Black Box Testing
    • Dynamic testing is a software testing method that involves executing the software and analyzing its behaviour during runtime. It's essentially testing how the software reacts to different inputs and outputs in a real-world scenario.
    • Black box testing, also known as functional testing or behavioral testing, is a specific type of dynamic testing.
    • In black box testing, the tester focuses on the functionality of the software from the user's perspective, without any knowledge of the internal code structure.

    Benefits of Dynamic Testing

    • •User-centric approach: Ensures the software behaves as expected by the user.
    • Early detection of defects: Can identify issues before deep code analysis.
    • Requires less technical knowledge: Testers don't need to be coding experts.

    Static Testing

    • Also known as White Box Testing
    • Static testing, in contrast to dynamic testing, analyzes the software without actually executing it.
    • It focuses on examining the code itself, design documents, and requirements specifications.
    • White box testing, also known as clear box testing or structural testing, is a specific type of static testing.

    Benefits of Static Testing

    • Early bug detection: Catches errors early in the development cycle.
    • Improved code quality: Ensures code adheres to standards and is well-structured.
    • Increased code maintainability: Makes code easier to understand and modify.

    Static Testing: Inspection

    • Inspections are a formal technique used in static testing to meticulously examine software artifacts like code, design documents, and requirements specifications.
    • Process:
      • A team of reviewers (inspectors) with diverse expertise gathers for a structured review session.
      • A specific artifact (code module, design document, etc.) is chosen for inspection.
      • The inspector assigned as the moderator guides the team through a predefined checklist of items to examine.
      • Each inspector meticulously reviews the artifact, identifying potential defects, inconsistencies, or areas for improvement based on the checklist.
      • The team discusses identified issues, reaching consensus on their severity and assigning ownership for rectification.
      • Documentation is updated to reflect the findings and decisions made during the inspection.

    Benefits of Inspection

    • Early defect detection: Catches errors early in the development cycle, saving time and resources.
    • Improved code quality: Ensures code adheres to coding standards, best practices, and design principles.
    • Increased code maintainability: Makes code easier to understand and modify for future developers.
    • Knowledge sharing: Facilitates knowledge transfer among team members.

    Types of Inspection

    • Code Inspections: Focus on code structure, logic flow, adherence to coding standards, and potential bugs.
    • Design Inspections: Review design documents for completeness, consistency, and alignment with requirements.
    • Requirements Inspections: Ensure requirements are clearly defined, unambiguous, testable, and meet user needs.

    Structural Walkthrough

    • Focus: Meticulously examine a software development artifact (code, design document, etc.) step-by-step.
    • Formality: More formal and structured, following a predefined agenda and checklist.
    • Participants: Typically involve a moderator, presenter (author of the artifact), reviewers, and a scribe.
    • Goal: Primarily to find defects in the logic, structure, or clarity of the artifact.
    • Discussion: Limited discussion on solutions during the walkthrough itself. The focus is on identifying issues

    Technical Review

    • Focus: Broadly assess a software development artifact for technical soundness, adherence to standards, and potential risks.
    • Formality: Can range from informal discussions to more formal meetings with a defined agenda.
    • Participants: Usually involve the author, reviewers (peers), and sometimes a facilitator.
    • Goal: Identify defects, assess technical risk, and potentially suggest improvement ideas.
    • Discussion: More open discussion on solutions and improvements compared to walkthroughs.

    Both structural walkthroughs and technical reviews are techniques used in software development to identify errors and improve the quality of the work product

    Validation Activities

    • Validation activities in software development ensure the software being built is the right product – it meets the needs and expectations of the users and stakeholders.
    • Here are some common validation activities:
      • Unit Testing,
      • Integration Testing,
      • Function Testing,
      • System testing,
      • Acceptance Testing,
      • Regression Testing
      • Proposal Testing,
      • Requirement Testing,
      • Design Testing,
      • Big Bang Testing,
      • Sandwich Testing Critical Path First

    Unit Testing

    • Unit testing is a fundamental software development practice that focuses on testing individual units or components of a software application in isolation
    • Popular Unit Testing Frameworks:
      • JUnit (JAVA)
      • PHPUnit (PHP)
      • NUnit (.NET)
      • pytest (Python)

    Benefits of Unit Testing

    • Early Bug Detection: Catches errors early in the development cycle, saving time and resources.
    • Improved Code Quality: Ensures code functions as intended and adheres to best practices.
    • Refactoring Confidence: Allows developers to modify code without worrying about unintended side effects.
    • Regression Testing: Helps ensure changes don't introduce new bugs in previously working code.
    • Improved Design: Encourages developers to write modular and well-structured code.

    How Unit Testing Works

    • Identify Units: Developers define the units (functions, methods, classes) to be tested.
    • Write Test Cases: For each unit, test cases are written that specify expected inputs and outputs.
    • Execute Tests: A testing framework runs the test cases and compares the actual outputs to the expected ones.
    • Analyze Results: If any test case fails, it indicates a bug in the unit and the code needs to be fixed.

    Integration Testing

    • Integration testing, following unit testing, is a software development process that focuses on verifying how different software units or modules work together. It essentially checks if these individually tested components can communicate and collaborate effectively to achieve the desired functionality.

    Goals of Integration Testing

    • Identify Interface Issues: Ensures modules can exchange data correctly through their defined interfaces.
    • Expose Integration Defects: Detects bugs that arise from interactions between modules, which might not be apparent in unit testing.
    • Verify Data Flow: Checks if data flows seamlessly between modules as intended.
    • Validate System Behavior: Provides initial insights into how the integrated modules contribute to the overall system behavior.

    Types of Integration Testing

    • Top-Down Approach: Starts by testing high-level modules and progressively integrating lower-level modules.
    • Bottom-Up Approach: Starts by testing low-level modules and gradually integrating them into larger subsystems.
    • Big Bang Approach: Integrates all modules at once (not recommended due to complexity and difficulty in isolating issues).
    • Sandwich Approach: Combines top-down and bottom-up approaches, testing modules in groups.

    Strategies for Integration Testing

    • Incremental Integration: Modules are integrated and tested in small increments, allowing for earlier defect detection.
    • Stub Testing: Uses stubs (simulated modules) to isolate a module under test from its dependencies.
    • Driver Testing: Uses driver programs to simulate the behavior of higher-level modules that call the module under test.

    Benefits of Integration Testing

    • Early Defect Detection: Catches integration issues early in the development cycle, reducing costs and rework.
    • Improved System Quality: Ensures modules work together seamlessly, leading to a more robust system.
    • Enhanced System Confidence: Provides greater confidence in the overall system's functionality before system testing.

    Function Testing

    • Function testing, also known as functional testing, is a type of software development testing that verifies if the individual functionalities of an application work as per the requirements and specifications.
    • It essentially checks whether the software performs the tasks it's designed for and delivers the expected outputs for specific inputs.

    Key Aspects of Function Testing

    • Focus: Functional behaviour of the software application.
    • User Perspective: Tests are designed based on how users will interact with the software and the features they'll use.
    • Requirements-Driven: Test cases are derived from the documented functional requirements and specifications.
    • Black-Box Approach: Testers don't need knowledge of the internal code structure (unlike white-box testing).

    Benefits of Function Testing

    • Early Defect Detection: Identifies functional bugs early in the development cycle.
    • Improved Software Quality: Ensures features function correctly and meet user requirements.
    • Enhanced User Experience: Verifies the software delivers the expected functionality for users.
    • Reduced Development Costs: Catching defects early saves time and resources compared to fixing them later.
    • Increased Customer Satisfaction: Delivers a software product that functions as intended.

    System Testing

    • System testing, also referred to as end-to-end testing, is a comprehensive software testing process that evaluates the entire system as a whole. It goes beyond individual components (unit testing) and integrations (integration testing) to assess how the entire system functions together to meet user requirements.

    Types of System Testing

    • Black-Box Testing: Focuses on testing the system's functionality from a user's perspective, without knowledge of the internal code.
    • White-Box Testing: Leverages knowledge of the internal structure to design test cases that thoroughly exercise the system's components and integrations
    • Usability Testing: Evaluates how easy and intuitive the system is to use for target users

    Acceptance Testing

    • Acceptance testing, the final stage in software development testing before deployment,  focuses on ensuring the software meets the acceptance criteria

    Types of Acceptance Testing

    • Alpha Testing: Conducted by a small group of representative users within the developing organization in a controlled environment.
    • Beta Testing: Performed by a larger group of real-world users outside the development team, often with early access releases.
    • User Acceptance Testing (UAT): Formal testing process where the customer or end-users thoroughly evaluate the software based on their acceptance criteria.

    Regression Testing

    • Regression testing is a software development process that ensures that changes introduced to the codebase haven't unintentionally broken existing functionalities. It's essentially a re-run of previously executed tests on a modified version of the software.

    When to Perform Regression Testing

    • After Code Changes: Whenever new features are implemented, bugs are fixed, or refactoring is done.
    • Before New Releases: As part of the release cycle to ensure a stable version is deployed.
    • Integration of New Modules: When integrating new modules with the existing codebase.

    Types of Regression Testing

    • Full Regression Testing: Re-executes all existing test cases to comprehensively test the entire system. (Can be time-consuming for large projects)
    • Selective Regression Testing: Focuses on re-running test cases that are most likely to be impacted by the changes made. (Requires good understanding of code changes)
    • Prioritized Regression Testing: Re-runs critical or high-risk test cases first, followed by less critical ones. (Provides a balance between coverage and time)

    Proposal Testing

    • Proposal testing involves evaluating and refining a proposal before submitting it to potential clients or funding agencies.

    Who Can Perform Proposal Testing

    • Internal Review Team: Colleagues with expertise in the proposal topic and proposal writing can provide valuable feedback.
    • External Reviewers: Industry experts or proposal consultants can offer an objective perspective and identify areas for improvement.
    • Target Audience Representatives: Having a potential client or someone familiar with the funding agency review the proposal can be highly beneficial.

    Proposal Testing Techniques

    • Readability Reviews: Team members take turns reading the proposal aloud, identifying unclear sections or awkward phrasing.
    • Subject Matter Expert (SME) Reviews: Experts in the proposal topic review the content for accuracy and completeness.
    • Client/Funder Perspective Reviews: Simulate how the target audience might read the proposal, assessing if it resonates with their needs and interests.

    Benefits of Proposal Testing

    • Increased Confidence: Knowing your proposal is well-tested gives you confidence when submitting it.
    • Improved Proposal Quality: Testing leads to a more polished and professional proposal that stands out from the competition.
    • Stronger Funding/Project Opportunities: A well-tested proposal increases your chances of securing funding or winning a project

    Requirement Testing

    • Requirement testing, a crucial step in software development, focuses on validating the software requirements before any coding begins. It's essentially making sure the foundation (requirements) is strong and clear before building the house (software).

    Why Requirement Testing is Important

    • Early Defect Detection
    • Improved Project Clarity
    • Reduced Development Risk
    • Enhanced Project Success

    What to Test in Requirements

    • Completeness
    • Clarity
    • Consistency
    • Attainability
    • Testability
    • Traceability

    Techniques for Requirement Testing

    • Reviews and Walkthroughs: Subject matter experts and stakeholders collaboratively review the requirements document, identifying issues and areas for improvement.
    • Questioning Techniques: Asking probing questions about the requirements helps uncover potential flaws or missing information.
    • Prototyping: Creating low-fidelity prototypes based on the requirements allows for early user feedback and validation.
    • Equivalence Partitioning and Boundary Value Analysis: These techniques, used in functional testing, can be applied to analyze the completeness and validity of requirement specifications for inputs and outputs.

    Design Testing

    • Design testing, a crucial step in the design process, involves evaluating a design (user interface, user experience, etc.) to identify usability issues, ensure it meets user needs, and achieve the intended goals.

    Types of Design Testing

    • Usability Testing: Real users interact with the design prototype or live product, while their behavior and feedback are observed and analyzed.
    • Guerilla Testing: A quick and informal usability testing method conducted with readily available participants.
    • A/B Testing: Compares two versions of a design element (e.g., button placement) to see which one performs better with users.
    • Expert Reviews: Usability experts or design professionals evaluate the design based on usability principles and best practices.
    • Heuristic Evaluation: A systematic evaluation method where the design is assessed against a set of usability heuristics (rules of thumb).

    Big Bang Testing

    • In software development, Big Bang Testing is an integration testing strategy where all software components (modules) are combined and tested as a single unit. This approach is in contrast to incremental integration testing, where components are integrated and tested in smaller groups or stages.

    How it Works

    • Development: Individual software components are developed independently.
    • Integration: Once all components are completed, they are combined into a single system.
    • Testing: The entire integrated system is then tested as a whole. This involves verifying that all components work together seamlessly and that the system functions as intended.

    Pros

    • Simpler to Implement: Requires minimal planning compared to incremental integration testing
    • Faster Initial Testing: Can be quicker to test the entire system at once, especially for small projects.

    Cons

    • Difficult to Isolate Issues: If a test fails, it's challenging to pinpoint the exact source of the problem due to the complex integration of all components. Debugging becomes a time-consuming process.
    • Higher Risk of Finding Major Defects Later: Since individual components aren't tested in isolation, critical issues might not be identified until the entire system is integrated, leading to delays and rework.
    • Not Suitable for Large or Complex Systems: For large systems with numerous interconnected components, Big Bang Testing can become unwieldy and difficult to manage.

    Sandwich Testing Critical Path First

    • The concept of "Sandwich testing Critical Path First" combines two software development testing strategies: Sandwich Testing and Critical Path Method (CPM).

    • Sandwich testing is an integration testing strategy that involves a three-phased approach:

      • Bottom-Up Testing: Individual software modules are tested in isolation (unit testing) followed by integration testing where small groups of modules are combined and tested together.
      • Top-Down Testing: High-level modules are tested first, followed by the integration of lower-level modules that interact with them. This ensures that high-level functionalities work as expected.
      • Regression Testing: After completing top-down and bottom-up testing, a comprehensive regression testing phase is performed to ensure all functionalities are still working correctly after integration
    • Critical Path Method:

      • •The Critical Path Method (CPM) is a project management technique used to identify the most critical tasks in a project schedule. The critical path is the sequence of dependent tasks that determines the overall project duration. Delays in any task on the critical path will directly impact the project deadline.

    Sandwich Testing Critical Path First

    • This approach combines these two strategies by prioritizing testing efforts on the critical path first.
    • Here's how it works:
      • Identify the Critical Path: Use CPM to identify the critical path of your software development project. These are the modules and integrations that are most crucial for completing the project on time.
      • Focus Testing on Critical Path: During the bottom-up and top-down phases of sandwich testing, prioritize testing the modules and integrations that fall on the critical path. This ensures early detection and resolution of critical issues that could delay the project.
      • Test Remaining Modules: Once the critical path modules are thoroughly tested, you can proceed with testing the remaining modules using the sandwich testing approach.
      • Regression Testing: As with traditional sandwich testing, comprehensive regression testing is performed after all modules are integrated.

    Questions

    1. Difference Between Dynamic & Static Testing
    2. Explain Function Testing & System Testing.
    3. What are Validation activities and explain 2 of them.
    4. What is Regression Testing Mentioned with a diagram? Also Explain Advantages & Disadvantages
    5. What is Stress Testing Mentioned with a diagram? Also Explain Advantages & Disadvantages

    Made By SOU Student for SOU Students