Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Testing #25

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Unit Testing #25

wants to merge 6 commits into from

Conversation

sigalrmp
Copy link
Collaborator

No description provided.

@sigalrmp sigalrmp requested review from kishan243 and Yxhej November 17, 2024 02:25
@@ -0,0 +1,91 @@
# Introduction

"Unit testing is a software development practice where individual components or functions of a program are tested in isolation to ensure they work correctly. It involves writing and running automated tests for specific units of code to verify their behavior, catch bugs early, and facilitate easier maintenance and refactoring of the codebase." - Claude.ai
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub's quote notation would look best for this. I think it's (>) ?

Suggested change
"Unit testing is a software development practice where individual components or functions of a program are tested in isolation to ensure they work correctly. It involves writing and running automated tests for specific units of code to verify their behavior, catch bugs early, and facilitate easier maintenance and refactoring of the codebase." - Claude.ai
> Unit testing is a software development practice where individual components or functions of a program are tested in isolation to ensure they work correctly. It involves writing and running automated tests for specific units of code to verify their behavior, catch bugs early, and facilitate easier maintenance and refactoring of the codebase." - Claude.ai

If you're working in a non-WPILib project, without gradle, here's how you can set up JUnit:
1. Open your project directory in VSCode
2. Make sure there is at least one Java file (if there isn't make one). This should activate the VSCode Java extensions.
3. Press on the testing tab on the left side of the screen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub renders the image here in its actual size, which is too big for the line .-.

Could make the image itself smaller or use html to decrease it's size? Not a big deal right now either way

3. Add the following clauses to `build.gradle`:
```
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.+'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray indent here and on line 39

2. Create path `src/test/java`. All tests should be at this path.
3. Add the following clauses to `build.gradle`:
```
dependencies {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should specify that those lines should be added into the existing construct; personally had I not known I would have copy-pasted this over the entire existing config block☠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants