snowe
04/05/2023, 12:39 AMkotest-runner-junit5-jvm
dependency), and yet kotest is not picking up any specs. https://kotlinlang.slack.com/archives/CT0G9SD7Z/p1679224817992859
To be a bit more clear, it seems to see the spec, but then not execute it.
[INFO] Running com.sunrun.pricing.communitypricing.PrintDrlTest
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.199 s - in com.sunrun.pricing.communitypricing.PrintDrlTest
```
I’m guessing this is because I’m using testcontainers elsewhere in my project (not in kotest) and so that is pulling in junit 4? The documentation around this is quite unclear. Am I forced to use junit 4 if I have a single junit4 dependency on my classpath, even if it’s coming from kotest itself?Adam S
04/05/2023, 7:41 AMLeoColman
04/05/2023, 2:51 PMsnowe
04/05/2023, 3:55 PMsnowe
04/05/2023, 3:57 PMAdam S
04/05/2023, 3:58 PMAdam S
04/05/2023, 3:59 PMmaven-surefire-plugin
in there?snowe
04/05/2023, 3:59 PMAdam S
04/05/2023, 3:59 PMsnowe
04/05/2023, 3:59 PM<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<quarkus.log.level>INFO</quarkus.log.level>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
snowe
04/05/2023, 3:59 PMsnowe
04/05/2023, 4:00 PMAdam S
04/05/2023, 4:00 PMAdam S
04/05/2023, 4:00 PMMaven Surefire and Maven Failsafe can run JUnit 4 based tests alongside Jupiter tests as long as you configure test scoped dependencies on JUnit 4 and the JUnit Vintage TestEngine implementation similar to the following
snowe
04/05/2023, 4:01 PMAdam S
04/05/2023, 4:01 PMkotlin-test-junit5
instead of kotlin-test-junit
?Adam S
04/05/2023, 4:01 PMsnowe
04/05/2023, 4:01 PMsnowe
04/05/2023, 4:01 PMAdam S
04/05/2023, 4:02 PMsnowe
04/05/2023, 4:03 PMAdam S
04/05/2023, 4:03 PMWhile Testcontainers is tightly coupled with the JUnit 4.x rule APIhttps://www.testcontainers.org/test_framework_integration/junit_5/ I think that JUnit 4 is required for TestContainers…
snowe
04/05/2023, 4:04 PMSince this module has a dependency onto JUnit Jupiter and on Testcontainers core, which has a dependency onto JUnit 4.x, projects using this module will end up with both, JUnit Jupiter and JUnit 4.x in the test classpath.
snowe
04/05/2023, 4:04 PMsnowe
04/05/2023, 4:04 PMsnowe
04/05/2023, 4:04 PMsnowe
04/05/2023, 6:30 PMsnowe
04/05/2023, 6:30 PMsnowe
04/05/2023, 6:30 PM[INFO] Running com.sunrun.pricing.communitypricing.PrintDrlTest
[INFO] Running com.sunrun.pricing.communitypricing.PrintDrlTest
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.971 s - in com.sunrun.pricing.communitypricing.PrintDrlTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.058 s - in com.sunrun.pricing.communitypricing.PrintDrlTest
snowe
04/05/2023, 6:37 PMAdam S
04/05/2023, 6:39 PMsnowe
04/05/2023, 6:50 PMAdam S
04/05/2023, 6:51 PMsnowe
04/05/2023, 6:52 PM[INFO] Running com.sunrun.pricing.communitypricing.PrintDrlTest
SDFLKJDKKDKKDKJDFkjdflkjdflkj
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
SDFLKJDKKDKKDKJDFkjdflkjdflkj
SDFLKJDKKDKKDKJDFkjdflkjdflkj
SDFLKJDKKDKKDKJDFkjdflkjdflkj
SDFLKJDKKDKKDKJDFkjdflkjdflkj
SDFLKJDKKDKKDKJDFkjdflkjdflkj
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.24 s - in com.sunrun.pricing.communitypricing.PrintDrlTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.676 s
[INFO] Finished at: 2023-04-05T12:51:51-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project community-price: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] <http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException>
snowe
04/05/2023, 6:54 PMAdam S
04/05/2023, 6:55 PMTests run: 0
problem a lot with Adam S
04/05/2023, 6:55 PMsnowe
04/05/2023, 6:55 PM