-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: main
Are you sure you want to change the base?
Unit Testing #25
Conversation
@@ -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 |
There was a problem hiding this comment.
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 (>) ?
"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 |
There was a problem hiding this comment.
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.+' |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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☠
No description provided.