Course outline: Test design
Module 02 · Test design
Types of software testing
What each kind of test checks, when teams run it, and the tools they reach for.
What you'll be able to do
- Tell functional from non-functional testing, and name the main kinds of each.
- Choose between smoke, sanity, re-testing and regression after a change, and run them in the right order.
- Plan a performance check whose numbers someone else can repeat.
- Explain what shift-left testing changes, and why it lowers the cost of bugs.
Understanding Testing Types
Software testing is broadly categorized based on its focus: verifying what the system does (Functional) versus how it performs (Non-Functional). Understanding these categories helps QA professionals select the right testing approach for different scenarios.
Functional Testing (What it does)
Focuses on validating that the software behaves according to specified requirements. It involves testing specific functions, features, APIs, UI elements, and security aspects by providing inputs and checking outputs. Think of it as checking if each part does its job correctly.
Primarily uses Black-Box techniques.
Non-Functional Testing (How it performs)
Evaluates aspects like performance, usability, reliability, security, and scalability. It assesses the overall quality and user experience beyond just core features. Think of it as checking how well the system operates under various conditions.
Crucial for user satisfaction and system robustness.
Functional Testing Techniques
Smoke Testing
A quick check to ensure the most critical functionalities of a build are working. It acts as a gatekeeper, determining if a build is stable enough for further, more detailed testing.
Key Takeaway: Use it right after receiving a new build to catch major showstoppers early. Think "Is this build basically usable?"
(Also Known As) Build Verification Testing ( (Build Verification Testing)), Confidence Testing.
Example: For a new e-commerce build, check if users can log in, view products, and add an item to the cart. If any of these fail, the build is likely rejected immediately.
Sanity Testing
A focused check performed after minor code changes or bug fixes to verify that the specific changes work correctly and haven't negatively impacted closely related functionalities. It's narrower than smoke testing.
Key Takeaway: Use it after a bug fix or small feature change to quickly confirm the fix works and didn't break anything obvious nearby. Think "Did this specific change work as intended?"
Relationship: Often considered a subset of Regression Testing, but much narrower and quicker.
Example: After fixing a bug in the "Apply Coupon" feature, sanity testing would involve trying valid and invalid coupons to ensure the fix works, without re-testing the entire checkout flow.
Sanity vs. Smoke Testing
A common point of confusion! Here's a breakdown:
| Feature | Sanity Testing | Smoke Testing |
|---|---|---|
| Purpose | To verify that specific functionalities work correctly after changes or bug fixes. Example: You fixed a bug in the “Apply Coupon” feature for an e-commerce site. You only test that coupon function to confirm it now applies discounts correctly. | To ensure that the overall build is stable enough for further testing. Example: You receive a new software build. You quickly test core flows (e.g., login, adding an item to cart, basic checkout) to confirm no major showstoppers before deeper testing. |
| Focus | Targets specific components or features that have been modified. Example: Only the “Search” function was updated, so you run quick checks on “Search” results, filtering, and pagination to ensure the fix works. | Checks the basic functionality of the entire application. Example: You check login, product browsing, and a basic purchase flow to confirm these main areas function without crashing or major errors. |
| Execution | Conducted without predefined test cases, often informally. Example: After a bug fix in “User Profile Edit,” you quickly open the profile page, make changes, and see if the changes are saved—no formal test script is used. | Can be executed manually or automated, typically with a set of predefined test cases. Example: You have an automated “smoke suite” that runs each time a new build is released, checking essential paths (login, navigation, minimal transactions). |
| Scope | Narrow scope, focusing only on areas impacted by recent changes. Example: If only the Payment Gateway integration was modified, you only test payment processing for different card types and ignore other areas like “Product Search.” | Broad scope, encompassing the application’s core functionalities. Example: You test core modules like user registration, login, product listing, and minimal checkout to make sure the application holds together overall. |
| Stability Requirement | The software must be relatively stable for testing. Example: You won’t do sanity testing if the system is constantly crashing; you wait for a version that is at least stable enough so that bug fixes can be verified without interruption. | The software can be stable or unstable; it serves as an initial check. Example: Even if the build is fresh and might crash, you attempt a quick smoke test to confirm whether it’s worth proceeding or if the build needs immediate fixes. |
| Documentation | No formal documentation or test scripts are typically created. Example: You fix a data display bug in a user profile. You do an informal check—no separate test plan—just “open the page, see if data is correctly displayed now.” | Test documents and scripts are often generated for future reference. Example: You maintain a standard smoke testing checklist (or automation scripts) so you can quickly verify each new build in a consistent manner. |
| Testing Phase | Usually conducted after smoke testing to validate specific fixes. Example: Once smoke testing confirms the build is at least functional, you move on to sanity testing the specific bug fixes in the “Discount Module. | Performed after each new build to verify overall stability. Example: Every time developers provide a new build, you run a smoke test covering critical user flows: e.g., user creation, login, minimal transaction, and logout. |
| Type of Testing | Subset of regression testing. Example: You only re-check the “Add to Cart” regression tests if that feature was recently updated to ensure no new bugs were introduced in that particular flow. | Subset of acceptance testing. Example: You conduct a quick test of the major acceptance criteria (login, basic checkout) before you do in-depth acceptance testing on all functionalities and user stories. |
Regression Testing
Re-running previously executed tests after code changes (bug fixes, new features, enhancements) to ensure these changes haven't introduced new defects or negatively impacted existing functionality ("regressions").
Key Takeaway: Essential for maintaining stability. Run it whenever code changes to prevent unintended side effects. Think "Did the recent changes break anything that used to work?"
Scope: Can range from a small subset of tests (related to the change) to a full test suite.
Example: After adding a "Wishlist" feature, run regression tests covering login, product browsing, adding to cart, and checkout to ensure these core flows weren't broken by the new feature.
Re-testing
Specifically testing functionality that previously failed (a bug) to confirm that the bug fix has resolved the issue.
Key Takeaway: Directly verifies a bug fix. Always perform re-testing after a developer claims a bug is fixed. Think "Is this specific bug actually gone?"
Difference from Regression: Re-testing focuses *only* on the fixed bug, while regression checks for *unintended* side effects elsewhere.
Example: A bug prevented users from uploading profile pictures. After the fix, re-testing involves attempting to upload a picture again using the exact steps that previously failed.
Exploratory Testing
A simultaneous process of learning, test design, and test execution. Testers actively explore the application without predefined scripts, using their intuition and knowledge to uncover defects.
Key Takeaway: Excellent for finding unexpected issues and understanding the application deeply. Complements scripted testing. Think "Let's play around and see what breaks."
Approach: While unscripted, it's not random; testers often use charters or time-boxed sessions to guide exploration.
Example: Given a new reporting feature, a tester might spend an hour trying different filter combinations, exporting formats, and edge case data inputs, documenting findings along the way.
End-to-End (E2E) Testing
Validates entire application flows from start to finish, simulating real user scenarios across multiple integrated systems or modules.
Key Takeaway: Ensures all integrated parts work together correctly in a production-like environment. Crucial for complex applications. Think "Does the whole user journey work?"
Scope: Broad, covering complete workflows.
Example: Testing the entire e-commerce purchase flow: user registration → login → product search → add to cart → checkout (including payment gateway interaction) → order confirmation → logout.
Ad hoc Testing
Informal, unplanned testing performed without documentation or predefined steps, often driven by intuition to find defects quickly. Similar to Exploratory Testing but typically less structured.
Key Takeaway: Can uncover bugs missed by formal testing. Relies heavily on tester experience. Think "Let's just try random things."
(Also Known As) Random Testing, Monkey Testing (though Monkey Testing often implies purely random inputs).
Example: Randomly clicking buttons, entering unexpected data, interrupting processes (e.g., closing browser during checkout) to see how the application handles it.
Positive Testing
Testing with valid inputs and expected conditions to verify that the application behaves as intended (the "happy path").
Key Takeaway: Confirms the basic functionality works correctly under normal circumstances. Think "Does it work when I do things right?"
Example: Entering a valid username and password should allow the user to log in successfully.
Negative Testing
Testing with invalid inputs, unexpected conditions, or error scenarios to verify that the application handles them gracefully (e.g., shows appropriate error messages, doesn't crash).
Key Takeaway: Ensures robustness and proper error handling. Think "What happens when I do things wrong?"
(Also Known As) Error Path Testing, Failure Testing.
Example: Entering an incorrect password should display an "Invalid credentials" message, not crash the application or grant access.
Worked example · Cedar Books
After an urgent coupon fix: smoke, re-testing, sanity and regression
During testing of release 2.4 of Cedar Books, the Academy's practice shop, TC-09 found BUG-07: a coupon counted twice after a quick double click on Apply, while REQ-03 says a valid code lowers the total once. In cycle 2 the developers fix it urgently and deliver a new build, 2.4.0-rc4, the same afternoon. Four kinds of testing follow, each answering its own question:
| Kind | Its question | What the tester does on rc4 | Time |
|---|---|---|---|
| Smoke | Is this build usable at all? | Sign in, search, open a book, add it to the basket, reach checkout: the critical paths, from the automated smoke suite | 10 minutes |
| Re-testing | Is this bug gone? | The exact steps of BUG-07 again: The Cedar Tree (19.00), CEDAR10, Apply clicked twice within a second; expect one discount line and a total of 17.10 | 5 minutes |
| Sanity | Does the coupon area around the fix still make sense? | A quick, informal pass around the fix: a single click, a second code replacing the first, an expired code, the book removed after the code | 20 minutes |
| Regression | Did the fix break anything that used to work? | The coupon and checkout suites, then the full regression suite (120 cases in the release 2.4 test plan, 80 of them automated) | An hour or more |
The order matters. A build that fails the smoke test goes straight back, with no time spent on the rest. Re-testing and sanity answer "is the fix right?"; regression answers "is everything else still right?". An urgent fix that passes the first three and skips regression is how a one-line change breaks something nobody looked at. The same four steps follow a hotfix to the live shop.
Try it: The regression suite lab · The bug report lab
Non-Functional Testing Techniques
Performance Testing
Evaluates how a system performs in terms of responsiveness, stability, resource utilization, and speed under a specific workload.
Key Takeaway: Crucial for ensuring a positive user experience and system stability under load. Think "How fast and stable is it?"
Common Types:
- Load Testing: Simulates expected user load. (Example: Testing with 1000 concurrent users).
- Stress Testing: Pushes the system beyond normal limits to find its breaking point. (Example: Simulating 10,000 concurrent users when 1000 is normal).
- Endurance Testing (Soak Testing): Tests under sustained load over time to detect memory leaks or degradation. (Example: Running normal load for 24 hours).
- Spike Testing: Simulates sudden bursts of high load. (Example: Handling a Black Friday sales rush).
- Volume Testing: Tests with large amounts of data in the database. (Example: Querying tables with millions of records).
- Scalability Testing: Determines how well the system can scale up (or down) to handle varying loads. (Example: Measuring performance as user load increases from 100 to 5000).
Popular Tools:JMeter,Gatling,LoadRunner,Locust
Security Testing
Identifies vulnerabilities, threats, and risks in a software application to prevent malicious attacks and protect data.
Key Takeaway: Essential for protecting sensitive data and maintaining user trust. Think "Can it be hacked?"
Common Types:
- Vulnerability Scanning: Automated scans for known weaknesses.
- Penetration Testing (Pen Testing): Simulates attacks to exploit vulnerabilities.
- Risk Assessment: Identifies and prioritizes security risks.
- Security Auditing: Reviews code and configurations for compliance and flaws.
- Ethical Hacking: Authorized attempts to uncover security flaws.
Popular Tools:OWASP ZAP,Burp Suite,Nessus
Reliability Testing
Checks if the software can perform failure-free operations for a specified period in a particular environment.
Key Takeaway: Focuses on consistency and dependability over time. Think "Will it keep working without failing?"
Example: Running an automated test suite repeatedly for 48 hours to ensure no failures occur under normal operating conditions.
Availability Testing
Verifies the system's uptime and accessibility, ensuring it meets the agreed-upon Service Level Agreements ( (Service Level Agreements)).
Key Takeaway: Measures the percentage of time the system is operational and accessible to users. Think "Is the system up and running when needed?"
Example: Monitoring system uptime over a month, calculating the percentage availability (e.g., 99.9%), and comparing it against the (Service Level Agreement) target.
Usability Testing (User Experience, UX)
Evaluates how easy, efficient, and satisfying it is for users to interact with the software.
Key Takeaway: Focuses on the end-user experience. Crucial for adoption and satisfaction. Think "Is it easy and intuitive to use?"
Methods: Often involves observing real users performing tasks (e.g., hallway testing, moderated/unmoderated sessions), surveys, and heuristic evaluations.
Example: Observing five target users trying to complete the registration process and noting any points of confusion or difficulty.
Scalability Testing
Tests the application's ability to handle increasing load (users, data, transactions) by adding resources (scaling up or out).
Key Takeaway: Ensures the system can grow to meet future demands. Think "Can it handle more users/data if we add more servers?"
Note: Often considered a specific type of Performance Testing.
Example: Measuring response times as user load increases while incrementally adding more web server instances.
Interoperability Testing
Verifies if the software can interact and exchange data correctly with other systems or components.
Key Takeaway: Ensures seamless integration in complex environments. Think "Does it play well with others?"
Example: Testing if data exported from your application can be correctly imported and processed by a third-party reporting tool.
Portability Testing
Evaluates how easily the software can be transferred from one environment (e.g., hardware, operating system, browser) to another.
Key Takeaway: Important if the software needs to run in diverse environments. Think "Can it be moved easily?"
Example: Installing and running a desktop application on both Windows 10 and macOS Monterey to check for environment-specific issues.
Compatibility Testing
Checks if the software works correctly across different browsers, devices, operating systems, screen resolutions, and network conditions.
Key Takeaway: Ensures a consistent experience for users regardless of their setup. Think "Does it work everywhere it's supposed to?"
Types: Browser compatibility, OS compatibility, device compatibility, network compatibility.
Example: Testing a web application on Chrome, Firefox, Safari, and Edge, as well as on different mobile devices (iOS, Android) and screen sizes.
Worked example · Cedar Books
A performance check of the Offers page
NFR-01 of Cedar Books says: search answers within 2 seconds, and each page's Largest Contentful Paint is under 2.5 seconds on a mid-range phone. Here is how to check one page against it, the Offers page. A performance check is a measurement, so it needs a fixed method, or its numbers mean nothing:
- Measure what the requirement names: Largest Contentful Paint (LCP), the time until the largest image or block of text on the screen is drawn. Note the layout shift (CLS) and the blocking time (TBT) too: a slow page often shows them.
- Use the conditions the requirement names: a mid-range phone on a throttled mobile network, which is Lighthouse's mobile setting, in a private window with no browser extensions.
- Run the audit three times and keep the median: one run can be lucky or unlucky.
- Write the build, the date, the address and the settings next to the numbers, so anyone can repeat the check.
- Compare with the requirement, not with a feeling: an LCP of 2.4 s passes NFR-01 and 2.6 s fails it, however fast the page felt.
- Read the report's opportunities and diagnostics for the cause, and put it in the bug report with the numbers.
This is a check of how fast one page draws for one user. It does not replace a load test: the release 2.4 test plan's 200 shoppers searching at once is a job for a load tool such as JMeter or Gatling.
What does the Offers page really score? Run the audit yourself in the Lighthouse lab; its answers list what to look for once you have tried.
Try it: The Lighthouse lab
Testing Approaches & Philosophies
❖ Shift-Left Testing
Shift-Left Testing isn't a specific type of testing, but rather an approach or philosophy focused on moving testing activities earlier (to the "left") in the software development lifecycle (SDLC). Instead of waiting until the end of development, testing is integrated from the initial stages like requirements gathering and design.
Goal: To identify and prevent defects as early as possible, reducing the cost and effort required to fix them later.
Key Practices:
- Involving testers in requirements analysis and design reviews.
- Implementing unit tests and integration tests during development.
- Automating tests at various levels (unit, integration, API).
- Using static analysis tools to catch code issues early.
- Fostering collaboration between developers, testers, and business analysts.
Benefits: Faster feedback loops, reduced bug-fixing costs, improved code quality, and quicker time-to-market.
Example: Instead of QA finding a major flaw during final system testing, a tester participates in design reviews and points out the potential issue, or a developer catches it with a unit test long before the feature is fully built.
Sign in to keep your progress: a tick here lives in this browser only.
Test yourself
Quiz: Testing types
10 questions, about 8 minutes. Sign in to take the quiz.
10 questions, about 8 minutes, no time limit. 7 right answers pass, and passing marks the lesson as read. Every new quiz draws new questions.