Reputation: 10618
How do we test action classes of Applications written in 2.0.x version?
I read through this link and found out that, struts-junit plugin is only available for struts 2.1.1 or later.
My application is written using struts 2.0.11 and I don't think upgrading the version is easy in my project.
How do we unit test Action classes,given these limitations ?
Upvotes: 1
Views: 207
Reputation: 4044
Is there any special aspects of your action classes that you would like to test?
As long as your action classes are written as POJOs, you can test them as ordinary Java classes using any testing framework of your choice.
EDIT: Give a try this custom class which extends JUnit's TestCase
class. You will need dependency to org.springframework: spring-mock.
Upvotes: 1