How 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.4KViews0likes1CommentCucumber-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?24Views0likes0CommentsOverriding 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.19Views0likes1CommentCucumber-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.22Views0likes0CommentsCompatibility 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, Siva365Views0likes0CommentsIn 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 please236Views0likes0CommentsIntelliJ 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?317Views0likes0CommentsCan 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.712Views0likes2CommentsJava - execution order between Junit tags and Cucumber hook tags - which ones go first?
Hello, is there any conjunction between Junit tags and Cucumber hook tags execution order ? I have a project with Cucumber feature file, step definition file and page object model. In feature file I want use tag@pageOneand@pageTwo then in Cucumber hook class I have: public static List<String> list; @Before(@pageOne) public void beforeOne (Scenario scenario) { list = scenario.getSourceTagsNames().stream().collect(Collectors.toList()); } @Before(@pageTwo) public void beforeOne (Scenario scenario) { list = scenario.getSourceTagsNames().stream().collect(Collectors.toList()); } Then in other class I have @Before Junit annotation. @Before public void setUpProperties() { Properties properties = new Properties(); properties.load(new FileInputStream(appConfigPath)); if (list.contains(@pageOne)) { String url = properties.getProperty("pageOne"); } if (list.contains(@pageTwo)) { String url = properties.getProperty("pageTwo"); } So I have to run @Before cucumber tag earlier than Junit @before tag because I have to pass ivalue from cucumber before method to junit before method. Is this possible to set annotation tags order ? I want to run cuumber tag earlier than junit tag. Thank you421Views0likes0Comments