junit « MVC « Spring Q&A





1. request scoped beans in spring testing    stackoverflow.com

I would like to make use of request scoped beans in my app. I use JUnit4 for testing. If I try to create one in a test like this:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations ...

2. Can JUnit be used as an alternative to browser testing in Spring?    stackoverflow.com

I'm building a Spring web app and up until now all of my testing is using a browser. This involves starting the server, opening a browser window and checking to see ...

3. How to configure selenium-server to use a proxy server from Eclipse    stackoverflow.com

When I run my Selenium tests from Selenium-IDE everything works fine, but when I export this test to Java and run it as a JUnit test from Eclipse, I get a ...

4. Loading system properties for tests    stackoverflow.com

I recently found a solution that allows me to load system properties for my unit tests. It works great if I'm running a test individually, but if I choose to run ...

5. Wrapping JsUnit in JUnit    stackoverflow.com

I'm required to use JSUnit in my Spring-MVC project. It seems that I could write some test pages, include some of my js files, write some tests, and load up my ...

6. Spring MVC Testing Error in loading xml fie    stackoverflow.com

My Code is works, but it fail in Junit mock testing in the below line. ApplicationContext ctx = new ClassPathXmlApplicationContext("../MyFile.xml"); HOw do I fix this? adding @ContextConfiguration or is there another way? "ApplicationContext ctx = ...

7. Spring MVC test case    stackoverflow.com

Am new to Spring MVC, i have written web servise using spring MVC and resteasy. My controller is working fine, now need to write testcase but i tried writtig but ...

8. Junit test case for spring MVC with RestEasy    stackoverflow.com

I'm newbie to spring mvc & had a problem with Junit test case for spring MVC
controller with resteasy.I tried out for sample implementation of junit test case, but getting exception. my code is..... spring ...

9. Set @ModelAttribute in MockHttpServletRequest in JUnit Test    stackoverflow.com

I'm trying to test a spring mvc controller. One of the methods takes a form input as a POST method. This method gets the form's commandObject through a @ModelAttribute annotation. How can I ...





10. Using @Autowired with JMockit makes the @Autowired object null    stackoverflow.com

I realize that there is another SO question which deals with this exact problem (here). However, it won't work in my case. I have a maven (web/frontend) project using spring. I've ...

11. JUnit test for model-binding and data validation in Spring webflow    stackoverflow.com

I am new to Spring webflow ( using version 2.3 ). I have a simple flow that captures user data on first page, persists it to model and goes to the ...

12. JUnit testing with spring    stackoverflow.com

I am trying to create a junit test for a spring controller method but I keep receiving the following error

java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside ...

13. Spring MVC: Testing particular annotated method gets invoked    stackoverflow.com

In Spring MVC 3.0, how do I test that a particular method gets invoked? For example, I have this controller method:

public class myController {
    @RequestMapping(value = "/create", method = ...

14. Spring MVC step-by-step & JUnit    forum.springsource.org

Spring MVC step-by-step & JUnit In part 4 of Thomas Risberg's "Developing a Spring Framework MVC application step-by-step", the test class TestProductManagerDaoJdbc has a flaw that may cause it to fail ...

15. JUnit test on an MVC Spring application, please help me :-(    forum.springsource.org

Nov 12th, 2010, 06:38 PM #1 AndreaNobili View Profile View Forum Posts Private Message Member Join Date Jun 2010 Posts 92 JUnit test on an MVC Spring application, please help me ...