Unit Testing training project with home task:
Create a java project. Import Calculator.jar and TestNG libraries.
For the project do following tasks:
Testng -
- Write at least 10 unit tests for calculator methods (5 positive and 5 negative).
- Tests should have Before* and After* methods.
- Add Assert to each test method.
- Create .xml file configuration and use it to run tests.
- Create at least one test group. Some tests can depend on this group, or this group can be used to exclude/include tests from launch using XML-suite.
- Create parameterized test (use Data Provider).
- Use checks for expected exceptions.
- Configure and execute tests in parallel.
- Try to find all bugs.
- Implement tests launching with custom Runner, implement and use at least one listener.