Category:Create Unit Tests (Pathway)

From Foss2Serve
(Difference between revisions)
Jump to: navigation, search
(Created page with "__NOTOC__ '''The contributor will''': create unit tests for a software module (class, file, etc). '''The contribution is''': unit tests accepted into the project's codebase, ...")
 
 
(21 intermediate revisions by one user not shown)
Line 42: Line 42:
 
|-
 
|-
 
|
 
|
2. Run the project
+
2. Build and run the project
| Project is run
+
| Project is built and executed
 
|
 
|
 
* [[:Category:Information Processing|Info Proc]]
 
* [[:Category:Information Processing|Info Proc]]
Line 50: Line 50:
 
|-
 
|-
 
|
 
|
3. Work with community (or check issue tracker?) to find module that needs unit tests  
+
3. Identify module(s) that lack tests, need improved and/or additional unit tests. For example:
 +
*Examine test plan/documentation, if it exists.
 +
*Seek advice of community members for necessary testing
 +
*Identify test framework and run test coverage tools
 
| Module that needs unit tests is identified  
 
| Module that needs unit tests is identified  
|
 
* [[:Category:Written Communication|Writ Comm]]
 
|
 
|-
 
|
 
4. Locate the code for the module
 
| Source code for the module is located
 
 
|
 
|
 
* [[:Category:Problem Solving|Prob Solv]]
 
* [[:Category:Problem Solving|Prob Solv]]
 
* [[:Category:Written Communication|Writ Comm]]
 
* [[:Category:Written Communication|Writ Comm]]
 
|
 
|
 +
*[[Unit Test With GoogleTest Activity]]
 +
*[[Examine Branch Test Coverage (Activity)]]
 +
*[[Test Coverage Activity]]
 +
 
|-
 
|-
 
|
 
|
5. Write complete set of unit tests for the module
+
4. Add or improve unit tests, as previously identified, and evaluate results
| Complete set of unit tests is developed for the module
+
*Ensure appropriate branch/statement coverage criteria is met
 +
*Run regression tests
 +
| Improved set of unit tests is developed for the module(s)
 
|
 
|
 
* [[:Category:Written Communication|Writ Comm]]
 
* [[:Category:Written Communication|Writ Comm]]
 
* [[:Category:Critical Thinking|Crit Think]]
 
* [[:Category:Critical Thinking|Crit Think]]
 
|
 
|
 +
*[[Introduction to Test Driven Development]]
 +
*[[Regression Test Assignment]]
 +
*[[Test Driven Development]]
 +
*[[Testing And Coverage Assignment]]
 
|-
 
|-
 
|  
 
|  
6. Post results on the issue tracker
+
5. Post results on the issue tracker
 
| Results posted to the issue tracker
 
| Results posted to the issue tracker
 
|  
 
|  
 
* [[:Category:Written Communication|Writ Comm]]
 
* [[:Category:Written Communication|Writ Comm]]
 
|
 
|
 +
*[[Write a Bug Report (Activity)]]
 
|}
 
|}
  

Latest revision as of 00:34, 9 March 2017


The contributor will: create unit tests for a software module (class, file, etc). The contribution is: unit tests accepted into the project's codebase, and test results logged on issue tracker or otherwise accepted by the community.

Prerequisites

Area The contributor must be able to:
Software Configuration
  • Download and install the development environment.
  • Run the program.
Issue Tracker
  • Describe issue trackers and how they are used.
  • Access the issue tracker with appropriate permissions.
  • Read, create, and update issues in a tracker.
Community
  • Describe the community guidelines for bug management and triage.
  • Participate in a community which is open to code contributions.
  • Describe community policy on testing.
  • Time a contribution within the project's release cycle.

Pathway Steps, Outcomes, & Learning Activities

Follow the project’s policies and practices to complete the steps below.

Pathway Step Step Outcome Process Skills Focus Related Learning Activities

1. Download and install the project

Project is installed

2. Build and run the project

Project is built and executed

3. Identify module(s) that lack tests, need improved and/or additional unit tests. For example:

  • Examine test plan/documentation, if it exists.
  • Seek advice of community members for necessary testing
  • Identify test framework and run test coverage tools
Module that needs unit tests is identified

4. Add or improve unit tests, as previously identified, and evaluate results

  • Ensure appropriate branch/statement coverage criteria is met
  • Run regression tests
Improved set of unit tests is developed for the module(s)

5. Post results on the issue tracker

Results posted to the issue tracker

Notes for Learning Activities Related to this Pathway

When creating and revising activities:

  1. Interact with the community to identify likely modules for testing.
  2. Use an activity that reviews existing unit cases to provide students with an understanding of what they are trying to accomplish.

This category currently contains no pages or media.

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