-
-
Notifications
You must be signed in to change notification settings - Fork 78
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 #716
Unit testing #716
Conversation
src/test/README.md
Outdated
|
||
## JUnit for Unit Testing | ||
|
||
Wildbook uses [JUnit 5](https://junit.org/junit5/docs/current/user-guide/) for unit testing. All unit tests _must run and pass_ in order for changes to be |
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.
for backend unit testing
src/test/README.md
Outdated
Tests should be created under the `src/test/java/org/ecocean/` directories, corresponding to the java class which are testing. The test class name should follow | ||
the convention of adding the suffix `Test` to the java class name, such as `AnnotationTest.java` for tests of code within `Annotation.java`. | ||
|
||
Ultimately, almost all Wildbook java classes will have a corresponding `*Test.java` class. If one does not exist to add new tests to, it should be created |
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.
Ultimately Eventually
"That being said, edits to existing classes may not require full understanding of a class, while testing does. If you choose not to make a unit test for an existing class, make a note of that choice in the PR and explain why."
src/test/README.md
Outdated
|
||
## Integration Testing, Frontend Testing | ||
|
||
TBD / linked elsewhere |
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.
TODO TBD / linked elsewhere
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.
minor edits and one big change to address a common case for tiny bug fixes
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.
🎉
Reinstate unit testing with JUnit 5
pom.xml
library updates and changes for maven to run testsAnnotationTest.java