Closed Warren25 closed 3 months ago
It's an IDE issue - sometimes clearing the cache can help.
@wakaleo Hi John, I chose the highlighted option in the screenshot below to help clear my cache for IntelliJ IDE. I am still presented with the same issue.
Maybe raise the issue with JetBrains? Could be JVM-related? Not sure what else I can propose here - the class is present in the library, so there's not a lot more we can do on the Serenity side.
@wakaleo Thank you John for your investigation. Although this is unfortunate, is there another class from the Library that I can use similar to Ensure?
Also, may I see the import line for Ensure class? I just want to make sure I have everything correct
The Ensure class is pretty important. Maybe also check your dependencies or your version of IntelliJ - since the Ensure library is written in Kotlin that might have some effect.
@wakaleo My version of IntelliJ and pom file listed below of my dependencies that I copied from the starter cucumber project
`<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>org.example</groupId>
<artifactId>CentralDispatch</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Sample Serenity BDD project using Cucumber</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serenity.version>4.1.0</serenity.version>
<junit-vintage-engine.version>5.10.1</junit-vintage-engine.version>
<junit-platform-suite.version>1.10.1</junit-platform-suite.version>
<cucumber-junit-platform-engine.version>7.15.0</cucumber-junit-platform-engine.version>
<encoding>UTF-8</encoding>
<tags></tags>
<webdriver.base.url></webdriver.base.url>
</properties>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay-webdriver</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-ensure</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit-platform-suite.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
<version>${cucumber-junit-platform-engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit-platform-suite.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-vintage-engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-vintage-engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.10</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
<include>**/*TestSuite.java</include>
<include>**/When*.java</include>
</includes>
<systemPropertyVariables>
<webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
</systemPropertyVariables>
<parallel>classes</parallel>
<parallel>methods</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<configuration>
<tags>${tags}</tags>
<reports>single-page-html</reports>
</configuration>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-single-page-report</artifactId>
<version>${serenity.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
`
You will need at least Java 11 for Serenity 4.x
@wakaleo I am using Java 18
Adding this IntelliJ issue request that I created here for context: https://intellij-support.jetbrains.com/hc/en-us/requests/6189765
@wakaleo May I ask, what do you see here?
@wakaleo And finally, last but not least, is there a command to git clone the Serenity Cucumber project? I would really like to use the Screenplay pattern and I wanted to try to create a new project by cloning instead of manually creating
@wakaleo This issue should be closed as I confirmed that this was an IDE issue as you said
I am trying to run the sample serenity cumber project here: https://github.com/serenity-bdd/serenity-cucumber-starter.
I have ran into an issue with the SearchStepDefinitions file. Here is the screenshot. I'm running serenity-core version 4.1.0 in the pom file. I'm not sure if I need to upgrade my serenity version or the serenity-ensure dependency in the pom file. Any help would be greatly appreciated.