Methodologies to Test and Evaluate Code

Syllabus Point

  • Apply methodologies to test and evaluate code

Testing methodologies provide structured approaches for verifying that software behaves correctly. Different methodologies focus on different aspects of the system.

Testing methodologies

White box testing

White box testing (also called structural or clear box testing) examines the internal logic and code structure of a program. The tester has full knowledge of the source code.

  • Tests internal code paths, branches, and conditions
  • Verifies that all logical paths through the code are exercised
  • Used to identify logic errors, unused code, and security vulnerabilities
  • Requires programming knowledge to design test cases

Black box testing

Black box testing examines software behaviour from the user perspective without knowledge of the internal code. Tests are based on inputs and expected outputs.

  • Tests functionality against specifications and requirements
  • Tester has no knowledge of the internal implementation
  • Used to verify that the software meets user and stakeholder expectations
  • Identifies missing functionality, incorrect outputs, and interface errors

Unit testing

Unit testing involves testing individual components or functions in isolation to verify they produce the correct output for given inputs.

  • Tests the smallest testable unit of code (a function or method)
  • Typically automated and run frequently during development
  • Helps catch bugs early before integration
  • Common frameworks: pytest (Python), Jest (JavaScript)

Integration testing

Integration testing verifies that multiple components or modules work correctly together after being combined.

  • Identifies interface defects and data flow issues between modules
  • Performed after unit testing, before system testing
  • Can be incremental (adding one module at a time) or big-bang (all at once)
  • Tests that modules communicate and exchange data as expected

System testing

System testing evaluates the complete, integrated software system against the specified requirements.

  • Tests the end-to-end behaviour of the entire system
  • Verifies that functional and non-functional requirements are met
  • Includes performance, security, and reliability testing
  • Conducted in an environment that mirrors production

Acceptance testing

Acceptance testing determines whether the software is ready for delivery by verifying it meets the client or end-user requirements.

  • Conducted by the client or end users, not the development team
  • Validates that the solution solves the original problem
  • User acceptance testing (UAT) is the most common form
  • Final gate before software is deployed to production

Keep Progressing

Use the lesson navigation below to move through the module sequence.

Methodologies to Test and Evaluate Code | Testing and Evaluating | Learn Software