Difference Between JUnit And TestNG Annotations |
||
---|---|---|
Features | JUnit Annotations | TestNG Annotations |
Test annotation. | @Test | @Test |
Run before all test in this suite have run. | -- | @BeforeSuite |
Run after all test in this suite have run. | -- | @AfterSuite |
Run before the test. | -- | @BeforeTest |
Run after the test. | -- | @AfterTest |
Run before the first test method that belongs to any of these group is invoked. | -- | @BeforeGroup |
Run after the last test method that belongs to any of these group is invoked. | -- | @AfterGroup |
Run before the first test method in the current class is invoked. | @BeforeClass | @BeforeClass |
Run after all the test method in the current class have been run. | @AfterClass | @AfterClass |
Run before each test method. | @Before | @BeforeMethod |
Run after each test method. | @After | @AfterMethod |
IgnoreTest | @ignore | @Test(enable=false) |
Expected Exception | @Test(Expected=ArithmeticException.Class) | @Test(ExpectedExceptions=ArithmeticException.Class) |
TimeOut | @Test(timeout=1000) | @Test(timeout=1000) |
Thanks | From | Prashant Chauhan |
We are offering various software testing research by learning to help you to achieve the best quality of your web, responsive and mobile applications. Check out the latest blogs & articles on various software testing blog topics like Manual Testing Concepts, New Tools, DevOps, Scrum, Test automation, security, mobile app, and many more.
Monday, January 21, 2013
Difference Between JUnit And TestNG Annotations
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment