junit
Best way of logging exceptions when tests fail (e.g. using a junit rule)
When I\'m running a complete test suite, it would be helpful if exceptions that caused a test to fail would appear in my (SLF4J-)log. What is the best method to achieve this?[详细]
2023-04-06 06:21 分类:问答ant compiling error for junit testcase in other source folder with similar package structure
<target name=\"compile.src\" depends=\"init\" description=\"compile the source code \" > <javac srcdir=\"${src}\" destdir=\"${build}/src\">[详细]
2023-04-06 05:57 分类:问答how do you provide deep mock objects?
I don\'t think I understand testing as well a should. I have written a lot of tests and gotten decent coverage but I cann开发者_如何学JAVAot help feeling it has not been intuitive.[详细]
2023-04-06 05:44 分类:问答SpringJUnit4ClassRunner does not close the Application Context at the end of JUnit test case
I\'m using SpringJUnit4ClassRunner in my JUnit 4 tests like this: @RunWith(SpringJUnit4ClassRunner.class)[详细]
2023-04-06 04:22 分类:问答Use junit to test reading from text and binary files and writing to text and binary files
I wrote a Course class that has constructors that read from text and binary files and has methods to write to text and binary files. How do I write a junit test to test this class?[详细]
2023-04-05 17:17 分类:问答What is the workflow for using Selenium in Java?
I\'m really confused by the Selenium web site. At first they go to great lengths to explain Selenium IDE, but it outputs HTML test cases. But when you go to the Java documentation, it uses WebDriver w[详细]
2023-04-05 16:54 分类:问答Ant task to perform only JUnit tests doesn't run tests
I\'m trying to make an ant target that only runs the JUnit tests on a project without any other prior actions (no depends).I\'m using Emma to instrument these in another target, and then I have anothe[详细]
2023-04-05 15:20 分类:问答Junit assertions
From a Table, I get list of String\'s and would like to check that when val!= \"A\" , a string \"x\" exist in the list of table :[详细]
2023-04-05 14:29 分类:问答Spring: Trouble wiring up a datasource in a Junit test
I\'m using Spring 3.1.0.M2.I\'m writing some JUnit 4 tests to test some database functionality, but I\'m having trouble wiring up my datasource.In my JUnit class, I have …[详细]
2023-04-05 11:25 分类:问答Can I make Surefire perform expensive setup/teardown only once?
I have a series of unit tests that all need to talk to an Apache Zookeeper server.Obviously, if I had a library for mocking server connections (or an easy way to roll my own) 开发者_C百科that would be[详细]
2023-04-05 10:18 分类:问答