1

I have created a maven project in eclipse with the below 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.omniture.selenium</groupId>
<artifactId>Omniture</artifactId>
<version>0.0.1-SNAPSHOT</version>

<dependencies>

    <dependency>
        <groupId>org.jbehave.web</groupId>
        <artifactId>jbehave-web-selenium</artifactId>
        <version>3.5.5</version>
    </dependency>

    <dependency>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-core</artifactId>
        <version>3.8</version>
    </dependency>

    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>2.0.11</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>2.0.11</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>2.0.11</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-archiver</artifactId>
        <version>1.2</version>
    </dependency>

</dependencies>

I wanted to run the JUnit test case through command line. Here is the path for junit test case:

/Users/support/Documents/Omniture/src/test/java/com/testOmnitureSelenium
user2649233
  • 912
  • 4
  • 14
  • 28

1 Answers1

0
mvn test -Dtest=<testclass>

If you want to run a given test class, The above will do it for you. However, as noted, maven will run tests automatically, when you invoke the package goal, rendering the command above to the dark corners of wizards, where mortals need not tread.

hd1
  • 33,938
  • 5
  • 80
  • 91