Some people will think about selenium, QTP but the “Testing tool” I mentioned are JUnit, TestNG, NUnit, Rspec, SpecFlow, Cucumber, … or you can find define of Unit Testing tool
The Testing tools is one of importance components of ~Automation Framework~.
We should have knowledge about Testing tool features, this post I will describe my experiences when I used them.
1. Test case components
There are 4 main components within a test case:
- Main actions
- Expected results
- Clean/Clear test data
Based on this concept, Testing tool have functions/procedures to describe like:
For Pre-conditions have:
@BeforeSuite, BeforeClass, BeforeMethod
For Clean/Clear Test
@AfterSuite, AfterClass, AfterMethod
*RSpec* : after
2. Test events catcher
Test events catcher is very importance feature of testing tool that have you generate your customization reports.
- when using TestNG is [Listener interfaces](http://testng.org/doc/documentation-main.html#testng-listeners)
- when using UNuit is [Event Listener](https://github.com/nunit/docs/wiki/Event-Listeners)
- when using Rspec is called [base formatter](http://www.rubydoc.info/gems/rspec-core/2.6.4/RSpec/Core/Formatters/BaseFormatter)
- when using Cucumber is call [Formatter](https://github.com/cucumber/cucumber/wiki/Custom-Formatters)
3. Expected result
Testing tool have many assertion method to compare expected and actual result to make a test valid.
- TestNG have *AssertJUnit*
- NUnit have *Assert*
- RSpec have *expect().to*