Questions tagged [scalatest-maven-plugin]

Maven scalatest plugin with groupId `org.scalatest`

Maven scalatest plugin with groupId org.scalatest with the source code and implementation found under https://github.com/scalatest/scalatest-maven-plugin

20 questions
4
votes
1 answer

ScalaTest error object flatspec is not a member of package org.scalatest

I have sample tests used from scalatest.org site and maven configuration again as mentioned in reference documents on scalatest.org, but whenever I run mvn clean install it throws the compile time error for scala test(s). Sharing the pom.xml…
4
votes
1 answer

Unable to suppress excessive logs from scalatest-maven-plugin

Background I am facing excessive logging from default Logger when I run scala tests from maven because it is not picking up the logback.xml on the classpath with the correct logging definitions So my maven config is fairly generic (as per…
maximus
  • 41
  • 3
2
votes
1 answer

scalatest run integration test separately from unit test

I am using scalatest maven plugin and I would like to run integration test separately from unit tests. The tests path are src/it and src/test for integration test and unit test respectively. Which is the best approach to achieve this goal? Thanks
2
votes
2 answers

Maven not discovering ScalaTest unit tests

I have the following unit tests: import org.scalatest.FunSpec import org.scalatest.Matchers._ class MyClassSpec extends FunSpec { describe("MyClass"){ describe("Scenario 1"){ it("Condition 1") { true shouldEqual false } …
Max
  • 849
  • 9
  • 24
1
vote
1 answer

mvn test failing with SecurityException: Invalid signature file digest for Manifest main attributes (scala spark project)

mvn test failing with [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ project-name --- [INFO] [INFO] --- scalatest-maven-plugin:1.0:test (test) @ project-name --- Discovery starting. *** RUN ABORTED *** …
Imran K
  • 81
  • 1
  • 12
1
vote
0 answers

Not able to run scalatest in IntelliJ on Windows OS

i have a maven project and have installed scala. i have a test class which extents from Flatspec. IDE is showing a green arrow next to the test class and methods, but when i click on it, it shows "Nothing here". When i do file -> Invalidate…
user1447718
  • 669
  • 1
  • 11
  • 23
1
vote
0 answers

Getting the following error : java.lang.NoSuchMethodError: scala.Predef$.wrapRefArray([Ljava/lang/Object;)Lscala/collection/mutable/WrappedArray;

Getting the following error : java.lang.NoSuchMethodError:scala.Predef$.wrapRefArray([Ljava/lang/Object;)Lscala/collection/mutable/WrappedArray; I'm not sure about the nature of the error but I believe it has to do something after it tried to…
1
vote
0 answers

Is there a way to get "given", "when", "then" visible when generating XML report from scalatest?

I have a tests suite with scalatest. It includes "scenario", "given", "when" and "then". scenario("Should do something) { Given("Something") //Code When("We do something") //Code Then("something") //Code } We…
Nastasia
  • 557
  • 3
  • 22
1
vote
1 answer

Get ScalaTest to run my tests from Maven

I added this to my pom.xml, straight from the documentation: org.apache.maven.plugins maven-surefire-plugin 2.7
Christian Neverdal
  • 5,655
  • 6
  • 38
  • 93
1
vote
0 answers

Akka Test not triggered by Maven Scalatest plugin

The unit tests of my Akka & Akka Http applicaton cannot be triggered when doing "mvn test". I found a similar question on Scalatest Maven Plugin "no tests were executed" , and tried the solution mentioned there, but no luck for me. The project…
0
votes
1 answer

How to mock a static method in scala?

I have a static method in scala and by static method I mean to say that this method is inside an Object named as MyObject. I also have a class named as MyClass where there is a method which calls the method of MyObject internally. I want to write…
0
votes
1 answer

Cannot run 'mvn clean test' using scalatest

I'm learnning how to use ScalaTest. now I'm using scala 2.11.8, in JetBrains IDEA. Fisrt I wrote a simple trait traitA. package Cha1_TraitsAndMixinCompositions.Clash trait A { def hello(): String = "Hello, I am trait A!" def pass(a: Int):…
NIMENDAVID
  • 11
  • 1
0
votes
0 answers

import scalatest shows unresolved even after dumping maven dependency in intellij

I am using intellij 2018 . I have dumped scalatest libraries through build.sbt and I could see libraries in external dependencies in project. libraryDependencies += "org.scalatest" %% "scalatest" % "3.3.0-SNAP2" % Test But when I import scalatest…
Lavanya varma
  • 75
  • 1
  • 9
0
votes
1 answer

Exclude property using mvn versions:update-properties with excludesList

I'm using mvn versions:update-properties -DexcludesList=org.scalatest:scalatest* to exclude update of property scalatest.version inside pom.xml: 3.0.5 But after running the…
rok
  • 9,403
  • 17
  • 70
  • 126
0
votes
0 answers

Spark 3.0 & Scalatest incompatibility issue

I am trying to upgrade my application from Spark 2.4 to Spark 3.0. My code compiles fine but the Scala tests don’t work. I get this message:

 Exception in thread "ScalaTest-main" java.lang.NoSuchMethodError:…
DilTeam
  • 2,551
  • 9
  • 42
  • 69
1
2