Software Testing Fundamentals

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 (B)

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 (A)</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 (D)</p> Signup and view all the answers

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

<p>False (B)</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 (C)</p> Signup and view all the answers

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

<p>True (A)</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 (B)</p> Signup and view all the answers

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

<p>False (B)</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 (D)</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 (B)</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 (B)</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 (B)</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 (A)</p> Signup and view all the answers

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

<p>False (B)</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 (D)</p> Signup and view all the answers

The user ID 123456 belongs to a Guest User.

<p>False (B)</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 (A)</p> Signup and view all the answers

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

<p>False (B)</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 (C)</p> Signup and view all the answers

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

<p>False (B)</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 (A)</p> Signup and view all the answers

Gamma Testing is the final validation before the software release.

<p>True (A)</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

Flashcards

Software Testing

Testing a software system to verify it meets its requirements and is free of defects.

Unit Testing

The process of evaluating a single component or unit of code to ensure it behaves as expected.

Test Coverage

The percentage of code lines executed during testing, indicating how much of the code is covered.

Integration Testing

Testing that involves combining and testing multiple modules or components to see how they interact together.

Signup and view all the flashcards

Developers don't test because they "know it works!"

A developer's common misconception that their code is perfect and doesn't require testing.

Signup and view all the flashcards

Developers don't test because they "don't write broken code!"

A developer's excuse for not testing because they believe their code is inherently good and doesn't need to be examined.

Signup and view all the flashcards

Developers don't test because they "have no time!"

A developer's reason for not testing due to time constraints.

Signup and view all the flashcards

Acceptance Testing

The highest level of testing that verifies if the entire system meets the user's needs.

Signup and view all the flashcards

Top-Down Integration Testing

Testing where you begin with the user interface (UI) and high-level workflow modules, and then gradually integrate lower-level modules.

Signup and view all the flashcards

Bottom-Up Integration Testing

Testing where you start with the lowest-level modules, like individual backend services, and work your way up to the higher-level modules.

Signup and view all the flashcards

Sandwich Integration Testing

Testing that combines Top-Down and Bottom-Up Integration testing approaches, starting with both the top and bottom layers simultaneously.

Signup and view all the flashcards

Early Detection of Critical Issues with Top-Down Testing

A benefit of Top-Down Integration Testing is that it allows you to detect defects in high-level modules early in the testing process.

Signup and view all the flashcards

Robust Foundational Testing with Bottom-Up Integration

A benefit of Bottom-Up Integration Testing is that it ensures the foundational components of a system are well-tested before moving on to higher-level functionalities.

Signup and view all the flashcards

Comprehensive Coverage with Sandwich Integration

A benefit of Sandwich Integration Testing is that it provides broader coverage, testing both the UI and backend functionalities from the start.

Signup and view all the flashcards

Ideal Use Case for Top-Down Testing

Top-Down Integration Testing is a good choice for applications with critical user interfaces or workflows.

Signup and view all the flashcards

Ideal Use Case for Bottom-Up Testing

Bottom-Up Integration Testing is well-suited for systems with independent backend modules, particularly for complex APIs.

Signup and view all the flashcards

Big Bang Integration Testing

A method of testing where all the modules of a system are combined and integrated at once, and then the functionality is verified.

Signup and view all the flashcards

Incremental Integration Testing

A method of testing where modules are integrated incrementally in a step-by-step approach.

Signup and view all the flashcards

Test Stubs

This is a way to isolate and test a module by simulating the behavior of its dependent components. Test stubs replace functions that a module utilizes, so the module can be tested even if those functions are not fully developed.

Signup and view all the flashcards

Test Drivers

This is a way to isolate and test a module by simulating its environment. Test drivers are like test buddies that call and interact with the module directly, allowing you to test its behavior in isolation.

Signup and view all the flashcards

Delayed Testing in Bottom-Up

This challenge arises when testing low-level modules late in the process, potentially delaying the detection of foundational issues. It can cause cascading problems as the system grows.

Signup and view all the flashcards

Delayed Testing in Top-Down

This issue occurs while testing high-level workflows and functionalities, where problems may be harder to identify until integrated with the user interface. It can lead to a delay in user experience feedback.

Signup and view all the flashcards

Creating Stubs in Bottom-Up

This approach involves creating mock objects called 'stubs' for lower-level modules that haven't been developed yet. It is important to ensure that stubs accurately reflect the behavior of the actual modules to avoid missed issues during testing.

Signup and view all the flashcards

Creating Drivers in Top-Down

Developing 'drivers' to simulate the behavior of not yet developed higher-level modules is necessary. Drivers are important to interface with the lower-level modules under test and ensure proper interaction.

Signup and view all the flashcards

Cascading Issues in Bottom-Up

This challenge is faced when testing foundational modules late in the process, leading to potential cascading issues in downstream modules. Issues may not be noticed until the system grows.

Signup and view all the flashcards

Out of Stock Product

A product that is not currently available for purchase. It cannot be added to the cart.

Signup and view all the flashcards

Guest User

A user who can browse and purchase without creating an account.

Signup and view all the flashcards

Invalid Promo Code

A code that offers a discount but is either expired or not valid.

Signup and view all the flashcards

Edge Case

A scenario that tests the system's behavior at the limits of its capabilities, such as adding the maximum number of items allowed.

Signup and view all the flashcards

Error Handling

The process of verifying that a system is working as expected without encountering errors.

Signup and view all the flashcards

Test Case

A set of steps designed to test a specific feature or functionality using various data inputs and conditions.

Signup and view all the flashcards

Test Data

A specific set of test data designed and used for a particular test case.

Signup and view all the flashcards

Exploratory Testing

Exploring software without a predefined script, allowing for more freedom and spontaneity.

Signup and view all the flashcards

Regression Testing

Testing done to ensure new changes don't break existing functionality.

Signup and view all the flashcards

Re-Testing

Retesting areas of a software application to verify that previously identified defects have been fixed.

Signup and view all the flashcards

Smoke Testing

A quick, brief test to ensure the major functionality of a software application works after a new build or fix.

Signup and view all the flashcards

Penetration Testing

Simulating attacks against a software application to identify its security weaknesses.

Signup and view all the flashcards

A/B Testing

Comparing two versions of a software application to determine which performs better based on user interactions and feedback.

Signup and view all the flashcards

Performance Testing

Testing to measure a system's performance, stability, and responsiveness under various load conditions.

Signup and view all the flashcards

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

More Like This

Use Quizgecko on...
Browser
Browser