maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Martin <bal...@gmail.com>
Subject Beginner needs help: Maven won't run my tests...
Date Sat, 16 Jul 2011 21:53:33 GMT
Hello,
I would like for Maven to run my tests when I issue the following command:
"mvn test"
However, despite the presence of a test class named "CreateJobPostingTest",
maven won't run my tests.
Can anyone please help?

Here is my test class:

public class CreateJobPostingTest {

    @Test
    public void test1() {
        String appPackage = "com.cheetah.web";
        String appName = "app";
        PageTester tester = new PageTester(appPackage, appName,
"src/main/webapp");
        Document doc = tester.renderPage("CreateJobPosting");
        Element createJobPostingForm =
doc.getElementById("createJobPostingForm");
        Map<String, String> fieldValues = new HashMap<String, String>();
        fieldValues.put("jobPostingTitle", "Développeur
java/Tapestry/Junit");
        fieldValues.put("jobPostingBody", "Poste de de développeur agile/XP
qui travaillera en TDD exclusivement");
        Document docFromForm = tester.submitForm(createJobPostingForm,
fieldValues);
        assertTrue(docFromForm.toString().contains("TDD exclusivement"));
    }

    @Ignore
    @Test
    public void test2() {

    }
}

Here is my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.cheetah</groupId>
    <artifactId>cheetah-web</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>cheetah-web</name>

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.tml</include>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>com.cheetah</groupId>
            <artifactId>cheetah-domain</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.cheetah</groupId>
            <artifactId>cheetah-service</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-core</artifactId>
            <version>5.2.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-beanvalidator</artifactId>
            <version>5.2.6</version>
        </dependency>
             <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-spring</artifactId>
            <version>5.2.6</version>
        </dependency>
          <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-test</artifactId>
            <version>5.2.6</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message