JUnit (EN)
FrameworkJava framework for writing and executing unit tests
JUnit Architecture
flowchart TD A[Test Class] --> B[@Test Annotation] A --> C[@BeforeEach Annotation] A --> D[@AfterEach Annotation] B --> E[Test Execution] C --> F[Setup] D --> G[Teardown] E --> H[Assertion] H --> I[Result: Pass/Fail] J[JUnit Runner] --> A K[JUnit Engine] --> J
In Context
- Typically used together with Maven or Gradle for build management
- Related to: TestNG, Mockito, Hamcrest
- Example use: Verifying functionality of individual methods in a Java class