vaayaa Inclusive Education
Micro-Diploma

Software Testing Fundamentals

5-Year Access Self-Paced Learning Certificate Included

Unlock Full Course

Get instant access to all sections and earn your verified certificate.

$9.99

Table of Contents

FREE PREVIEW — Section 1 of Module 1

What is Software Testing?

Unit
  • Definition: Software testing is the process of evaluating a software system to find discrepancies between expected and actual behavior. It involves executing programs with the intent of discovering defects and ensuring the product meets user requirements.
  • Purpose: Testing helps identify bugs early, reduces development costs, and increases confidence in software quality. It also provides objective information about product risks to stakeholders.
  • Cost of defects: A defect found during requirements phase costs significantly less to fix than one discovered in production. Industry studies show the cost multiplies by ten for each stage the defect progresses.
  • Verification vs validation: Verification checks that the product is built correctly according to specifications, while validation ensures the right product is built for user needs. Both are essential for comprehensive quality assurance.
  • Testing vs debugging: Testing finds failures by running software; debugging is the subsequent process of locating and fixing the root cause. Testing can be performed by testers, while debugging is typically done by developers.
  • Positive vs negative testing: Positive testing validates that the system works as expected with valid inputs. Negative testing checks the system's ability to handle invalid or unexpected inputs gracefully.
  • Static vs dynamic testing: Static testing examines code, requirements, or design without executing the software. Dynamic testing involves executing the software and observing its behavior under various conditions.
  • Role in quality assurance: Testing is a key component of Quality Assurance (QA), which encompasses processes, standards, and activities to ensure quality throughout development. QA is proactive; testing is reactive.
  • Test levels: Testing is performed at multiple levels, including unit, integration, system, and acceptance testing. Unit testing focuses on individual components, integration testing checks interactions between modules, system testing validates the complete application, and acceptance testing ensures the software meets business requirements before release.
  • Test design techniques: Techniques like equivalence partitioning, boundary value analysis, and decision table testing help create effective test cases. Equivalence partitioning divides input data into valid and invalid classes, while boundary value analysis tests edge conditions where defects often hide. These structured methods improve coverage without redundant tests.
  • Test automation benefits: Automated testing speeds up regression testing and reduces human error when repeating the same test scenarios. It allows teams to run hundreds of tests in minutes, provides consistent execution, and frees testers to focus on exploratory and higher value testing activities. Automation is especially valuable for continuous integration pipelines.
  • Exploratory testing: In exploratory testing, testers actively design and execute tests in real time, learning about the application as they test. This approach uncovers unexpected issues that scripted tests might miss, relies on tester creativity and domain knowledge, and is particularly useful for new features or when requirements are unclear.
Code Example
Python
def add(a, b):
return a + b

# Test case using simple assertion
assert add(2, 3) == 5, 'Expected 5'
assert add(-1, 1) == 0, 'Expected 0'

A basic test case in Python uses assertions to compare actual output against expected results. This example demonstrates two assertions for the add() function.

Quick Revision
  • Software testing finds discrepancies between expected and actual behavior to improve quality.
  • Early defect detection reduces costs significantly compared to fixing bugs in production.
  • Verification ensures correct implementation; validation ensures the right product is built.
  • Testing differs from debugging and includes both positive and negative test scenarios.

Like what you see? Unlock the full course to continue.

Limited Offer
$9.99
Limited Offer $9.99