Solving A Bug

From Foss2Serve
(Difference between revisions)
Jump to: navigation, search
(References:)
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Solving A Bug ==
+
__NOTOC__
  
=== Preparation: ===
+
{{Learning Activity Overview
 +
|title=
 +
Solving a Bug
 +
|overview=  
 +
JUnit is a large, mature free and open source software (FOSS) that is written in Java. Learners will read an open issue in JUnit, find resources to research and understand it, replicate the bug, produce some improved additional test cases while writing a better bug report, and describe the process required to fix the bug.
 +
|prerequisites=
 +
# Including a library in a Java project
 +
# Running a JUnit Test Case (No in-depth knowledge of JUnit assumed)
 +
|objectives=
 +
# Understand, investigate and report details on a real, poorly documented, unsolved issue in JUnit a FOSS application.
 +
# Reproduce a reported bug.
 +
# Write an improved bug report and 4) Describe the process required to fix the bug.
 +
|process skills=
 +
}}
 +
 
 +
=== Background ===
 +
 
 +
This project is designed to familiarize students with a FOSS that is widely used, the process for improving this mature application with a complex architecture, and raise their awareness of the FOSS community. JUnit is free and open source software (FOSS) that is written in Java. The scenario: You would like to contribute to JUnit as a tester and bug fixer. Read about the JUnit FOSS community to determine how..The instructions are intentionally obtuse. The student will examine a real world issue with no simple answer and determine how to address it. There is no answer on StackOverflow!
 +
 
 +
=== Directions ===
 +
 
 +
We will use one specific issue in JUnit to learn about the JUnit community.
 +
 
 +
== Part 1 - Install a version of JUnit ==
 +
 
 +
# Download junit-4.12.jar at https://github.com/junit-team/junit/wiki/Download-and-Install . Remember the directory location you placed the jar files in.
 +
# Create a project in Eclipse.
 +
# Add the jUnit-4.12 jar in its build path.
 +
 
 +
== Part 2 - Locate and describe the JUnit Issue ==
 +
 
 +
# Locate issue number #226 in the github Social Coding JUnit Issue Tracker at https://github.com/junit-team/junit/issues/226. 
 +
## How is the issue categorized? Is this a bug or feature request or something else?
 +
## What date was it reported?
 +
## Has the issue been assigned?
 +
## How many participants in the discussion?
 +
 
 +
== Part 3 - Reproduce the JUnit Issue ==
 +
 
 +
# Using JUnit 4.12, the information supplied about the issue and any other information you may have found in your research answer the following questions:
 +
## Did the code shown execute?
 +
## Was your result/output the same as the author of the issue?
 +
## Take a screen shot of Eclipse when you reproduce the bug, and submit it in your report that answers these questions.
 +
# In your opinion, was this bug well-written and easy to understand for the first two cases?  Why or why not?
 +
 
 +
== Part 4 - Write an Improved Bug Report ==
 +
 +
# There is a lot of missing information in this issue. Please supply three (at a minimum) pieces of information that should have been included in the description of the issue.
 +
# In a clear, and succinct manner provide a better description of the problem described. Please proved 2 additional test cases: one that is successful, one that is not. Show the unsuccessful/successful conclusion for each of your new test cases in screen shots.
 +
 
 +
== Part 5 - What Next? ==
 +
 
 +
# Assume that this bug sparks your curiosity. State an approach that you would take to find a solution for this bug. A VERY general outline is acceptable.
 +
# Outline the approach you would take to commit the fix for the issue if you have successfully coded it. A general outline is acceptable.
 +
 
 +
 
 +
=== Deliverables ===
 +
 
 +
Report (in Word .docx format) that includes screen shots.
 +
 
 +
=== Assessment ===
 +
 
 +
Suggested 100 point rubric
 
{| border="1"
 
{| border="1"
 
|-  
 
|-  
|'''Description''' || JUnit is a large, mature free and open source software (FOSS) that is written in Java. Learners will read an open issue in JUnit, find resources to research and understand it, replicate the bug, produce some improved additional test cases while writing a better bug report, and describe the process required to fix the bug.
+
|'''How do you report a JUnit bug? How do you volunteer to fix a JUnit bug? (Each worth 10 points)''' || Correct ||  Partial Credit
 
+
|-   
 +
|'''Bug, date reported, issue assigned, reproducible and output (4 each)''' ||  Correct || Partial Credit
 
|-
 
|-
|'''Source''' || This activity is a specialization of the [[Solving_A_Bug|Solving_A_Bug]].
+
|'''2 new test cases (10 each)''' || Correct || Partial Credit
 
|-
 
|-
|'''Prerequisite Knowledge''' || 1) Including a library in a Java project 2) Running a JUnit Test Case (No in-depth knowledge of JUnit assumed)
+
|'''General outline for solution process''' || Correct || Partial Credit
 
|-
 
|-
|'''Estimated Time to Completion''' || 120-180 minutes
+
|'''General outline to commit a fix''' || Correct || Partial Credit
 +
|}
 +
 
 +
=== Comments ===
 +
None
 +
 
 +
=== Additional Information: ===
 +
 
 +
{{Learning Activity Info
 +
|acm unit=
 +
SE/Software Verification and Validation,
 +
SDF/Fundamental Programming Concepts
 +
|acm topic=
 +
|difficulty=
 +
Moderately Difficult 
 +
|time=
 +
150-180 minutes
 +
|environment=
 +
Java IDE configured with JUnit 4.12.
 +
|author=
 +
E Brannock
 +
|source=
 +
N/A
 +
|license=
 +
{{License CC BY SA}}
 +
}}
 +
 
 +
{| border="1"
 +
|-
 +
|'''Knowledge Area/Knowledge Unit''' ||  SDF and SE
 
|-
 
|-
|'''Learning Objectives''' ||Ability to: 1) Understand, investigate and report details on a real, poorly documented, unsolved issue in JUnit a FOSS application, 2) Reproduce a reported bug, 3) Write an improved bug report and 4)Describe the process required to fix the bug.
+
|'''Topic''' ||
 
|-
 
|-
|'''Materials/Environment''' || Java IDE configured with JUnit 4.12.
+
|'''Level of Difficulty''' ||  
 
|-
 
|-
|'''Additional Information''' || ?
+
|'''Estimated Time to Completion''' ||  
 
|-
 
|-
|'''Rights''' || Licensed JUnit
+
|'''Materials/Environment''' ||  
 
|-
 
|-
|'''Turn In''' || Report that includes screen shots.
+
|'''Author''' ||
 +
|-
 +
|'''Source''' || None
 +
|-
 +
|'''License''' || http://creativecommons.org/licenses/
 
|}
 
|}
  
=== References: ===
+
=== Suggestions for the Open Source Project ===
 +
 
 
* [http://junit.org/ JUnit documentation]
 
* [http://junit.org/ JUnit documentation]
 
* [https://github.com/junit-team/junit/wiki/I-want-to-help! How to help with the JUnit FOSS]
 
* [https://github.com/junit-team/junit/wiki/I-want-to-help! How to help with the JUnit FOSS]
 
Part of your challenge is to find more resources.
 
Part of your challenge is to find more resources.
  
=== Background: ===
 
Bug tracking systems are a form of change management and organization used by FOSS projects. Bug trackers do far more than simply keep track of bugs. They also are used to hold new feature requests, patches, and some tasks. Bug trackers are also called request trackers, issue trackers and ticket systems.
 
 
=== Directions: ===
 
We will use the GNOME MouseTrap project to explore a typical Bugzilla instance for a project.
 
 
== Part 1 - Bug Reports ==
 
# Open a browser and go to [https://bugzilla.gnome.org/ GNOME Bugzilla]
 
# Enter 'MouseTrap' in the search bar.
 
# What do each of the column names below indicate? What are the range of possible values for 2-7 below?
 
## ID
 
## Sev
 
## Pri
 
## OS
 
## Product
 
## Status
 
## Resolution
 
## Summary
 
# In what order are the bugs initially displayed?
 
# What is the meaning of the shading of some bug reports?
 
# What is the meaning of the colors used when describing a bug (red, gray, black)?
 
# What do the bug reports tell you about the current state of the system?
 
# Select a bug that you think that you might be able to fix and look at it more closely (click on the bug number).
 
## Identify when the bug was submitted.
 
## How understandable is the description?
 
## Identify if there has been recent discussion about the bug?
 
## Is the bug current?
 
## Is the bug assigned? To whom?
 
## What would we need to do to fix the bug? 
 
# Repeat the previous step with a different kind of bug.
 
 
== Part 2 - Collective Reports ==
 
This section refers to the entire GNOME project, not just MouseTrap.
 
# Click on the “Reports” link on the top of the page.
 
# Click on "Summary of bug activity for the last week."
 
# How many bug reports were opened in the last week? How many were closed?
 
# What was the general trend last week? Were more bugs opened than closed or vice versa?
 
# Who were the top three bug closers? Why is this important to know?
 
# Who were the top three bug reporters? Are these the same as the top three bug closes? What is the overlap in these two lists?
 
# Who are the top three contributors of patches?
 
# Who are the top three reviewers of patches? What is the overlap between these lists and the bug closers and bug reporters? What is the overlap between patch contributors and patch reviewers?
 
 
--------------------
 
This work is licensed under a
 
[http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0 International License]
 
 
[[File:CC_license.png]]
 
  
 +
[[Category:Learning Activity]]
 
[[Category:Quality and Testing]]
 
[[Category:Quality and Testing]]
 +
[[Category:CS1]]
 +
[[Category:CS2]]
 +
[[Category:Good Draft]]

Latest revision as of 12:10, 8 September 2018


Title

Solving a Bug

Overview

JUnit is a large, mature free and open source software (FOSS) that is written in Java. Learners will read an open issue in JUnit, find resources to research and understand it, replicate the bug, produce some improved additional test cases while writing a better bug report, and describe the process required to fix the bug.

Prerequisites
  1. Including a library in a Java project
  2. Running a JUnit Test Case (No in-depth knowledge of JUnit assumed)
Learning
Objectives
After successfully completing this activity, the learner should be able to:
  1. Understand, investigate and report details on a real, poorly documented, unsolved issue in JUnit a FOSS application.
  2. Reproduce a reported bug.
  3. Write an improved bug report and 4) Describe the process required to fix the bug.
Process Skills
Practiced


Background

This project is designed to familiarize students with a FOSS that is widely used, the process for improving this mature application with a complex architecture, and raise their awareness of the FOSS community. JUnit is free and open source software (FOSS) that is written in Java. The scenario: You would like to contribute to JUnit as a tester and bug fixer. Read about the JUnit FOSS community to determine how..The instructions are intentionally obtuse. The student will examine a real world issue with no simple answer and determine how to address it. There is no answer on StackOverflow!

Directions

We will use one specific issue in JUnit to learn about the JUnit community.

Part 1 - Install a version of JUnit

  1. Download junit-4.12.jar at https://github.com/junit-team/junit/wiki/Download-and-Install . Remember the directory location you placed the jar files in.
  2. Create a project in Eclipse.
  3. Add the jUnit-4.12 jar in its build path.

Part 2 - Locate and describe the JUnit Issue

  1. Locate issue number #226 in the github Social Coding JUnit Issue Tracker at https://github.com/junit-team/junit/issues/226.
    1. How is the issue categorized? Is this a bug or feature request or something else?
    2. What date was it reported?
    3. Has the issue been assigned?
    4. How many participants in the discussion?

Part 3 - Reproduce the JUnit Issue

  1. Using JUnit 4.12, the information supplied about the issue and any other information you may have found in your research answer the following questions:
    1. Did the code shown execute?
    2. Was your result/output the same as the author of the issue?
    3. Take a screen shot of Eclipse when you reproduce the bug, and submit it in your report that answers these questions.
  2. In your opinion, was this bug well-written and easy to understand for the first two cases? Why or why not?

Part 4 - Write an Improved Bug Report

  1. There is a lot of missing information in this issue. Please supply three (at a minimum) pieces of information that should have been included in the description of the issue.
  2. In a clear, and succinct manner provide a better description of the problem described. Please proved 2 additional test cases: one that is successful, one that is not. Show the unsuccessful/successful conclusion for each of your new test cases in screen shots.

Part 5 - What Next?

  1. Assume that this bug sparks your curiosity. State an approach that you would take to find a solution for this bug. A VERY general outline is acceptable.
  2. Outline the approach you would take to commit the fix for the issue if you have successfully coded it. A general outline is acceptable.


Deliverables

Report (in Word .docx format) that includes screen shots.

Assessment

Suggested 100 point rubric

How do you report a JUnit bug? How do you volunteer to fix a JUnit bug? (Each worth 10 points) Correct Partial Credit
Bug, date reported, issue assigned, reproducible and output (4 each) Correct Partial Credit
2 new test cases (10 each) Correct Partial Credit
General outline for solution process Correct Partial Credit
General outline to commit a fix Correct Partial Credit

Comments

None

Additional Information:

ACM BoK
Area & Unit(s)

SE/Software Verification and Validation, SDF/Fundamental Programming Concepts

ACM BoK
Topic(s)
Difficulty

Moderately Difficult

Estimated Time
to Complete

150-180 minutes

Environment /
Materials

Java IDE configured with JUnit 4.12.

Author(s)

E Brannock

Source

N/A

License

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

CC license.png


Knowledge Area/Knowledge Unit SDF and SE
Topic
Level of Difficulty
Estimated Time to Completion
Materials/Environment
Author
Source None
License http://creativecommons.org/licenses/

Suggestions for the Open Source Project

Part of your challenge is to find more resources.

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