Call a test from within a test junit
- From: mike <mikaelpetterson@xxxxxxxxxxx>
- Date: Wed, 2 Feb 2011 00:11:03 -0800 (PST)
Hi,
I am using Junit 4.7 and I have the following in my test class A:
@BeforeClass
public void setup () {
//Here I want to class another test class, called Setup, that sets
preconditions for all tests in my test class A.
}
I want to keep it as a test since the I know if any of the setup steps
fail.
How can I call Setup and execute methods from my class A?
Setup
=====
public class Setup extends TestCase{
public Setup() throws Exception {
super("Setup");
}
@Test
public void mySetupStep1() throws Exception{
}
@Test
public void mySetupStep2() throws Exception{
}
}
.
- Follow-Ups:
- Re: Call a test from within a test junit
- From: markspace
- Re: Call a test from within a test junit
- Next by Date: Re: Call a test from within a test junit
- Next by thread: Re: Call a test from within a test junit
- Index(es):
Relevant Pages
|