Questions tagged [struts2-junit-plugin]

The Struts 2 JUnit Plugin provides integration with JUnit.

The Struts 2 JUnit Plugin provides integration with the JUnit test framework.

This plugin provides a base StrutsTestCase class that can subclassed to test Struts 2 components.

It is used within Struts 2 itself to test core framework components and many bundled plugins.

StrutsSpringTestCase is also provided to support actions created by the Spring object factory.

20 questions
0
votes
1 answer

Unable to execute any StrutsTestCase using Struts2-Junit-Plugin, action method is null

First of all sorry if I don't explain it clearly enough, I will try to do my best. Recently I switched from C/C# to Java, and I'm a bit overwhelmed. I'm working on a project that is using Struts2+Hibernate (I'm not using Spring); the idea was to use…
Abyss
  • 1
  • 1
0
votes
1 answer

Creating database related JUNIT test cases for Struts2

I am using struts2-junit-plugin for writing test cases for struts2 web application my issue is that in my action classes there are some database related queries which uses data source(jndi) how can i simulate this in my test case. EDIT In this test…
Haider
  • 615
  • 1
  • 16
  • 38
0
votes
0 answers

How to get the HTML output of an Action in Struts 2 unit test?

In struts 2 unit tests, the class MockHttpServletResponse is available which I'm expecting, should contain the html output of any given action after it is executed. I'm trying to obtain this output and test it for the presence of a certain string,…
Ali
  • 261,656
  • 265
  • 575
  • 769
-1
votes
1 answer

Using struts2-junit-plugin jars with Struts1.x application

I am working on struts 1.x application and need to implement junit 4 test cases in it. I have struts2-junit-plugin jars for using StutsTestCase to create test cases for Action classes. Is this possible ? Struts 1.x app using struts2-junit jars .…
-1
votes
1 answer

How to run Struts2 Unit tests?

Struts2 documentation describes how to write Unit tests for Struts 2. But how can I actually run these tests once they're written? E.g, normally I would create a new JUNIT test for a class using Eclipse / Netbeans, and then run the tests from within…
Ali
  • 261,656
  • 265
  • 575
  • 769
1
2