org.apache.struts2.junit

## Class StrutsSpringTestCase

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - com.opensymphony.xwork2.XWorkTestCase
      - - org.apache.struts2.junit.XWorkTestCase
        - - org.apache.struts2.junit.StrutsTestCase
          - - org.apache.struts2.junit.StrutsSpringTestCase

- All Implemented Interfaces:
    junit.framework.Test

      public abstract class StrutsSpringTestCase
      extends StrutsTestCase

  Base class for Spring JUnit actions

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.springframework.context.ApplicationContext` | `applicationContext`

    - ### Fields inherited from class org.apache.struts2.junit.StrutsTestCase

      `dispatcher, dispatcherInitParams, pageContext, request, resourceLoader, response, servletContext`

    - ### Fields inherited from class com.opensymphony.xwork2.XWorkTestCase

      `actionProxyFactory, configuration, configurationManager, container`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrutsSpringTestCase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String[]` | `getContextLocations()`
    `protected void` | `setupBeforeInitDispatcher()`

    - ### Methods inherited from class org.apache.struts2.junit.StrutsTestCase

      `applyAdditionalParams, createAction, executeAction, findValueAfterExecute, getActionMapping, getActionMapping, getActionProxy, initActionContext, initDispatcher, initServletMockObjects, initSession, injectStrutsDependencies, setUp, setupAfterInitDispatcher, tearDown`

    - ### Methods inherited from class com.opensymphony.xwork2.XWorkTestCase

      `createContextWithLocale, loadButAdd, loadButAdd, loadButSet, loadConfigurationProviders, setStrutsConstant, setStrutsConstant`

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

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

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### applicationContext

          protected static org.springframework.context.ApplicationContext applicationContext

  - ### Constructor Detail

    - #### StrutsSpringTestCase

          public StrutsSpringTestCase()

  - ### Method Detail

    - #### setupBeforeInitDispatcher

          protected void setupBeforeInitDispatcher()
                                            throws Exception

      Overrides:
        `setupBeforeInitDispatcher` in class `StrutsTestCase`
      Throws:
        `Exception`

    - #### getContextLocations

          protected String[] getContextLocations()

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.