JUNIT??
Junit have junit engine where Junit engine is heart and sole of Junit.
There are three set of Api availabe w.r.t JUnit.
1. Vintage. -- Old test.
2. Jupiter. -- Junit 5 tests.
3. 3rd Party Api. -- Custom tests.
JUnit is an open source Unit Testing Framework for JAVA. It is useful for Java Developers to write and run repeatable tests. Erich Gamma and Kent Beck initially develop it. It is an instance of xUnit architecture. As the name implies, it is used for Unit Testing of a small chunk of code.
Developers who are following test-driven methodology must write and execute unit test first before any code.
Once you are done with code, you should execute all tests, and it should pass. Every time any code is added, you need to re-execute all test cases and makes sure nothing is broken.
JUnit without a doubt, is considered as one of the top Java test frameworks. Below are the pointers behind it.
- Open Source Framework
- Offers integrations with IDEs such as Eclipse, IntelliJ etc. so you could test run your code quickly and easily.
- Offers integration with CI/CD tools such as Jenkins, Teamcity etc. to help you create a sturdy delivery pipeline.
- Offers assertions to help you conveniently compare actual results with the expected results.
- Offers annotations to help you identify the type of test methods.
- Provides a facility to create a test suite which further includes multiple test cases and even other test suites.
- Provides Test Runner to help your easily execute a Test Suite.
- Makes the test code more readable, elegant and increases the quality.
- Provides JUnit Test Report Generation in HTML format.
No comments:
Post a Comment