Skip to main content

All Questions

Tagged with
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
289 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
52 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
0 answers
59 views

How do I run JUnit tests using Maven via console?

I'm doing the https://spring.academy/courses/spring-framework-essentials/lessons/spring-essentials-aop-lab-demo and struggled with the console output until I ran it inside the Spring Tool Suite 4 and ...
floriank's user avatar
  • 25.6k
0 votes
0 answers
32 views

How to fix: Java.lang.NoSuchMethodError:org.mockito.MockitoAnnotations.openMocks(Ljava/lang/Object;)Ljava/lang/AutoCloseable

I have updated Maven from 4.0.0-alpha-3 to 4.0.0-alpha-12. Build is failing with the following error: Java.lang.NoSuchMethodError: org.mockito.MockitoAnnotations.openMocks(Ljava/lang/Object;)Ljava/...
Deepika M's user avatar
1 vote
1 answer
128 views

Error while trying to return a list of objects from a rest api

``I am trying to learn spring boot and trying to send a list of course object from my api endpoint. But in the test case for retrieving a list of course object I am getting following error: org....
Destravna's user avatar
0 votes
0 answers
132 views

java: package org.junit.jupiter.api does not exist and java: package org.springframework.boot.test.context does not exist errors in spring

I get these two errors java: package org.junit.jupiter.api does not exist and java: package org.springframework.boot.test.context does not exist When I try to run my Spring project. This project ...
Catalin Coman's user avatar
0 votes
2 answers
903 views

org.camunda.bpm.engine.RuntimeService bean not found after upgrading to java 17

After I upgraded to java 17 I am getting error in my service: @Service public class CallbackHandlerService { public static final long DEFAULT_TIMEOUT_SECONDS = 30; private static final ...
Shubham Shekhar's user avatar
1 vote
1 answer
140 views

How to solve Maven clean install errors?

The problem is the tests are running without any problem when only the tests are run. However, when I execute Maven clean install then the tests are failing and the below stack trace is generated. I ...
Jeet_dev's user avatar
0 votes
1 answer
47 views

Maven Module for common Unit Test with Cyclic Reference

A simple tree of the project. project: ├── pom.xml │ ├── project-algo-common │ ├── pom.xml │ └── src.main.java │ └── com.company.project │ ├───...
Paul Marcelin Bejan's user avatar
1 vote
1 answer
482 views

How do I exclude certain junit tests when running 'mvn test'

I've got this JUnit Test @Suite @IncludeEngines("cucumber") @SelectClasspathResource("/features") @SelectClasspathResource("/generated") class NightlyTest { } When I ...
LegionDev's user avatar
  • 1,461
0 votes
0 answers
381 views

Junit tests run locally (commandline+maven) but not on jenkins; Failed to load ApplicationContext IllegalArgumentException: InputStream cannot be null

I am working on an app and in parallel we set up the ci/cd environment. The app has 3 basic junit tests at the moment. coordinates: java 17, spring boot2, h2 db, saml, vaadin, maven 3.9.1, jenkins was ...
supernicky's user avatar
1 vote
1 answer
360 views

Why is my CountDownLatch behaving differently in test run via docker build?

I have created 2 separate microservices that communicate using Apache Kafka. One is called Producer, the other is called Consumer. Both microservices have their own tests that pass no matter how I run ...
VojtechCLV's user avatar
0 votes
1 answer
456 views

The output is showing error when I convert xml into java object using JAXBException

In src/main/java, I have POJO classes and in src/test/resource I have XML file. I'm writing a Junit test case where I have to parse the XML file into POJOs using JAXBException and then I have to check ...
SGP's user avatar
  • 19
0 votes
0 answers
53 views

A strange error occurs when running mvn test on a UNIX server

The development environment is Unix, Java 11, Spring Boot 2.6.9, Maven 3.8.6 I use Unix server, I try 'mvn test' command in springboot project, the following error occurred when conducting the test ...
koreanDev's user avatar

15 30 50 per page
1
2 3 4 5 6