Software Testing Fundamentals
48 Questions
3 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary goal of software testing?

  • To find as many bugs as possible
  • To evaluate a system or its components (correct)
  • To develop new software features
  • To increase software production speed
  • Integration testing focuses on testing individual components of software in isolation.

    False

    What does high test coverage indicate?

    High confidence in the software's reliability.

    ___ testing uses tests for a single component or unit in software testing.

    <p>Unit</p> Signup and view all the answers

    Which of the following is NOT a level of software testing?

    <p>Optimization Testing</p> Signup and view all the answers

    Name one reason why developers might not test their code.

    <p>They believe it works, they don't write broken code, or they have no time.</p> Signup and view all the answers

    Match the following types of testing with their descriptions:

    <p>Unit Testing = Testing individual components or units Integration Testing = Testing combined modules for interaction System Testing = Testing the complete system as a whole Acceptance Testing = Final testing to verify user requirements</p> Signup and view all the answers

    The process of evaluating the percentage of lines of code executed during all tests is called ___ coverage.

    <p>test</p> Signup and view all the answers

    What should be checked after confirming billing and shipping information for users?

    <p>All of the above</p> Signup and view all the answers

    The big bang integration testing approach involves testing individual modules before combining them.

    <p>False</p> Signup and view all the answers

    What message should be displayed for successful payments?

    <p>Payment Successful</p> Signup and view all the answers

    The _____ approach in integration testing allows for identifying problems early by testing modules in a sequence.

    <p>incremental</p> Signup and view all the answers

    Match the integration testing approach with its description:

    <p>Big Bang = Testing all modules combined after individual testing Incremental = Testing modules in sequences Top Down = Testing top-level modules before lower levels Bottom Up = Testing lower-level modules first</p> Signup and view all the answers

    What happens after an order confirmation?

    <p>Items sold update inventory in real-time</p> Signup and view all the answers

    The incremental approach can include top down and bottom up strategies.

    <p>True</p> Signup and view all the answers

    What should be included in the order confirmation email?

    <p>Items, order ID, and shipping details</p> Signup and view all the answers

    Which integration testing method is best suited for systems with independent backend modules?

    <p>Bottom-Up Integration Testing</p> Signup and view all the answers

    Top-Down Integration Testing begins with low-level modules.

    <p>False</p> Signup and view all the answers

    What is a key benefit of Sandwich Integration Testing?

    <p>It provides broader system coverage by ensuring both UI and backend components are tested.</p> Signup and view all the answers

    In Bottom-Up Integration Testing, testing begins with __________ service components.

    <p>backend</p> Signup and view all the answers

    Which scenario is a typical use case for Top-Down Integration Testing?

    <p>Testing a banking application with critical user interfaces</p> Signup and view all the answers

    Match the integration testing method with its key focus:

    <p>Top-Down Integration Testing = Early testing of UI workflows Bottom-Up Integration Testing = Focus on foundational functionalities Sandwich Integration Testing = Balanced coverage of top and bottom layers Early Testing = Quick fault localization in high-level modules</p> Signup and view all the answers

    The primary focus of Bottom-Up Integration Testing is on high-level user experience.

    <p>False</p> Signup and view all the answers

    What is one key advantage of Top-Down Integration Testing?

    <p>It allows for early detection of defects in high-level modules.</p> Signup and view all the answers

    What is a benefit of early defect detection in foundational modules?

    <p>Prevents cascading issues downstream</p> Signup and view all the answers

    Fault isolation can be easier during Bottom-Up Integration Testing compared to Top-Down Integration Testing.

    <p>False</p> Signup and view all the answers

    What is one major con of delaying low-level module testing?

    <p>Issues in low-level modules may go unnoticed until later stages.</p> Signup and view all the answers

    The ______ approach involves combining elements of both top-down and bottom-up testing.

    <p>Sandwich Integration Testing</p> Signup and view all the answers

    Match the integration testing method with its characteristic:

    <p>Top-Down Integration Testing = Focuses on high-level workflows Bottom-Up Integration Testing = Covers foundational modules first Sandwich Integration Testing = Combines top-down and bottom-up approaches UI Testing = Tests user interactions and experience</p> Signup and view all the answers

    What is a risk associated with focusing testing efforts unevenly across layers?

    <p>Risk of incomplete testing</p> Signup and view all the answers

    Creating stubs for lower-level modules is a minimal effort task in integration testing.

    <p>False</p> Signup and view all the answers

    What is one limitation of using Top-Down Integration Testing for systems with a critical reliance on UI workflows?

    <p>It may not be ideal for systems heavily reliant on UI workflows.</p> Signup and view all the answers

    What is the total price after applying the promo code SAVE10?

    <p>$89.98</p> Signup and view all the answers

    The user ID 123456 belongs to a Guest User.

    <p>False</p> Signup and view all the answers

    What should be checked to confirm the product details?

    <p>Product ID, Price, and Availability</p> Signup and view all the answers

    The discount amount applied when using SAVE10 is $______.

    <p>10</p> Signup and view all the answers

    Match the following scenarios with their expected outcomes:

    <p>Out of Stock Product = Error handling should occur Guest User = Cart functionality should work without login Invalid Promo Code = Error message should appear Maximum Allowable Quantity = Items can be added up to the limit</p> Signup and view all the answers

    What action is taken after verifying product details?

    <p>Proceed to checkout and validate order confirmation</p> Signup and view all the answers

    The expected total before any promo codes are applied is $89.98.

    <p>False</p> Signup and view all the answers

    What should be done if a promo code is expired or invalid?

    <p>Verify and check for error messages.</p> Signup and view all the answers

    What is the primary purpose of Regression Testing?

    <p>To verify that new changes do not adversely affect existing functionality</p> Signup and view all the answers

    Smoke Testing is conducted to ensure that all functionalities of the software are working.

    <p>False</p> Signup and view all the answers

    What type of testing simulates attacks to identify security weaknesses?

    <p>Penetration Testing</p> Signup and view all the answers

    The testing phase that uses external users to gather feedback before general release is called __________ Testing.

    <p>Beta</p> Signup and view all the answers

    Match the following types of testing with their primary purpose:

    <p>Alpha Testing = Find bugs in a controlled environment Sanity Testing = Verify specific fixes or features A/B Testing = Compare two versions for performance Performance Testing = Measure responsiveness under load</p> Signup and view all the answers

    Which of the following tests focuses on system behavior under a specific load?

    <p>Load Testing</p> Signup and view all the answers

    Gamma Testing is the final validation before the software release.

    <p>True</p> Signup and view all the answers

    What aspect of the software does Non-Functional Testing evaluate?

    <p>Performance, reliability, and usability</p> Signup and view all the answers

    Study Notes

    Introduction to Software Testing

    • Software testing is a process of evaluating a system or its components to determine if it meets specified requirements.
    • It aims to identify defects and improve the overall quality of the product.
    • Testing is crucial for ensuring a product is defect-free and meets user needs.
    • A good system needs testing to ensure it works correctly.
    • The goal is to produce a more robust and resilient system to prevent failures.

    Why Developers Don't Test

    • "I know it works!" – Developers may not test because they feel confident their code is functional.
    • "I don't write broken code" – A developer often believes that the code is fault-free.
    • "I have no time" – Testing may be seen as an unproductive activity that takes time when time is already considered limited.

    Four Levels of Software Testing

    • Unit Testing: The first level of functional testing, performed by the developer and testing individual components.
    • Integration Testing: Evaluates how modules operate together, to test the interaction.
    • System Testing: The complete and integrated application is tested. It involves verifying its overall behavior and functionality.
    • Acceptance Testing: Performed by end-users or stakeholders to ensure that the system meets their needs and criteria.

    Unit Testing Example

    • Unit testing uses tests for a component or a single unit in software testing.
    • Performed by the developer.
    • The smallest testable part of a system or application.
    • Ensures correct fulfillment of requirements and functionality.

    Test Coverage

    • Test coverage is the percentage of lines of code that are executed during tests.
    • High coverage indicates high confidence in the code.
    • Test coverage reports highlight areas of code not tested during testing.

    Integration Testing

    • Modules are logically integrated and tested as a complete system.
    • It focuses on the interaction between software modules.
    • This testing emphasizes on the data communication between modules.
    • It's known as Integration and Testing.

    Types of Integration Testing

    • Big Bang Approach: All modules are combined and tested at once.
    • Incremental Approach: Modules are integrated gradually.
      • Top Down
      • Bottom Up
      • Sandwich

    Integration Test Example

    • Example test cases for an e-commerce website may include ensuring that items transfer correctly, billing and shipping details are accurate, and payments are processed correctly.

    System Testing

    • System testing checks the overall system behavior.
    • It verifies that the system as a whole meets specified requirements.
    • It looks at its overall functionality and compliance with standards.

    System Testing Process

    • The testing includes preparing the test setting, creating test cases, generating test data, running test cases, eliminating errors, regression testing, and defect reporting.

    Test Case Creation

    • Test cases should consider happy, sad, and edge cases – positive & negative results.
    • Include the steps needed to simulate the scenario, expected results, and pass/fail criteria to validate the program testing.

    Test Examples

    • Include examples of test cases, which involve specific scenarios such as searching for products, adding products to the cart, proceeding to checkout with invalid payment methods, placing orders, and verifying the success conditions.

    Variations and Edge Cases

    • Testing different product conditions, validating user types, testing promo codes, and including the maximum quantity in a cart as elements to comprehensively test the program.

    How to Report a Defect

    • A defect report should include steps to reproduce, environmental status, preconditions, expected and actual results, screenshots, logs, times, and a version number, with examples.

    Some Defect Reporting Tools

    • Jira
    • HP ALM

    Test Report

    • A test report summarizes the completion of test activities and provides supporting documents.
    • It contains information about the testing process, test cases, results, and other necessary data.
    • The report is prepared by the testing team, approved by the test manager, and provided to stakeholders.

    User Acceptance Testing(UAT)

    • The final phase of software testing.
    • End-users perform the testing in a real-world environment to validate whether the system meets their needs.
    • Purpose of UAT is to ensure software functionality from user perspective.
    • UAT will ideally also identify any issues missed during earlier testing.
    • Before initiating UAT, review the current requirements and validate that UAT will cover the needs.

    Example Scenario for UAT

    • An e-commerce use case scenario could include validating how users search products, add them to a cart, and complete a payment successfully.
    • The acceptance criteria would include details such as the accuracy of product search results, correct display of product details in the cart, successful payment processing via the gateway, and verification that the order confirmation emails are sent.

    Other Types of Testing

    • Exploratory Testing: Actively exploring the software without predefined scripts.
    • Regression Testing: Verifying new changes don't negatively affect existing functionality.
    • Re-Testing: Ensuring previously identified defects are fixed.
    • Smoke Testing: Checks if major functionalities work after a build or fix.
    • Sanity Testing: Narrow test to validate specific fixes or new features.
    • Penetration Testing: Simulates attacks to identify security vulnerabilities.
    • A/B Testing: Comparing two versions of the software to determine which performs better.
    • Alpha Testing: Internal testing by the development.
    • Beta Testing: Further testing with external users.
    • Gamma Testing: Validation before the full release focusing on stability.
    • Non-Functional Testing: Evaluating the performance, reliability, and usability of a system, which includes Load, Stress, Spike and Scalability testing and Usability testing.
    • Automated Testing: Using scripts to automate testing tasks.

    Automated Testing

    • Used primarily for regression testing, performance, load and stress testing.
    • Saves cost over time in repetitive tasks.
    • Improves accuracy.

    Some Testing Tools (Functional and API Testing)

    • Selenium
    • Appium
    • TestComplete

    When to Use Manual vs. Automated Testing

    • Manual testing is best suited for exploratory, usability, and short-term projects for smaller applications.
    • Automated testing is better for repetitive tasks like regression, performance testing, and when scaling for longer, larger projects.

    Stages of Software Testing

    • A sequential process for the various stages of software development and the specific tests associated with those stages.

    White Box vs. Black Box Testing

    • White Box testing is based on the internal structure of the application and Black Box is based on its external characteristics.

    BDD & TDD

    • BDD (Behavior Driven Development) and TDD (Test Driven Development) highlight aspects of the testing process as it relates to software development methodologies.

    TDD Cycle

    • The TDD methodology uses a cyclical process in the code writing process focusing on red, refactor, and green cycles in which new tests are created, code for the tests is implemented, and the code is then reviewed to make sure the tests still work.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Class#7 - Testing PDF

    Description

    Test your knowledge about the basics of software testing with this comprehensive quiz. It covers essential concepts such as test coverage, integration testing approaches, and the importance of code evaluation. Ideal for software development enthusiasts and professionals alike.

    More Like This

    Use Quizgecko on...
    Browser
    Browser