I agree with Alexander that a MVCE would be useful, not only to help others help you but for you as well - your current setup looks already fairly complex and trying Geb + Cucumber + Serenity on its own would probably help by removing all of the moving parts currently exisitng in your setup and possibly affecting what you are trying to do.
On Fri, 29 Mar 2019 at 02:59, Alexander Kriegisch <[email protected]> wrote: > No need to provide us here with code under NDA. Just create an MCVE > <http://stackoverflow.com/help/mcve>reproducing your problem, something I > can build and run and then verify by myself if it does what you want or > not. I think you cannot expect anyone to dream up their own sample project > for that. I have never used your specific tool combination, so I would > appreciate something to start with. I personally use Spock + Geb + Maven, > but have never used Cucumber (because Spock already is a BDD tool) and have > never heard of Serenity before. > -- > Alexander Kriegisch > https://scrum-master.de > > > AlexB schrieb am 28.03.2019 16:04: > > Hi Alexander, > > Unfortunately I can't provide you with the full project as it's under NDA. > However, I can give some details: > > 1. I use Maven. > 2. Here is pom file for my current project (Serenity+Cucumber+RestAssured). > <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"> > <modelVersion>4.0.0</modelVersion> > <groupId>my-project-tests</groupId> > <artifactId>my-project-tests</artifactId> > <version>0.0.1-SNAPSHOT</version> > > <properties> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > <serenity.version>2.0.30</serenity.version> > <serenity.maven.version>2.0.30</serenity.maven.version> > <webdriver.driver>chrome</webdriver.driver> > </properties> > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <version>2.6</version> > <executions> > <execution> > <goals> > <goal>test-jar</goal> > </goals> > </execution> > </executions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.3</version> > <configuration> > <compilerId>groovy-eclipse-compiler</compilerId> > <compilerVersion>1.8</compilerVersion> > <source>1.8</source> > <target>1.8</target> > <verbose>false</verbose> > </configuration> > <dependencies> > <dependency> > <groupId>org.codehaus.groovy</groupId> > <artifactId>groovy-eclipse-compiler</artifactId> > <version>2.9.2-01</version> > </dependency> > <dependency> > <groupId>org.codehaus.groovy</groupId> > <artifactId>groovy-eclipse-batch</artifactId> > <version>2.4.3-01</version> > </dependency> > </dependencies> > </plugin> > <plugin> > <groupId>org.codehaus.groovy</groupId> > <artifactId>groovy-eclipse-compiler</artifactId> > <version>2.9.2-01</version> > <extensions>true</extensions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.22.1</version> > <configuration> > <testFailureIgnore>true</testFailureIgnore> > </configuration> > </plugin> > <plugin> > <artifactId>maven-failsafe-plugin</artifactId> > > <version>2.18</version> > <configuration> > <includes> > <include>**/features/*.feature</include> > > </includes> > <systemProperties> > <webdriver.driver>${webdriver.driver}</ > webdriver.driver> > </systemProperties> > </configuration> > </plugin> > <plugin> > <groupId>net.serenity-bdd.maven.plugins</groupId> > <artifactId>serenity-maven-plugin</artifactId> > <version>${serenity.maven.version}</version> > <dependencies> > <dependency> > <groupId>net.serenity-bdd</groupId> > <artifactId>serenity-core</artifactId> > <version>2.0.30</version> > </dependency> > </dependencies> > <executions> > <execution> > <id>serenity-reports</id> > <phase>post-integration-test</phase> > <goals> > <goal>aggregate</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.12</version> > <scope>test</scope> > </dependency> > <dependency> > <groupId>net.serenity-bdd</groupId> > <artifactId>serenity-core</artifactId> > <version>${serenity.version}</version> > </dependency> > <dependency> > <groupId>net.serenity-bdd</groupId> > <artifactId>serenity-junit</artifactId> > <version>${serenity.version}</version> > </dependency> > <dependency> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-simple</artifactId> > <version>1.7.25</version> > </dependency> > <dependency> > <groupId>net.serenity-bdd</groupId> > <artifactId>serenity-cucumber</artifactId> > <version>1.9.23</version> > </dependency> > <dependency> > <groupId>net.serenity-bdd</groupId> > <artifactId>serenity-rest-assured</artifactId> > <version>${serenity.version}</version> > </dependency> > <dependency> > <groupId>com.jayway.jsonpath</groupId> > <artifactId>json-path-assert</artifactId> > <version>2.2.0</version> > <scope>test</scope> > </dependency> > <!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all --> > <dependency> > <groupId>org.hamcrest</groupId> > <artifactId>hamcrest-all</artifactId> > <version>1.3</version> > <scope>test</scope> > </dependency> > </dependencies> > </project> > 3. Here is the structure of packages: > -project > ---src/test/groovy > -----com.qa.featrues > -------TestRunner.groovy > -----com.qa.features.steps > -------ApiSteps.groovy > -----com.qa.features.steps.serenity > -------ApiRequests.groovy > ---sr/test/resources > -----features > -------TestScenarios.feature > ---pom.xml > ---serenity.properties > > 4. For debug purposes I run tests in Eclipse IDE through TestRunner class > that looks like this: > package com.qa.features > > import cucumber.api.CucumberOptions; > import net.serenitybdd.cucumber.CucumberWithSerenity; > import org.junit.runner.RunWith; > > @RunWith(CucumberWithSerenity.class) > @CucumberOptions(features="src/test/resources/features") > class TestRunner { > > } > > 5. For testing purposes I run tests using command: > mvn clean verify > > Please let me know if some additional information could be helpful > > Regards, > Alex > > > On Thursday, March 28, 2019 at 3:59:37 AM UTC+2, Alexander Kriegisch > wrote: >> >> Hi Alex. >> >> How about sharing the project you have so far? Let everyone see what you >> tried and where you got stuck. You didn't even mention how you want to >> build your project. Maven? Gradle maybe? >> >> Regards >> -- >> Alexander Kriegisch >> https://scrum-master.de >> >> >> AlexB schrieb am 27.03.2019 18:42: >> >> > I'm wondering if it's possible to bundle serenity+cucumber+geb in one >> > test framework. >> > >> > At the moment I'm using Serenity+Cucumber+RestAssured for API testing. >> > And now I need to add UI tests. >> > >> > I did find some examples of Cucumber+Geb projects. I tried to add the >> > needed settings to my existing project, but it doesn't work meanwhile. >> > >> > >> > When setting up Serenity+Cucumber project I realized that it's very >> > important to use correct libraries (like not to use Cucumber libraries >> > instead of Serenity libraries). So I guess there is a risk that the >> > Cucumer+Geb example will not work for Serenity+Cucumber+Geb. >> > >> > >> > So before I spent many hours trying to set my project up using this >> > example, maybe somebody could advise: >> > >> > 1. if it's indeed possible to use the 3 frameworks together >> > >> > 2. what I must take into account (use as a dependency/etc.) to have >> > it work. >> >> -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/geb-user/01d0b639-23ed-43ba-9056-51ef3b9f1630%40googlegroups.com > <https://groups.google.com/d/msgid/geb-user/01d0b639-23ed-43ba-9056-51ef3b9f1630%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/geb-user/20190329025932.E233E44C06A5%40dd39516.kasserver.com > <https://groups.google.com/d/msgid/geb-user/20190329025932.E233E44C06A5%40dd39516.kasserver.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQS6vGw7x2Cnw3Emtb38iJQx%2BY_N6YcAmg_BJw6dgp0jtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
