Computer Science 203:

Software Engineering

Gregory M. Kapfhammer

Triangles 1 flickr photo by vincentag shared under a Creative Commons (BY-NC-ND) license

Color Scheme

Key Concept

Corresponding Diagram

In-Class Discussion

In-Class Activity

Details in the Textbook

Python Testing with Pytest

Chapters 1 through 2


Test Strategy

Unit test

Integration test

System test

Where do you think that we will focus?

Unit testing

Why is this our focus?

Chapter 1: Getting Started

Test Cases

Setup steps

Call function under test

Perform assertions

What does it mean when a test fails?

What does it mean when a test passes?

Test oracles

Test assertions

Test Outcomes







What are XFAIL and XPASS?

Command-line arguments

Run a single test

Run marked tests

Run entire test suite

Run modified test suite

Application to the software project

Chapter 2: Writing Tests

Python project structure

See Page 24 for more details

Using assertions

Test Outcomes

assert something

assert a == b

assert a < b

Naming test functions

Marking test functions

Skipping test functions

Running test subsets

Parameterized testing

Benefits of parameterized testing?

See page 43 for an example

Alternatives to parameterized testing?

Application to the software project