|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jvnet.hudson.test.HudsonTestCase
public abstract class HudsonTestCase
Base class for all Hudson test cases.
| Nested Class Summary | |
|---|---|
class |
HudsonTestCase.WebClient
Extends WebClient and provide convenience methods
for accessing Hudson. |
| Field Summary | |
|---|---|
protected java.lang.String |
contextPath
Where in the Server is Hudson deploed? |
protected TestEnvironment |
env
|
protected HudsonHomeLoader |
homeLoader
|
protected Hudson |
hudson
|
protected int |
localPort
TCP/IP port that the server is listening on. |
protected org.mortbay.jetty.Server |
server
|
protected java.util.List<LenientRunnable> |
tearDowns
Runnables to be invoked at tearDown(). |
| Constructor Summary | |
|---|---|
protected |
HudsonTestCase()
|
protected |
HudsonTestCase(java.lang.String name)
|
| Method Summary | |
|---|---|
protected org.mortbay.jetty.security.UserRealm |
configureUserRealm()
Configures a security realm for a test. |
protected FreeStyleProject |
createFreeStyleProject()
|
protected FreeStyleProject |
createFreeStyleProject(java.lang.String name)
|
protected javax.servlet.ServletContext |
createWebServer()
Prepares a webapp hosting environment to get ServletContext implementation
that we need for testing. |
protected Hudson |
newHudson()
Creates a new instance of Hudson. |
protected void |
recipe()
Called during the setUp() to give a test case an opportunity to
control the test environment in which Hudson is run. |
protected void |
setUp()
|
protected void |
tearDown()
|
HudsonTestCase |
with(HudsonHomeLoader homeLoader)
|
HudsonTestCase |
withExistingHome(java.io.File source)
|
HudsonTestCase |
withNewHome()
|
HudsonTestCase |
withPresetData(java.lang.String name)
Declares that this test case expects to start with one of the preset data sets. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Hudson hudson
protected final TestEnvironment env
protected HudsonHomeLoader homeLoader
protected int localPort
protected org.mortbay.jetty.Server server
protected java.lang.String contextPath
Server is Hudson deploed?
protected java.util.List<LenientRunnable> tearDowns
Runnables to be invoked at tearDown().
| Constructor Detail |
|---|
protected HudsonTestCase(java.lang.String name)
protected HudsonTestCase()
| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exception
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.Exception
protected Hudson newHudson()
throws java.lang.Exception
Hudson. If the derived class wants to create it in a different way,
you can override it.
java.lang.Exception
protected javax.servlet.ServletContext createWebServer()
throws java.lang.Exception
ServletContext implementation
that we need for testing.
java.lang.Exceptionprotected org.mortbay.jetty.security.UserRealm configureUserRealm()
protected FreeStyleProject createFreeStyleProject()
throws java.io.IOException
java.io.IOException
protected FreeStyleProject createFreeStyleProject(java.lang.String name)
throws java.io.IOException
java.io.IOException
protected void recipe()
throws java.lang.Exception
setUp() to give a test case an opportunity to
control the test environment in which Hudson is run.
From here, call a series of withXXX methods.
java.lang.Exceptionpublic HudsonTestCase withNewHome()
public HudsonTestCase withExistingHome(java.io.File source)
public HudsonTestCase withPresetData(java.lang.String name)
public HudsonTestCase with(HudsonHomeLoader homeLoader)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||