Testing And Coverage Assignment

From Foss2Serve
Revision as of 17:25, 1 August 2016 by Kevin.buffardi (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Title

Testing and Coverage Assignment

Overview

Participants write unit tests (in GoogleTest) to identify bugs in a C++ class

Prerequisite Knowledge

Students need to have installed and programmed unit tests with GoogleTest. They should also know how to run a coverage analyzer and interpret its results. Intermediate knowledge of Git version control is required.

Learning Objectives

Students should write unit tests and use a coverage analysis tool to identify test cases they may be missing and to reflect over possible errors in the code.

Directions:

Students:

  • You were just hired by GameTastic. They outsourced the work to start development of ConnectX, a variation of the board game "Connect Four." However, when they discovered that their outsourced workers were not following Test-Driven Development, they decided to hire new developers including you. They have tasked you to test the code already written and identify any bugs that already exist. Before going any further, they want to be confident in the code.
  • Use your knowledge of how to write unit tests and assessing the quality of testing to write sufficient tests so the team can be confident that your tests will identify any problems.
  • Fork the ConnectX repo into your own GitHub space
  • Clone the fork onto your computer. For this test, you should commit changes to your computer locally, but do not push any of your commits to the fork until instructed to do so by the instructor.
  • Keep your local repo clean -- only staging and committing the files relevant to the project tests: ConnectXTest.cpp and README.md. Do NOT commit changes to any other files.
  • In README.md, put your name and in bullet-list form, note any bugs you discover. Describe the bugs with enough detail that another developer can start fixing them.
  • Do not actually fix the bugs, you will only send your bug report to another developer on the team
  • Have your work completed and committed locally on your computer (and ready to push, but not yet pushed) by (deadline)

Deliverables:

A fork of the ConnectX repository, with added tests and documentation of found bugs

Assessment:

Grades will be based on the following rubric:

 50% Unit tests are written correctly and logically
 30% Testing thoroughly assesses the code
 10% At least one bug in the code is discovered (there are two related intentional bugs in the existing code)
 10% Instructions followed precisely
 EXTRA CREDIT: Bugs are identified correctly and described clearly

Additional Information:

Knowledge Area/Knowledge Unit

Softward Engineering

Topic

Unit Testing, Test Coverage, Bug Reporting

Level of Difficulty

Writing thorough unit tests will take intermediate knowledge of object oriented programming and discovering the existing bugs will take advanced debugging skills

Estimated Time to Completion

The assignment should take from 1-3 hours of work and is recommended as an equivalent to a relatively small programming assignment.

Materials/Environment

Need to have a working C++ development environment with GoogleTest and gcov installed

Author

Kevin Buffardi

Source

Kevin Buffardi

License

Licensed CC BY-SA 4.0



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

CC license.png

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox