How to run test suit with Spring TestContext ?

Posted by lisak on Stack Overflow See other posts from Stack Overflow or by lisak
Published on 2011-01-01T22:46:38Z Indexed on 2011/01/01 22:54 UTC
Read the original article Hit count: 232

Filed under:
|
|

Hey,

I can't figure out, how to set up following scenario with Sprint TestContext with either JUnit4 or testNG:

@BeforeTestSuit - oneTimeSetUp
@BeforeClass
@Before - setUp
@Test - testEmptyCollection
@After - tearDown
@Before - setUp
@Test - testEmptyCollection
@After - tearDown
@AfterClass
@BeforeClass
@Before - setUp
@Test - testOneItemCollection
@After - tearDown
@Before - setUp
@Test - testEmptyCollection
@After - tearDown
@AfterClass
@AfterTestSuit - oneTimeTearDown

Could please anybody help me out here ?

My architecture is a parent class with @RunWith(SpringJUnit4ClassRunner.class) that is extended with particular test classes.

© Stack Overflow or respective owner

Related posts about junit4

Related posts about testng