Bird
Raised Fist0
Testing Fundamentalstesting~15 mins

What software testing is in Testing Fundamentals - Deep Dive

Choose your learning style10 modes available
Overview - What software testing is
What is it?
Software testing is the process of checking if a computer program works as expected. It involves running the program with different inputs to find mistakes or bugs. Testing helps ensure the software is reliable, safe, and meets user needs. It is done before releasing the software to users.
Why it matters
Without software testing, programs could have hidden errors that cause crashes, wrong results, or security problems. This can lead to unhappy users, lost money, or even dangerous situations like failures in medical devices or cars. Testing helps catch these problems early, saving time and cost while improving quality.
Where it fits
Before learning software testing, you should understand basic programming concepts and how software is built. After learning testing basics, you can explore specific testing types like manual testing, automated testing, and test design techniques. Later, you can learn about test management and quality assurance processes.
Mental Model
Core Idea
Software testing is like carefully checking a new recipe by cooking it multiple times to make sure it tastes right and has no mistakes.
Think of it like...
Imagine you bake a cake using a new recipe. You try it several times, changing ingredients or baking time to see if it turns out well. This helps you find and fix mistakes before serving it to guests. Software testing works the same way for programs.
┌───────────────┐
│   Software    │
│   Testing     │
├───────────────┤
│ Input Data    │
│ Run Program   │
│ Check Output  │
│ Find Bugs     │
└───────────────┘
Build-Up - 6 Steps
1
FoundationUnderstanding software and bugs
🤔
Concept: Introduce what software is and what bugs mean in this context.
Software is a set of instructions that tells a computer what to do. Bugs are mistakes or errors in these instructions that cause the software to behave wrongly or crash.
Result
Learners understand that software can have errors that need to be found and fixed.
Knowing that software is just instructions helps you see why errors happen and why testing is needed to find them.
2
FoundationPurpose of software testing
🤔
Concept: Explain why testing is done and what it aims to achieve.
Testing checks if software works correctly by running it with different inputs and comparing the results to what is expected. It helps find bugs before users do.
Result
Learners grasp that testing improves software quality and user trust.
Understanding testing as a safety net prevents costly mistakes and unhappy users.
3
IntermediateTypes of software testing
🤔Before reading on: do you think testing is only done by humans or can machines help too? Commit to your answer.
Concept: Introduce manual and automated testing as two main ways to test software.
Manual testing means a person runs the software and checks results by hand. Automated testing uses special programs to run tests automatically and quickly. Both have strengths and are often used together.
Result
Learners see that testing can be done in different ways depending on needs and resources.
Knowing the difference helps choose the right testing approach for each project.
4
IntermediateCommon testing activities
🤔Before reading on: do you think testing only means running the program or does it include planning and checking results? Commit to your answer.
Concept: Explain that testing involves planning tests, running them, and checking if results match expectations.
Testing starts with designing test cases that describe inputs and expected outputs. Then testers run these cases and compare actual results to expected ones. If they differ, a bug is found and reported.
Result
Learners understand testing is a process, not just clicking buttons.
Recognizing testing as a process improves thoroughness and effectiveness.
5
AdvancedTesting levels and scopes
🤔Before reading on: do you think testing happens only after the whole software is done or also during development? Commit to your answer.
Concept: Introduce different levels of testing: unit, integration, system, and acceptance testing.
Unit testing checks small parts of code alone. Integration testing checks if parts work together. System testing checks the whole software. Acceptance testing checks if software meets user needs. Testing happens throughout development to catch bugs early.
Result
Learners see testing as layered and continuous, not a single step.
Understanding testing levels helps organize testing efforts and find bugs sooner.
6
ExpertBalancing testing effort and risk
🤔Before reading on: do you think testing every possible input is practical or is there a smarter way? Commit to your answer.
Concept: Explain that exhaustive testing is impossible, so testers prioritize based on risk and impact.
Since software can have countless inputs and paths, testers focus on the most important or risky parts. They use techniques like risk analysis and test design methods to cover critical areas efficiently.
Result
Learners appreciate the strategic nature of professional testing.
Knowing how to balance effort and risk prevents wasted time and missed critical bugs.
Under the Hood
Software testing works by executing the program with specific inputs and observing outputs. Internally, the program follows its code paths, and testing checks if these paths produce correct results. Automated tests run scripts that simulate user actions or call functions directly, comparing actual outputs to expected ones to detect mismatches.
Why designed this way?
Testing was designed to catch errors early when they are cheaper to fix. Manual testing was the first approach, but as software grew complex, automation became necessary for speed and repeatability. The layered testing approach evolved to isolate problems quickly and ensure quality at every stage.
┌───────────────┐       ┌───────────────┐
│ Test Cases    │──────▶│ Test Runner   │
└───────────────┘       └───────────────┘
         │                      │
         ▼                      ▼
┌───────────────┐       ┌───────────────┐
│ Software Code │──────▶│ Test Results  │
└───────────────┘       └───────────────┘
Myth Busters - 4 Common Misconceptions
Quick: Is software testing only about finding bugs? Commit to yes or no before reading on.
Common Belief:Testing is just about finding bugs in the software.
Tap to reveal reality
Reality:Testing also verifies that software meets requirements and works as users expect, not just finding bugs.
Why it matters:Focusing only on bugs can miss usability or requirement problems, leading to software that is correct but not useful.
Quick: Do you think automated testing can replace all manual testing? Commit to yes or no before reading on.
Common Belief:Automated testing can replace all manual testing and is always better.
Tap to reveal reality
Reality:Automated testing is powerful but cannot fully replace manual testing, especially for exploratory or usability tests.
Why it matters:Relying only on automation can miss issues that require human judgment, reducing software quality.
Quick: Does 100% test coverage guarantee bug-free software? Commit to yes or no before reading on.
Common Belief:If tests cover 100% of the code, the software has no bugs.
Tap to reveal reality
Reality:100% coverage means tests run all code lines but does not guarantee all bugs are found, as tests may not check all behaviors.
Why it matters:Assuming full coverage equals no bugs can lead to overconfidence and missed defects.
Quick: Is testing only needed after development is complete? Commit to yes or no before reading on.
Common Belief:Testing should only start after the entire software is finished.
Tap to reveal reality
Reality:Testing should start early and continue throughout development to catch bugs sooner and reduce costs.
Why it matters:Delaying testing increases the chance of costly fixes and project delays.
Expert Zone
1
Test design quality matters more than test quantity; many tests with poor design miss critical bugs.
2
Flaky tests that sometimes pass and sometimes fail cause more harm than good and need careful management.
3
Testing in production with monitoring complements pre-release testing to catch real-world issues.
When NOT to use
Testing is not a silver bullet; in some cases, formal verification or static analysis tools are better for safety-critical systems. Also, exploratory testing is preferred when requirements are unclear or rapidly changing.
Production Patterns
Professionals use continuous integration pipelines to run automated tests on every code change. They combine unit, integration, and UI tests with manual exploratory sessions. Risk-based testing prioritizes critical features, and test results feed into quality dashboards for decision-making.
Connections
Scientific Method
Software testing follows the same pattern of hypothesis, experiment, and observation.
Understanding testing as an experiment helps frame it as a way to learn about software behavior, not just find faults.
Quality Control in Manufacturing
Both involve checking products against standards to ensure quality before delivery.
Seeing software testing as quality control highlights the importance of standards and repeatable checks.
Medicine Diagnosis
Testing software is like diagnosing a patient by running tests to find hidden problems.
This connection shows why testing needs careful planning and interpretation to avoid false positives or negatives.
Common Pitfalls
#1Testing only happy paths and ignoring edge cases.
Wrong approach:Test input: valid username and password only; expect success.
Correct approach:Test input: valid username and password (happy path), invalid inputs, empty fields, and boundary values.
Root cause:Misunderstanding that testing only common cases is enough, missing bugs in unusual situations.
#2Writing tests that depend on each other.
Wrong approach:Test B assumes Test A ran first and set up data.
Correct approach:Each test sets up its own data and can run independently.
Root cause:Not realizing tests should be isolated to avoid false failures and ease maintenance.
#3Ignoring test failures and continuing development.
Wrong approach:Seeing test failures as flaky and ignoring them without investigation.
Correct approach:Investigate and fix test failures immediately to maintain test reliability.
Root cause:Underestimating the importance of test results and allowing technical debt to grow.
Key Takeaways
Software testing is essential to find errors and ensure software works as users expect before release.
Testing is a process involving planning, running, and checking results, not just running the program.
Both manual and automated testing have roles; combining them leads to better coverage and quality.
Testing happens at multiple levels during development to catch bugs early and reduce costs.
Effective testing balances effort and risk, focusing on critical areas to use resources wisely.

Practice

(1/5)
1. What is the main purpose of software testing?
easy
A. To find problems in software before users do
B. To write new software features
C. To design the software user interface
D. To increase the software size

Solution

  1. Step 1: Understand the goal of testing

    Testing aims to find bugs or issues in software early.
  2. Step 2: Compare options to this goal

    Only To find problems in software before users do matches this purpose; others describe unrelated tasks.
  3. Final Answer:

    To find problems in software before users do -> Option A
  4. Quick Check:

    Testing purpose = find problems [OK]
Hint: Testing finds bugs early to avoid user issues [OK]
Common Mistakes:
  • Confusing testing with coding new features
  • Thinking testing is about design
  • Believing testing increases software size
2. Which of the following is a correct way to describe software testing?
easy
A. Writing code to add new features
B. Manually or automatically checking software for errors
C. Designing the software architecture
D. Deploying software to users

Solution

  1. Step 1: Identify testing methods

    Testing can be manual or automated to find errors.
  2. Step 2: Match options to testing description

    Only Manually or automatically checking software for errors correctly describes testing methods; others describe different tasks.
  3. Final Answer:

    Manually or automatically checking software for errors -> Option B
  4. Quick Check:

    Testing = manual or automated checks [OK]
Hint: Testing checks software manually or with tools [OK]
Common Mistakes:
  • Mixing testing with coding or deployment
  • Ignoring automated testing
  • Confusing testing with design
3. A software tester wants to check if a login form works correctly. Which testing approach best fits this goal?
easy
A. Deploying the login form to production
B. Writing new code to add login features
C. Manual testing by entering usernames and passwords
D. Designing the login page layout

Solution

  1. Step 1: Understand the testing goal

    The tester wants to verify login functionality works as expected.
  2. Step 2: Choose the correct testing method

    Manual testing by entering credentials simulates real user actions to find issues.
  3. Final Answer:

    Manual testing by entering usernames and passwords -> Option C
  4. Quick Check:

    Testing login = manual input checks [OK]
Hint: Test login by trying real inputs manually [OK]
Common Mistakes:
  • Confusing testing with coding or design
  • Thinking deployment is testing
  • Ignoring manual testing importance
4. Consider this code snippet for a simple test check:
def test_sum():
    result = 2 + 2
    assert result == 4
    print('Test passed')

What will be the output when this test runs?
medium
A. Test passed
B. AssertionError
C. No output
D. SyntaxError

Solution

  1. Step 1: Check the assertion condition

    The sum 2 + 2 equals 4, so assert result == 4 passes.
  2. Step 2: Determine output after assertion

    Since assertion passes, 'Test passed' is printed.
  3. Final Answer:

    Test passed -> Option A
  4. Quick Check:

    2+2=4, assertion passes, print runs [OK]
Hint: If assert condition is true, print statement runs [OK]
Common Mistakes:
  • Thinking assertion fails causing error
  • Expecting no output from print
  • Confusing syntax errors with assertion
5. This test code has an error:
def test_divide():
    result = 10 / 0
    assert result == 0
    print('Test passed')

What is the error and how to fix it?
medium
A. AssertionError; fix by changing assert to result != 0
B. SyntaxError; fix by adding colon after function
C. NameError; fix by defining result before use
D. ZeroDivisionError; fix by avoiding division by zero

Solution

  1. Step 1: Identify the error in code

    Dividing by zero causes ZeroDivisionError at runtime.
  2. Step 2: Fix the error

    Avoid dividing by zero to prevent the error.
  3. Final Answer:

    ZeroDivisionError; fix by avoiding division by zero -> Option D
  4. Quick Check:

    Division by zero causes error [OK]
Hint: Division by zero causes error; never divide by zero [OK]
Common Mistakes:
  • Confusing runtime error with syntax error
  • Thinking assertion fails first
  • Ignoring division by zero problem
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard