Skip to main content
added 1522 characters in body
Source Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103

This is my complete pom:

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.3.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.hmhco</groupId> <artifactId>vcservice</artifactId> <version>1.0.7</version> <name>My Service</name> <description>My Service</description> <properties> <java.version>8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <exclusions> <exclusion> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite-engine</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite-engine</artifactId> <version>1.8.2</version> </dependency> </dependencies> </project> 

Thank you.

This is my complete pom:

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.3.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.hmhco</groupId> <artifactId>vcservice</artifactId> <version>1.0.7</version> <name>My Service</name> <description>My Service</description> <properties> <java.version>8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <exclusions> <exclusion> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite-engine</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite-engine</artifactId> <version>1.8.2</version> </dependency> </dependencies> </project> 

Thank you.

deleted 154 characters in body
Source Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103

Cannot resolve symbol Suite for junit.platform.suite.api when using Spring parent annotation

I'm trying to update our project from JUnit4 to JUnit5, but I get this error with the imports.

enter image description hereenter image description here

I think the issue is to do with using spring parent. If I remove that from my debug branch it'll work.

<dependency><parent>   <groupId>org.junitspringframework.jupiter<boot</groupId> <artifactId>junit <artifactId>spring-jupiter<boot-starter-parent</artifactId> <version>5 <version>2.83.2<3.RELEASE</version> <scope>test</scope> < <relativePath/dependency> > <!-- <dependency>lookup parent from repository --> <!--/parent> 

However, there may be a way to keep both?

I tried excluding the JUnit platform-suite-engine from spring test but that didn't work.

 <dependency>  <groupId>org.junitspringframework.vintage<boot</groupId>--> <!-- <artifactId>junit <artifactId>spring-vintageboot-engine<starter-test</artifactId>--> <!-- <version>5 <exclusions> <exclusion> <groupId>org.8junit.2<platform</version>-->groupId> <! <artifactId>junit-platform-suite-engine</artifactId>  <scope>test< </scope>-->exclusion>  <!--/exclusions>  </dependency>-->  <dependency>   <groupId>org.junit.platform</groupId>   <artifactId>junit-platform-suite-engine</artifactId>   <version>1.8.2</version> <scope>test</scope> </dependency> 

My tests are all inside the src/test folder and the same error happens both with and without having the sprint-test dependency also present on the pom file.

Thank you.

enter image description here

And what I see when looking for the class

enter image description here

Cannot resolve symbol Suite for junit.platform.suite.api

I'm trying to update our project from JUnit4 to JUnit5, but I get this error with the imports.

enter image description here

<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>5.8.2</version> <scope>test</scope> </dependency> <!-- <dependency>--> <!-- <groupId>org.junit.vintage</groupId>--> <!-- <artifactId>junit-vintage-engine</artifactId>--> <!-- <version>5.8.2</version>--> <!-- <scope>test</scope>--> <!-- </dependency>--> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite-engine</artifactId> <version>1.8.2</version> <scope>test</scope> </dependency> 

My tests are all inside the src/test folder and the same error happens both with and without having the sprint-test dependency also present on the pom file.

Thank you.

enter image description here

And what I see when looking for the class

enter image description here

Cannot resolve symbol Suite for junit.platform.suite.api when using Spring parent annotation

I'm trying to update our project from JUnit4 to JUnit5, but I get this error with the imports.

enter image description here

I think the issue is to do with using spring parent. If I remove that from my debug branch it'll work.

<parent>   <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-parent</artifactId>  <version>2.3.3.RELEASE</version>  <relativePath/> <!-- lookup parent from repository --> </parent> 

However, there may be a way to keep both?

I tried excluding the JUnit platform-suite-engine from spring test but that didn't work.

 <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-test</artifactId>  <exclusions> <exclusion> <groupId>org.junit.platform</groupId>  <artifactId>junit-platform-suite-engine</artifactId>   </exclusion>  </exclusions>  </dependency>  <dependency>   <groupId>org.junit.platform</groupId>   <artifactId>junit-platform-suite-engine</artifactId>   <version>1.8.2</version> </dependency> 
deleted 154 characters in body
Source Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103

I'm trying to update our project from JUnit4 to JUnit5, but I get this error with the imports.

enter image description here

<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>5.8.2</version> <scope>test</scope> </dependency> <!-- <dependency>--> <!-- <groupId>org.junit.vintage</groupId>--> <!-- <artifactId>junit-vintage-engine</artifactId>--> <!-- <version>5.8.2</version>--> <!-- <scope>test</scope>--> <!-- </dependency>--> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite<suite-engine</artifactId> <version>1.8.2</version> <scope>test</scope> </dependency> 

My tests are all inside the src/test folder and the same error happens both with and without having the sprint-test dependency also present on the pom file.

Thank you.

PS: The only Suite class that appears for me is the SuiteDisplayName one.

enter image description here

Update

This is what I have now

enter image description here

And what I see when looking for the class

enter image description here

I'm trying to update our project from JUnit4 to JUnit5, but I get this error with the imports.

enter image description here

<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>5.8.2</version> <scope>test</scope> </dependency> <!-- <dependency>--> <!-- <groupId>org.junit.vintage</groupId>--> <!-- <artifactId>junit-vintage-engine</artifactId>--> <!-- <version>5.8.2</version>--> <!-- <scope>test</scope>--> <!-- </dependency>--> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite</artifactId> <version>1.8.2</version> <scope>test</scope> </dependency> 

My tests are all inside the src/test folder and the same error happens both with and without having the sprint-test dependency also present on the pom file.

Thank you.

PS: The only Suite class that appears for me is the SuiteDisplayName one.

enter image description here

Update

This is what I have now

enter image description here

And what I see when looking for the class

enter image description here

I'm trying to update our project from JUnit4 to JUnit5, but I get this error with the imports.

enter image description here

<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>5.8.2</version> <scope>test</scope> </dependency> <!-- <dependency>--> <!-- <groupId>org.junit.vintage</groupId>--> <!-- <artifactId>junit-vintage-engine</artifactId>--> <!-- <version>5.8.2</version>--> <!-- <scope>test</scope>--> <!-- </dependency>--> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-suite-engine</artifactId> <version>1.8.2</version> <scope>test</scope> </dependency> 

My tests are all inside the src/test folder and the same error happens both with and without having the sprint-test dependency also present on the pom file.

Thank you.

enter image description here

And what I see when looking for the class

enter image description here

added 260 characters in body
Source Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103
Loading
edited tags
Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103
Loading
added 164 characters in body
Source Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103
Loading
Source Link
Francislainy Campos
  • 4.2k
  • 6
  • 55
  • 103
Loading