SpringBoot 2.5.2 and unit tests - junit4

My unit tests work inside Eclipse (Run with Junit Test) when my pom.xml is setup to use SpringBoot 2.3.12.RELEASE. When I try to use 2.5.2 they fail like this:
java.lang.NoSuchMethodError: org.springframework.test.context.TestContext.computeAttribute
They work when you do a Maven build inside or outside Eclipse.
Anybody else having these kind of issues?

Oh boy! It the things you overlook that get you. I had some project dependencies to other projects on my Eclipse project that I had not upgraded yet. As soon as I upgraded everything, all my unit tests started to run. My apologies.
Bob

Related

IntelliJ Unit Tests throw scalac: Output directory not specified

I am running into a weird error with my IntelliJ setup for Scala. When I try to run any Unit Test for my project, I get the below error.
scalac: Output directory not specified for ...
From Maven, I am able to successfully run the tests. No issues there.
To ensure my Scala setup is correct, I created a simple HelloWorld scala project and I am able to successfully add a unit test and run it from IntelliJ.
I am running into this error only for my project repo that I downloaded from Git. Any suggestions on how I can identify what I am missing in the setup?
Things I tried so far:
I ensured that my Java and Maven version in IntelliJ matches what I have on my Mac
I tried deleting the .idea folder, "invalidate caches and restart". No luck after any of these.
➜ ~ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/syncmaster/.asdf/installs/maven/3.6.3
Java version: 11.0.14.1, vendor: Azul Systems, Inc., runtime: /Users/syncmaster/.asdf/installs/java/zulu-11.54.25/zulu-11.jdk/Contents/Home

Scala unit-tests in IntelliJ fail with java.lang.NoClassDefFoundError scoverage/Invoker$

Tests run without any problem in sbt, but when you need them in IntelliJ, they fail.
A needed class was not found. This could be due to an error in your runpath.
Missing class: scoverage/Invoker$
java.lang.NoClassDefFoundError: scoverage/Invoker$
I have seen many suggesting during the years how to fix it, but nothing really helped. :)
Finally discovered a solution, which worked for me:
Temporarely disable scoverage plugin for sbt project(s) in questions
lazy val pipeline: Project = project
...
.disablePlugins(ScoverageSbtPlugin) // <-- temp
Bonus: tests are running faster as well.
Just perform a rebuild (Build -> Rebuild Project).
Intellij is probably storing some temporary/cached files and rebuilding clears them.

How to run ScalaTests with Intellij in a Mill Project

I have a Scala Project building with Mill.
My ScalaModule is e2e.
Running my tests work on the console, like:
mill e2e.test
However running it as an Intellij ScalaTest it does not pick up my application.conf
The configuration looks fine - it says Use classpath of module: e2e.test
Do I miss something or is not possible yet with Intellij?
Strangely I could fix this by moving resources folder from test to e2e and back again.
So it seems there was some inconsistency in my Intellij project.

Why do Grails 3 unit tests throw StackOverflowError when run in GGTS (Eclipse)?

Whenever I try to run any unit test in GGTS even as simple as:
void "Test"() {
expect:
true
}
I get StackOverflowError. I wonder if it has something to do with GrailsUnitTestMixin.
I've imported my Grails 3 project as a Gradle project in my IDE.
This is an issue with Grails 3.0.4/3.0.5. The fix will come with 3.0.6 release, which haven't been released yet at the time of writing.
In the meantime, anyone having problems with this can downgrade to 3.0.2 or 3.0.3, although 3.0.3 also has a bit of issue running unit tests in Eclipse, only not as critical as StackOverflowError. I suggest using 3.0.2 for now, though.

Intellij IDEA 13: Error compiling sbt component

I have a Maven Scala project created with archetype:
archetypeGroupId=org.scala-tools.archetypes
archetypeArtifactId=scala-archetype-simple
version=1.3
I'm getting this when trying to run a simple main method:
Error compiling sbt component 'compiler-interface-2.8.0.final-51.0'
The Maven build works fine though... I'm new to Scala so this is probably some simple problem.
The good people over at JetBrains had a solution:
Looks like this plugin is quite old and generates pom with an old
scala version. Try 2.10.0
Meant to post this sooner but I forgot about this question.