Top "Junit4" questions

Version 4 of the popular Junit Java Unit testing framework

Autowiring not working in Spring 3.1.2, JUnit 4.10.0

Using Spring 3.1.2, JUnit 4.10.0, and pretty new to both versions. I'm having the problem that I can't get the annotation-based autowiring …

spring junit junit4 spring-annotations spring-test-mvc
WebMvcTest in Spring Boot

I have a basic SpringBoot app., embedded Tomcat, Thymeleaf template engine, and package as an executable JAR file. I have …

spring spring-mvc spring-boot junit4 mockmvc
Hamcrest assertThat ambiguous?

I got some samplecode from a college, imported the project and try to run the Tests: The method assertThat(Integer, …

java junit4 hamcrest
mvc controller test with session attribute

I'm trying to test a method with this signature: @Autowired HttpSession http_Session; @RequestMapping(method=RequestMethod.GET, value="/search/findByName") …

spring-mvc controller attributes junit4 httpsession
Can't run JUnit 4 test case in Eclipse Android project

I am new to Java and am trying to run a unit test on a class I am writing. Eclipse (3.5) …

java android eclipse junit4
android espresso login once before running tests

I've been trying to cover my Android app with tests and have started using espresso recently. Pretty impressed with it …

android junit4 android-espresso ui-testing
Maven 2 Not Running Junit 4 Tests

I'm having an issue getting surefire to run Junit4 tests. This same issue was reported in https://stackoverflow.com/questions/2021771?…

java maven-2 junit4 junit3
JUnit Test "Times Out" Despite Executing Quickly?

I've got a couple of test cases that JUnit is telling me time out in 10000ms when the whole test …

java junit junit4 maven-surefire-plugin
Running JUnit test classes from another JUnit test class

I have two classes that I am testing (let's call them ClassA and ClassB). Each has its own JUnit test …

unit-testing junit junit4 test-suite
Running JUnit4 Test classes in specified order

I've written a number of tests, divided not only into separate classes but, depending on what area of my application …

java unit-testing junit junit4 java-6