So, I have a simple ScalaTest test.
The code below runs fine in IntelliJ. It updates fine with Maven.
I want however to be able to run this from command line.
Is there a way to run it from command line without TestNG or JUnit?
I am too new to Maven and ScalaTest to dig in deep on this one unfortunately.
I was thinking something like.
mvn scalatest:run -Dtest=ExampleTest
or
mvn -Dtest=ExampleTest test
This is what I have so far from my internet perusing.
------------------------------------------------------------------------------------------------------
class ExampleTest extends FunSuite {
test("Example Simple Test") {
assert(1 === 1)
}
}
-------------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>artifact</artifactId>
<version>1.0</version>
<repositories>
<repository>
<id>Scala-Tools</id>
<name>Scala-Tools</name>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.10</artifactId>
<version>2.0.M5b</version>
</dependency>
<dependency>
<artifactId>scalaStack</artifactId>
<version>1.0.4</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/test/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0-M2</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<filereports>WDF TestSuite.txt</filereports>
</configuration>
</plugin>
</plugins>
</build>