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 to get scenario count
We need to get how many scenarios are present in feature file When we are running a specific tag Example : 1. In a feature file we have some scenarios 2. I have picked 1 scenario and started running 3. Now we need to get the scenarios count present in feature file which we are running( we will know 1 scenarios is running but we need to know total scenarios count= Running + not running one) Any help is really appreciated.1.9KViews1like0CommentsCucumber Community Newsletter #2: BDD in 30 seconds: a graphic Q&A, Meet a Cucumber user
Hi! We're happy tobring you interviews, articles, and tech challenges related to Cucumber, open source, and BDD (with a few intriguing links picked up on our forays ‘round the web). In this issue, we offer: State of the Cucumber BDD in 30 seconds: agraphic Q&A Meet a Cucumber User: Developer advocate Helen Scott talks about the joys of the open source community andher contribution to a public repo somewhere in the Arctic. Fun and useful links: 16 tech blogswritten by women, 13 suggestions to reduce fatigue, and 1 Russian winter indie sandbox game State of the Cucumber SmartBear is committed to investing in Cucumber Open Source, and we’re thrilled to announce that a full-time developer joined the team earlier this week. Please pop over to theCucumber community Slackand say hello to Aurélien Reeves (@Aurélien Reeves) - and while you’re there, why not check out some of our help and committers' channels? We’ve released two new chapters of Cucumber School - chapter 3 in JavaScript, and chapters 3 and 4 in SpecFlow. You can catch up - or sign up - athttps://school.cucumber.io/ And Cucumber.js 7.7.0 is out! Aslakwants to tell you all about it! BDD in 30 seconds Meet a Cucumber user:Helen Scott Helen Scottis a Java Developer Advocate at JetBrains. She has over 20 years’ experience in the software industry and has been a developer, technical writer, and product owner. How does Cucumber improve your life? My interaction with Cucumber began with Hacktoberfest, thanks to the wonderful help and support ofMarit van Dijk. She pointed me at the issues and helped me understand the process. I updated some documentation and fixed a couple of (front-end!) bugs. The people and community are how Cucumber improves my life. What do you enjoy most about the open source community? I've learned a lot about the process of forking, branching, and rebasing the fork, but more importantly I've met some amazing people who are passionate not only about the work they do, but giving new contributors a great experience. I've learned how willing people are to explain and help you on that journey, and seen a glimpse of the value the open source community brings to software. You don't necessarily need to use the project you're committing to - you just need to use your skills. What do you like most about your role at JetBrains? Do you have any advice for people who might be thinking about changing career paths? As a Technical Writer, I thrived on creation and communication. An internal role change to Product Owner made me realise I also loved strategic aspects, but I missed content creation and working with the whole development department. A few months into the pandemic, I decided it was time to try something new, and ended up at JetBrains as a Developer Advocate, a role I absolutely love. I learn the products and create helpful content. I love listening to how our products are used and learning more about the developer experience as a whole. I also give presentations (from my house) to the community and in turn, learn more about them and what they need. This helps me understand how best I can serve the community with the products I advocate for. If you're looking to change into a career such as developer advocacy, my advice would be to create content and see if you enjoy it. Also, engaging with the community you want to work with is important. Ultimately, believe in yourself, apply for that job even if you don't have every single thing on the job spec, and look for the things that make you happy. It's easy to forget how high the barriers to entry can be for people who are new to programming. Something that appears trivial to someone who’s been doing it a long time may cause a new programmer to stumble and give up altogether. I want to help developers have a better experience, not least because I understand how frustrating it is. OnGitHub, you show “Arctic Code Vault Contributor” as a highlight. How can someone earn this cool-sounding accolade? Apparently it's because I contributed toa public repothat’s stashed somewhere super cold in the Arctic.This JSRhas not (yet) made it into the Java specification, but my contribution is why I have the badge! Whilst badges are fun, they don't tell the whole story (case in point)! I would focus on doing what you enjoy. I'm just as happy with my little green commit squares on GitHub. Thanks, Helen! Fun and useful links 16 blogs: Edidiong Asikpo’s compilation ofgreat tech blogs written by women (and why you should read them) 13 tips: The CIO of Net Health Remote offers advice on how to sidestep work exhaustion:13 tips to reduce fatigue 1 long winter: Looking for an indie sandbox game in which you’re cooped up in a post-Soviet era apartment? No plot, no goals, but if you turn on the radio there’s original music?It’s Winter.1.4KViews1like0CommentsOption cucumber.features does not work in cucumber.properties file
My test class is: import org.junit.runner.RunWith; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions; @RunWith(Cucumber.class) @CucumberOptions(features = "src/test/java/posters/cucumber/features", glue = "posters.cucumber.support", tags = "@Chrome and not @Skip", monochrome = true) public class SingleFeatureTest { } My cucumber.properties file is: cucumber.publish.quiet=true cucumber.plugin = pretty, summary, html:target/cucumber-report/cucumber.html This works fine. Then I move the "features" and the "glue" option from the test class to the cucumber.properties file: New test class: import org.junit.runner.RunWith; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions; @RunWith(Cucumber.class) @CucumberOptions(tags = "@Chrome and not @Skip", monochrome = true) public class SingleFeatureTest { } New cucumber.properties file: cucumber.publish.quiet=true cucumber.plugin = pretty, summary, html:target/cucumber-report/cucumber.html cucumber.features = src/test/java/posters/cucumber/features cucumber.glue = posters.cucumber.support It does NOT work. I work with java SE 11 cucumber-junit 6.8.1 cucumber-java 6.8.1 cucumber-picocontainer 6.8.1 allure-cucumber6-jvm 2.13.6 I couldn't find anything in internet documentation that helped me. There are very few examples of the cucumber.properties file. On the other hand, I found the class io.cucumber.core.options.Constants and believe that I have found the possible options in the cucumber.properties. Is that right? Many thanks for your help4.9KViews1like1CommentAnnouncement: Natural for Eclipse
After a long time I wish to announce today we released a new version of Natural, a set of plugins supporting BDD which is mostly focused on Cucumber & Gherkin. If you have never heard of Natural then shame on you: it supports syntax highlighting, feature files formatting and structure outlining, step auto-completion, step matching and code hyperlinking! This is a maintenance release, necessary to update the dependencies and make it compatible with the recent Eclipse releases, from Mars up to 2020-03,but it's going to be the last release on what we now consider the old development trunk:we are now focusing on a massive rework which will bring improved language support, faster response time and (drums rolling...) support for Groovy language! We wish to invite you all to visit our project on Github and give Natural a tryand remember: we need your help to keep rolling this forward!2.5KViews1like3Comments