I'm writing a test for a file parser class. The parse method receives a file name as parameter, and must open it in order to parse it ( duh ).
I've writen ... |
We've had an ongoing need here that I can't figure out how to address using the stock Maven 2 tools and documentation.
Some of our developers have some very long running JUnit ... |
I have a project that builds with maven2 and runs a series of JUnit test cases against the code. This has worked fine up until this point, where I now ... |
Hi
In my project, I have lot of test cases.
What command can be used to selectively run one Test suite/test case?
Please help
|
I'm having an issue getting surefire to run Junit4 tests. This same issue was reported in http://stackoverflow.com/questions/2021771?sort=newest#sort-top but the solution there was to removed the offending dependency whose transitive dependency ... |
I have following tests structure:
public class WorkerServiceTest {
public class RaiseErrorTest extends AbstractDbUnitTest{
@Test
...
|
I am running Junit tests from Maven. The ant script has
<junit failureproperty="failproperty" errorproperty="errorproperty">
...
|
|
My test code in Maven project B (which is a child of project A) has something like
String filePath = "src/main/webapp";
//do something with the filePath
The above test case runs fine when I ... |
I've recently been asked to, effectively, sell my department on unit testing. I can't tell you how excited this makes me, but I do have one concern. We're ... |
I"m trying to use Tyburn to do some BDD with JBehave and I've got a question about what Tyburn can do. Can Tyburn simulate Menu selections? Like Ive I ... |
Using junit 4.8 and the new @Category annotations, is there a way to choose a subset of categories to run with maven's surefire plugin?
For example I have:
@Test
public void a() {
}
@Category(SlowTests.class)
@Test
public void ...
|
Although I tried out all suggestions I found, I still can't get the most trivial JUnit test running. The error message basically repeats saying "junit.framework.AssertionFailedError: No tests found in project002.trivial.TestClassTest".
You may ... |
I'm trying to let maven run a single test class but I need to use an additional profile (which in fact is already created). Normally when I run:
mvn clean install -PmyProfile
"myProfile" ... |
I have Java project built with Maven2. There is used JUnit framework for testing ( and Selenium but it is irrelevant ). I would like to add screenshot ( I have ... |
I am unable to include the new jMock release as Maven dependency. Here is what I tried including:
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<version>2.6.0</version>
</dependency>
I have ... |
I use junit assumptions to decide whether to run a test or not.
Tests where the assumption fails are ignored/skipped by the junit framework.
I wonder why skipped tests are not ... |
I'm just starting to use Maven with my project. All of my production code is of course inside the main directory. As I add unit tests to my tests directory, is ... |
I have parametrized junit test that reads from several XML input files. In the code, I have it like this:
@Parameters
public static Collection<Object[]> getFiles() {
Collection<Object[]> params = new ArrayList<Object[]>();
...
|
I'm trying to fresh up my Java and also to learn how to use Maven and JUnit. Following the Maven quick start I ran the following in the console:
mvn ...
|
I'm trying to do some Junit-Test's with Maven3 but always get some initilizationError(some testclass here) when executing test which have JUnit-Annotations (all other tests run fine). When I run the tests ... |
I'm having a problem with maven behind a squid proxy server.
I have a module of my system that depends external communication with a remote webservice.
I have my maven proxy configurations under ... |
I have custom runner of JUNIT, run with annotation:
@RunWith(SomeClass.class)
When running maven goal test it does not run it.
What should be done? is it configurable?
|
I'm using Maven 3.0.3. I'm running the "mvn test" command, in which my test files are in the standard place (src/test/java). Where do I put properties files so that ... |
I have a simple program for which maven compiles it and its tests fine, but when I run mvn test it does not run any tests (under TETSTs header says There ... |
I use maven-failsafe-plugin to run my integration tests. When it fails, I see full stack trace. For each failed test case it may has about ~50 lines, most of ... |
I am trying to test a java app from Maven using JUnit.
I have the following POM (relevant section only).
<plugin>
...
|
I'm using the surefire maven plugin to run unit tests. My test class looks like this:
public class Test1 {
@org.junit.Test
public void testThatFails(){
Assert.assertTrue("false is never ...
|
I'm developing a library that contains both Clojure and Java code, using Eclipse + Maven to manage the project.
I have a good set of JUnit tests that cover the Java portion ... |
Maven 3.x.x complains about my mock "TestPacket" class that I use for another real test:
java.lang.Exception: No runnable methods
How can I avoid Maven complaining about this?
I did this for now (in TestPacket):
@Test
public ...
|
My project build succeeds when I use Java 1.5. But fail on 1.6 for some unusual reasons. I see that only my JUnit tests fail. Some genuine assertions which used to ... |
I have a test library, which reads test definitions from text files and runs tests using these definitions. Now I would like to run it with junit using maven. So, I ... |
Situation: I have a class MyController that works with some external WebServices.
public class MyController {
private String integrationWebServiceURL;
}
This class web services URL is passed during configuration controller bean ... |
I'm using Maven 3.0.3 with JUnit 4.8.1. In my JUnit test, how do I read the project.artifactId defined in my Maven pom.xml file? In my pom, I have
<project xmlns="http://maven.apache.org/POM/4.0.0" ...
|
i know how to run Junit test class:
mvn test -Dtest=classname
but when i tried to run a single unit test method as follows:
mvn test -Dtest=classname#methodname
i always get the error: that no test ... |