'Issue while running Scala Integration Tests From Maven
I wanted a guidance on running integration tests in Scala. I have a Maven based Scala project with the following versions
java version "1.8.0_311"
Scala code runner version 2.11.12 -- Copyright 2002-2017, LAMP/EPFL
Apache Maven 3.6.3
When I build and run my code using mvn clean install, I get this error:
com.foo.bar.MyIntegrationTest *** ABORTED ***
java.lang.RuntimeException: Unable to load a Suite class that was discovered in the runpath: com.foo.bar.MyIntegrationTest
at org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:81)
at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:38)
at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:37)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
I am able run these tests via Intellij, but not by a command line. The suggestions that I have across in the community are mostly about changes in the IDE, but any suggestions on how do I address this from the Maven command line?
Thanks, Prabal
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
