Skip to main content

All Questions

Tagged with
-1 votes
0 answers
503 views

Test cases failing and getting NoClassDefFound Could not initialize class XXX after upgrading Maven to 3.9.6 version

Test class `@BeforeEach public void initResource() { serviceLocator = mock(ServiceLocator.class); service = mock(Service.class); resource = new MappedDefaults(serviceLocator, service); ...
Priya Jain's user avatar
0 votes
0 answers
27 views

Maven surefire overwrites the logs for flaky tests on rerunFailingTestsCount

I'm using maven-surefire-plugin to rerunFailingTests for the failing tests. If the test fails in first attempt and pass on the later attempts, the logs(*.txt, *-output.txt) from the /target/surefire-...
KGP's user avatar
  • 350
0 votes
2 answers
80 views

Running a Single Parameterized Test with Maven in JUnit 4

I'm trying to run a specific parameterized test method (xyzIT#testTaskRestarts) from a JUnit 4 test class using the Maven Surefire Plugin, but I'm encountering issues. With the base command being set ...
Sangeet's user avatar
  • 1,026
2 votes
1 answer
84 views

Cannot run explicitly tagged test only in Kotest

I have a spring boot project which uses kotlin version 1.7.0. My pom looks something like below. <properties> <kotlin.version>1.7.0</kotlin.version> ... </<...
Risalat Zaman's user avatar
0 votes
0 answers
19 views

Maven Surfire plugin duplicates retried tests in Test-*.xml

In the current project, skipped and failed tests are retried twice. A test is removed from the test results if it was skipped or failed the first time to avoid duplication. public void onFinish(...
Yaryna's user avatar
  • 370
1 vote
2 answers
43 views

Run JUnit tests from multiple projects at once

I have a repository of projects, each containing JUnit tests. I am looking for either a method or a framework to run them all at once, instead of manually running for each project. After some research ...
Arseni's user avatar
  • 11
1 vote
0 answers
51 views

Tests execution order: JUnit 5 vs Maven Surefire Plugin documentation

I know that tests should not rely on the order in which they are executed but sometimes bad things happen. I have just fixed a Maven project whose tests were passing when executed by Jenkins but not ...
Pino's user avatar
  • 9,073
0 votes
1 answer
16 views

Tests on a remote driver are not executed

Using selenium IDE I have created a series of tests that end successfully. Then I export as junit. After moving the file to its location in a maven project src/test/java I try to run the test ./mvnw ...
Mario's user avatar
  • 4,932
0 votes
1 answer
63 views

Mockito fails to inject when JUnit tests are run by maven

I need to run JUnit tests on my application and I'm using Mockito to mock some objects that aren't relevant to the test but are required for one reason or another. When I run tests using IntelliJ's ...
Supetorus's user avatar
0 votes
0 answers
33 views

Getting Coverage on TestClasses With Jacoco

I am trying to get coverage on Hadoop Test Classes to see what's going on with the tests. Specifically, I want to use code coverage to determine which tests within HDFS native test classes are ...
marsh_adams's user avatar
0 votes
0 answers
24 views

OSGi Service ClassCastException with JUnit and Maven Surefire

In the demo-api-interface module, I have an interface called DemoInterfacePrinter: public interface DemoInterfacePrinter { void printVersion(); } In the demo-api module, I have the actual ...
Alen Wang's user avatar
2 votes
1 answer
73 views

Create uber file from Maven Surefire configuration

The current stack is Maven with modules per domain. The main module imports the others. And have a basic spring application on src and a testNG/cucumber/springboot runner on test. I run that test ...
Paulo Oliveira's user avatar
0 votes
2 answers
293 views

NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors() when running Spock Spring Boot unit tests

Context I have a unit test written using the Spock Testing framework to test my Spring Boot application. I've declared the following test dependencies: spock-spring: 2.3-groovy-4.0 spring-boot-...
roj's user avatar
  • 1,343
0 votes
0 answers
53 views

SpringBoot configuration

I'm trying to run the following code using JUnit test (Run As -> JUnit Test). I'm using Maven for dependency management, so I would have and understand that it's a configuration issue. I've seen ...
Jaime Camacho's user avatar
0 votes
1 answer
118 views

Junit listener is not triggered when running tests with maven command

I've run into the following issue, I have Rest Assured API Tests that use JUNIT Testign framework, I have added a TestExecutionListener that should print details about executed tests. however when I ...
Vladyslav Tolosiuk's user avatar

15 30 50 per page
1
2 3 4 5
129