












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This document from the university of maryland, college park's department of computer science provides an overview of program testing in object-oriented programming ii (cmsc 132). It covers types of testing, levels of testing, and testing terminology. Topics include test cases, test suites, test harnesses, test drivers, stubs, and testers. The document emphasizes the importance of testing and discusses clear box testing, black box testing, unit testing, integration testing, system testing, and acceptance testing.
Typology: Study notes
1 / 20
This page cannot be seen from the preview
Don't miss anything!













Overview
Types of testing Levels of testing
Program Testing
Test software with selected test cases More scalable than verification Not guaranteed to detect all errors
Testing – Terminology
Individual test
Collection of test cases
Program that executes a series of test cases
Software that facilitates writing & running tests Example – JUnit
Testing – Terminology
Person devising and / or performing tests More effective if 2nd person writes tests
Programmer explains code to 2
nd
person
Types of Testing
Allowed to examine code Attempt to improve thoroughness of tests
No knowledge of code Treat program as “
black box
Test behavior in response to inputs
Unit Test
Classes Methods
Extensive unit testing during development
Pair programming (1 coder, 1 tester)
Design unit tests along with specification
Test each method of class Test every possible
flow path
through method
Flow Path
S1 while (B1) {
if (B2)
else
Unit Test – Test Coverage
Performed by submit server For code, reports # tests executing code
For set of tests selected (from link)
E.g., all public tests, individual test
For conditionals, reports X/Y where
X = # tests executing True Y = # tests executing False
Color
Green = executed by some test case Pink = not executed
Unit Test – Test Coverage Example
System Test
Include all components of software In context in which software will be used
Acceptance Test
Ensure program meets all requirements
Place software in user environment Test software with
Real-world data Real users Typical operating conditions Test cases selected by users
Regression Test
As software is modified / extended
Save suite of tests and expected results Rerun test suite periodically after software changes Report any loss of functionality
Software is more stable when developers leavework
Developing Test Cases
Develop test data during analysis & design phases Attempt to exercise alternate program paths Check boundary conditions
st
and last iterations of loop
st
and last values added to data structure
Pay close attention to problem specification UML use cases
test cases