# Class ServletTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.meterware.servletunit.ServletTestCase

All Implemented Interfaces:
  `junit.framework.Test`

public abstract class ServletTestCase extends junit.framework.TestCase
A base class for test cases to be run via `JUnitServlet`.

Author:
  Russell Gold

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ServletTestCase(String name)`

## Method Summary

Modifier and Type
Method
Description
`protected final ServletUnitClient`
`newClient()`
Returns a client object which can access the servlet context in which this test is running.

### Methods inherited from class junit.framework.TestCase

`countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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, failNotEquals, failNotSame, failSame`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ServletTestCase

protected ServletTestCase(String name)

## Method Details

### newClient

protected final ServletUnitClient newClient()
Returns a client object which can access the servlet context in which this test is running.