Skip to content

coinse/cs453-mutation-handson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

CS453 Mutation Testing Hands-on

This repository contains materials for a simple mutation hands-on for CS453 Automated Software Testing. We use Python mutation tool called mutmut, which can be found here. You can install mutmut and PyTest using the requirements.txt included in the repo.

$ pip install -r requirements.txt

There are two subdirectories, each containing a simple Python script: triangle is the traditional triangle classification function, whereas lift is a simple class representing a lift (well, an elevator, if you use the incorrect version of English language :p)1.

Aim

First, in each directory, ensure that all existing test cases pass.

$ pytest test*.py

Then, you can run mutation by:

$ mutmut run "lift*" // or "triangle*"

Finally, you can browse the results of mutation testing by:

$ mutmut browse

There are mutants that are not killed ☹️ and not covered 🫥. Now add tests to kill all of them.

Footnotes

  1. I am obviously joking. This is a very old tweet from a parody account.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages