Milestone 3: Quality, Documentation, and Delivery
From Unit Tests to Final Submission
1 Milestone 3: Quality, Documentation, and Delivery
In this capstone milestone, you will learn the professional practices that separate a working program from a finished product: automated testing, clear documentation, and final project submission.
1.1 Overview & Learning Journey
Welcome to your final milestone! You have successfully designed, implemented, and debugged a functional Java application. The focus now shifts from building the code to verifying and documenting it. This is a crucial part of the software development lifecycle where you ensure your code is robust, reliable, and understandable to others.
In this milestone, you will step into the role of a Quality Assurance (QA) engineer and a technical writer. You will first write a suite of automated unit tests to prove your code works as expected and handles errors correctly. Then, you will document your code using the industry-standard Javadoc tool, generating a professional API documentation website. Finally, you will follow a checklist to prepare and submit your completed project. These final steps are what elevate a personal project into a professional portfolio piece.
1.2 What You’ll Accomplish
By the end of this milestone, you will have successfully:
- Written and executed automated unit tests for your application logic using the JUnit framework.
- Verified both “happy path” successes and “sad path” failures, confirming that your custom exceptions are thrown correctly.
- Authored professional code documentation for your classes and methods using Javadoc comments.
- Generated a complete HTML documentation website from your source code.
- Prepared and submitted a final, polished project using Git and GitHub Classroom.
1.3 Course Learning Objectives Alignment
The tasks in this milestone directly support the following Program and Course Learning Outcomes.
| Module Task | Program Learning Outcomes (PLOs) | Course Learning Outcomes (CLOs) |
|---|---|---|
| Unit Testing | Use current tools (2), Apply concepts (3), Implement solutions (5) | Compile, debug, and test (2) |
| Code Documentation | Communicate (1), Use current tools (2) | Document programs (7) |
| Project Submission | Use current tools (2), Maintain environment (6) | N/A |
1.4 Learning Objectives & Professional Alignment
The exercises in this module are designed to build specific, marketable skills that align directly with the Knowledge, Skills, and Abilities (KSAs) of a Computer Programmer (O*NET SOC Code 15-1251.00).
| Module Task | O*NET KSAs | Technologies Used |
|---|---|---|
| Unit Testing | Skills: Quality Control Analysis, Programming, Critical Thinking Abilities: Deductive Reasoning, Problem Sensitivity |
Program testing software: JUnit, Apache Maven |
| Code Documentation | Skills: Communication, Reading Comprehension, Attention to Detail Abilities: Written Expression |
Documentation and support software: Javadoc |
| Project Submission | Skills: Following Instructions, Project Management | Version control software: Git, GitHub Classroom |
1.5 Tools & Development Environment
This milestone focuses on the professional tools used to finalize a software project.
Key concepts to master:
@Testannotation: Marks a method as a test case that can be run automatically.@BeforeEachannotation: Designates a method to be run before each test, perfect for setting up a clean state.- Assertions: Using methods like
assertEquals()andassertNotNull()to verify that your code produces the expected outcome. - Exception Testing: Using
assertThrows()to confirm that your code correctly throws exceptions under error conditions.
Example Test:
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class AppTest {
@Test
void testAddTask_Success() {
TaskManager manager = new TaskManager();
manager.addTask(new Task("Test Title", "..."));
assertEquals(1, manager.getTasks().size());
}
@Test
void testFindTask_ThrowsException() {
TaskManager manager = new TaskManager();
assertThrows(TaskNotFoundException.class, () -> {
manager.findTaskById(99);
});
}
}Key features to master:
- Javadoc Comments: Writing comments that start with
/**and end with*/. - Block Tags: Using
@paramto describe method parameters,@returnto describe the return value, and@throwsto document exceptions a method can throw. - Documentation Generation: Running
mvn javadoc:javadocto create a full HTML website from your comments.
Example Javadoc:
/**
* Finds a task by its unique identifier.
*
* @param taskId The ID of the task to find.
* @return The found Task object.
* @throws TaskNotFoundException if no task with the given ID exists.
*/
public Task findTaskById(int taskId) throws TaskNotFoundException { ... }Key commands for submission:
git add .: Stages all new and modified files for the next commit.git commit -m "Message": Creates a permanent snapshot of your project with a descriptive message.git push: Uploads your final commits to GitHub Classroom for grading.