Guys what is the best way to test struts actions? Is there any framework someone can recommend? I just recently started working with struts, I used to use mockito for spring mvc testing, but I can't find any good source online, most of them are way too outdated.
Refer to this sample implementation:
@Override
public void setUp() throws Exception {
super.setUp();
List<ContainerProvider> providers = super.configurationManager.getContainerProviders();
//make one of these for each config file you want to add
StrutsXmlConfigurationProvider newConfig = new StrutsXmlConfigurationProvider("src/main/webapp/WEB-INF/classes/struts.xml", true, super.servletContext);
providers.add(newConfig);
super.configurationManager.reload();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.