Skip to content
VirtualLP Virtual Learning Platform

Software Testing Fundamentals

13 min read Topic 5 of 31

Suppose a calculator shows 6 for 2 + 3. You found a problem by comparing its answer with the expected answer, 5. Software testing uses planned checks like this.

Tests check normal use, wrong input and unusual cases. A passing test shows that its checks worked for that run. It cannot prove that every possible problem has been found.

Software testing

Software testing checks whether software behaves as expected and helps find problems. It uses planned inputs and compares actual results with expected results. Tests cannot prove that all bugs are absent.

tasting before serving

A cook tastes the curry before serving it to guests. Tasting does not guarantee every guest will love it, but it catches "too much salt" before anyone else notices. That is testing.

Key terms

Term Meaning
Error (mistake) A human action that produces a wrong result
Defect (bug, fault) A flaw in the code or document caused by an error
Failure The system does not do what is expected when the defect is run
Verification "Are we building the product right?" – reviews, inspections, static checks
Validation "Are we building the right product?" – running the software against user needs

Testing levels

flowchart BT
    U["Unit testing<br/>single method / class<br/>JUnit · TestNG · NUnit"] --> I["Integration testing<br/>modules working together<br/>API testing · SoapUI · Postman"]
    I --> S["System testing<br/>the whole application<br/>Selenium · JMeter"]
    S --> A["Acceptance testing<br/>business scenarios<br/>Cucumber BDD"]
Level Tests Who Tools in this course
Unit The smallest pieces – methods, classes Developers JUnit, TestNG (Test Next Generation), NUnit
Integration The connections between modules / services Developers, testers SoapUI, Postman
System The complete application end-to-end Testers Selenium IDE (Integrated Development Environment)/RC (Remote Control)/WebDriver, AutoIT, JMeter
Acceptance Business needs, user scenarios Business + testers Cucumber (Gherkin)

Testing types

Type Question it answers
Functional Does each feature behave as specified?
Regression Did a change break something that used to work?
Smoke / sanity Is the build stable enough to test further?
Performance – load / stress / spike How fast and stable is it with many users?
Usability, security, compatibility Is it easy to use, safe, and does it work on all browsers/devices?
Technique Based on Examples
Black-box The requirements; the code is not seen Equivalence partitioning, boundary value analysis, decision tables
White-box The code's structure Statement, branch and path coverage (unit tests)

Anatomy of a test case

Field Example (login)
ID TC_LOGIN_01
Title Valid user can log in
Pre-conditions User student exists
Steps Open login page → enter username and password → click Login
Test data student / Pass@123
Expected result Dashboard shows "Welcome, student"
Actual result / status Pass / Fail

Software Testing Life Cycle (STLC)

  1. Requirement analysis – what can be tested?
  2. Test planning – scope, approach, tools, schedule.
  3. Test case design – write the cases and test data.
  4. Environment set-up – browsers, servers, tools.
  5. Test execution – run the tests, log defects.
  6. Test closure – write the report and lessons learned.

Manual vs automated testing

Manual Automated
Best for Exploring, usability, one-off checks Regression, repeated, data-driven and load tests
Speed Slow Fast and repeatable
Cost Cheap to start, costly over time Costly to start, cheap per run
Tools Test cases, checklists Selenium, JUnit/TestNG/NUnit, JMeter, Cucumber, SoapUI/Postman

The test automation pyramid: many fast unit tests at the bottom, fewer API (Application Programming Interface)/integration tests in the middle, and only a few slow UI (User Interface) tests at the top.

Key point

Be able to explain verification vs validation, the four testing levels, black-box vs white-box, and why regression tests are the first candidates for automation.

Quick revision

  1. Error → defect → failure.
  2. Levels: unit, integration, system, acceptance.
  3. Black-box uses requirements; white-box uses code structure.
  4. A test case has steps, data and an expected result.
  5. Automate repetitive regression and load tests; explore manually.

Create a free account to track your progress and unlock virtual labs.