Giter Site home page Giter Site logo

test123's Introduction

Hangman Game

Python console app hangman game based on the code by Mark Patterson

Install dependencies and run

  1. pip install poetry
  2. poetry install
  3. poetry run python app/hangman.py

Lab "Test Coverage" Assignment

Important instructions

  1. do not move/delete the source files from the folders
  2. submission: commit and push your changes to the current project to GitHub
  3. do not edit autograding or classroom files

⚠️ Note: the autograding is simplified on purpose, it will be overwritten after the submission deadline with additional tests and quiz grading

⚠️ Note: app/hangman.py should not be changed, anyways it will be overwritten in the post processing for the final autograding

⚠️ Note: tests/test_hangman.py All your tests should be in this file

⚠️ Note: .github/workflows/main.yaml Your CI pipeline should be in this file

⚠️ Note: For the coverage threashold, use the command line only in the pipeline.

Basis path testing (1pt)

  • Calculate the minimum number of the basis path test cases needed for the 'hangman.py::hangman'

  • Add the number here between the brackets.

Your answer. For example (5):

Q1 (__)

Create test cases (3pt)

  • Create test cases with the minimum 85% of combined coverage (lines and branch coverage) for the whole hangman.py
  • Place your tests under the tests/test_hangman.py folder

⚠️ Note: the hangman.py should not be modified. It will be overwriten for in the final autograding stage after the submission deadline.

Calculate coverage (1pt)

  • What is the line coverage of your test suite for the hangman.py?

Your answer in %. For example (86):

Q2 (__)

  • What is the current branch coverage of your test suite for the hangman.py?

Your answer in %. For example (86):

Q3 (__)

Add CI (1pt)

  • Add main.yaml that runs your test suite from tests/ and has the minimum coverage criteria for the whole hangman.py of 85% for the combined coverage (total coverage including lines + branches)

⚠️ Note: For the coverage threashold, use the command line only in the pipeline. Do not use config files.

Hints

Spoilers

  • you may need to recall the lab on metrics to get the answer to Q1
  • you may need pytest-cov module installed
  • you may need to generate and check coverage.json to get the raw data and calculate exact numbers for the coverage

test123's People

Contributors

agilebotanist avatar

Watchers

 avatar

test123's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.