tags:

views:

15

answers:

0

Dear All:

I am sorry just wanted to know if this was possible?

I have discovered an interesting issue with JUnit and am looking for alternatives.

Thank you Misha

p.s. Here is JUnit issue:

import org.junit.After
import org.junit.Before
import org.junit.Test
import static org.junit.Assert.*

class MyTestTest {
 @Before public void beforeTests() {
   println "Before"
 }

 @Test public void testLogin() {
   println "Before asdf"
asdf
   println "After asdf"
 }

 @After public void logoutOfMyTest() {
   println "After"
blah
 }
}

JUnit only reports error related to blah.

Whereas TestNG reports both:

import org.testng.annotations.*

class MyTestTest {
 @BeforeClass public void beforeTests() {
   println "Before"
 }

 @Test public void testLogin() {
   println "Before asdf"
asdf
   println "After asdf"
 }

 @AfterClass public void logoutOfMyTest() {
   println "After"
blah

 }
}

Thank you! Misha