Upgrading Cucumber from 4.2.5 to Latest (7.x)
Hi there, We have inherited an old test automation framework that is using Cucumber 4.2.5, based on Java 1.8 and uses Maven 3.2. We don't have the option to wholesale start over, but we should at least be able to upgrade the version of Cucumber to latest. By going into the POM, and just changing the version, we lose the cucumber.api package, and start receiving the error package cucumber.api.java.en does not exist for things that should be built-in, such as the Scenario Java class. Other than changing the value for the cucumber.version, is there something else that is missing that I'd need to do get this working again with the latest version? Here is the relevant part of the pom.xml <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.failsafe.plugin.version>2.22.2</maven.failsafe.plugin.version> <maven.build.helper.plugin.version>3.0.0</maven.build.helper.plugin.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <thread.count>1 </thread.count> <!-- default value if no profile specified. Use profiles for parallel execution --> <cucumber.version>4.2.5</cucumber.version> <cucable-plugin.version>1.4.0</cucable-plugin.version> <maven.compiler.plugin.version>3.7.0</maven.compiler.plugin.version> <generated.runner.directory>${project.build.directory}/parallel/runners</generated.runner.directory> <generated.feature.directory>${project.build.directory}/parallel/features</generated.feature.directory> <runner.numberOfTestRuns>1</runner.numberOfTestRuns> <include.mandatory.tags>@BeforeAll,@AfterAll</include.mandatory.tags> </properties> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>7.5</version> </dependency> <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> <version>2.0.24</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency> <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-java8</artifactId> <version>${cucumber.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-testng</artifactId> <version>${cucumber.version}</version> </dependency> <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-picocontainer</artifactId> <version>${cucumber.version}</version> </dependency> <dependency> <groupId>net.lightbody.bmp</groupId> <artifactId>browsermob-core</artifactId> <version>2.1.5</version> </dependency>3.1KViews1like1CommentHow can I make the annotation @ParemeterType use a list?
Hello! As I am continuing my Cucumber 7.0.0 uplift journey I have stumbled upon some issues. The old way on how to handle parameter types is deprecated so now the annotations@ParameterType and@DataTableType are used instead. My problem is that we are using many enums (I cannot show you how the real code looks like since I signed an NDA) and before they were looped through in an Array stream. To make it work now I have to hardcode the enums in the value field like this: @ParameterType(name = "animal_type", value "(CAT|HORSE|DOG|DONKEY|PIG)") public Animal defineAnimalType(final String animalType) { return Animal.fromString(animalType); } And this is not an optimal solution because if the enums needs to be changed in the future people need to look up the hardcoded strings and change there as well. I read about something called@DefaultParameterTransformer and I wonder if that can be an option. Does anyone have a suggestion or solution for this problem? I would really appreciate it! Best Regards Lisa Marie1.5KViews0likes1CommentCucumber-JVM Customized Retry Mechanism
Hi all, I have a Cucumber-JVM project in which I am testing a mobile application. I want to implement the retry mechanism for my project so that when a scenario fails, it will retry to run again. But at the same time, I do not want all the scenarios to have this retry mechanism. How can I implement the retry mechanism only for some scenarios?41Views0likes0CommentsOverriding mouse cursor focus running Cucumber tests for a desktop application
Hi - I would bevery grateful for some help, advice or even random ideas! We have a very large desktop application which runs overnight cucumber test suites (well over 1000 scenarios with multiple support lines which really do take all night!) on dedicated build agents/servers. For development work we all had our own Windows VMs which meant that we could kick off cuke tests we were writing/developing and continue multi-tasking on our laptops/linux VMs whilst the UI test did all it had to do - selecting/adding values, clicking buttons and checking outputs etc. In a couple of months that is all going to change and we will no longer have dedicated Windows VM for development which means we will have to run any tests (new or changed) locally on our laptops and therefore any attempt at trying to write an email, respond to a Teams message etc. will cause the cuke test to fail and so productivity will become very poor whilst we just watch our screens without moving our mouse. As this is a desktop application we can not set the ChromeDriver settings to be headless. We have separate performance testing so are not worried too much about timings - we just need a solution ... Has anyone else overcome this problem or does anyone know if there is a way to possibly have : 2 mouse inputs, one dedicated just to carry out the cuke test instructions and then main one to carry on working somehow running the cuke test in some kind of isolated environment but on the same machine - we use docker for db containers etc. but that won't work for localised development Any thoughts would be much appreciated.33Views0likes1CommentCucumber-Java question.
Hello, We are using cucumber(with java) in our project for the automation(with mvn). I have a case where I need to execute one feature file, say feature_fil1 in the beginning of the suite. Since all our features files are running in parallel(we are using the parallel execution), I can trigger this file only from the pom.xml. How can I invoke a feature file directly from pom.xml and then I would like to invoke other feature files(with the parallel execution). I would appreciate any help on this. Thanks.26Views0likes0CommentsCompatibility Issues
Hello , I just wanted to know the compatility versions of Node JS and Cucumber JS. Currently I have nodeJS version v16.20.2 and cucumberJS version as 10.0.0, it is saying that,"Cucumber can only run on Node.js versions 18 || >=20". Can anyone tell, which version of cucumberJS should I use with NodeJSv16.20.2? Regards, Siva415Views0likes0CommentsIn this quick tutorial you will learn how to (10 Minute Tutorial)
Hello! I am trying to create a new project as per thehttps://cucumber.io/docs/guides/10-minute-tutorial/cucumber tutorial, but I am haveing this message " Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 2082:" what number should I choose? Can anyone help please237Views0likes0CommentsIntelliJ IDEA shows execution steps in wrong test cases
Hello, Version 7.14.0 of: * cucumber-spring * cucumber-java * cucumber-junit-platform-engine 1. When running tests in parallelby JUnit5, IJ shows execution output in random test cases in a tree places which makes running it from IJ useless 2. When running Scenario Outline with examples, examples don't have replaced placeholder with actual values in test cases tree which makes it harder to find what example has actually failed (we migrated from Cucumber 4 so we are surprised examples where properly shown in earlier version, but here they are not really convininet) Does anyone managed to solve above issues?321Views0likes0CommentsCan we skip example data sets
Hi All, I need your help ASAP on this. I am having 5 sets of test data using examples keyword. Here my case is if scenario is passed with one of the data set it should exit and go to next scenario. It shouldn't execute other data sets. Please guide me if this is possible in cucumber.807Views0likes2Comments