6686

Gradle doesn't pick up Cucumber-jvm

Question:

I am trying to run Cucumber-jvm from Gradle. However no matter what I do I cannot get the features to actually run. They are always skipped while other JUnit tests are run. My features are in src/test/resources and I have a JUnit test in src/test/java with @RunWith(Cucumber.class) and @Feature(Myfeature.feature) attributes specified. Here is my Gradle script:

repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.+' testCompile group: 'info.cukes', name: 'cucumber-junit', version: '1.0.0.RC13' testCompile group: 'info.cukes', name: 'cucumber-java', version: '1.0.0.RC13' testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version: '1.0.0.RC13' testCompile group: 'info.cukes', name: 'cucumber-core', version: '1.0.0.RC13' testCompile group: 'org.picocontainer', name: 'picocontainer', version: '2.10.2' }

If someone has an idea of what to do to fix this it would be appreciated. Cucumber-jvm documentation is non-existent.

Answer1:

I finally got this working. Should be good for everyone to understand how to use Gradle and Cucumber-jvm together. First you need RC15 to start, other builds have issues that I don't quite understand. Your testcompile section needs to look like what I have above.

Next create a test in the src/test/java/path/of/package/. I haven't tested with other languages.The test needs use the JUnit @RunWith and Cucumber-Jvm's @Feature(value="featurefile.feature") attributes.

Put your .feature file in the root of src/test/resources. For some reason Cucumber doesn't pick up files in child folders.

Hope that saves people a lot of time.

Recommend

  • maven repository proxy confusion
  • Github API update a file in PHP
  • How to make your library in Github importable to Android studio
  • Adding SSH Keys to remote servers
  • Chef recipe execution order
  • Why does NHibernate need to know the ID of an auto ID based entity before flush is called?
  • Exit Status 2 on running Grep command using Golang
  • User creation in alfresco through java
  • How to check node-mongodb-native driver version?
  • The form's view data is expected to be an instance of class My\\(…), but is a(n) array
  • Using SVN and Working on Same File
  • git pre-commit hook bypass email
  • Why am I getting an empty repo when cloning my keystone app to local repo from heroku?
  • github without local repository
  • Combine WSO2 ESB with WSO2 IS
  • Alfresco from sdk 2.2.0 to sdk3.0.1
  • Play working offline
  • How do I “upload” tags to Gerrit using repo?
  • For bitbucket, what is the difference between having a team work on a repo and having a personal rep
  • Issue with Spring Data JPA - BeanEntityManagerFactory
  • Xcode 4.5 - Can't create Branches/Trunks/Tags for SVN
  • Merging mercurial repo after lfconvert
  • Deploy Ansible project which include a docker-compose.yml
  • Checkout all files from a previous commit with a certain file name
  • chef cookbook delivery - chef server vs. artifactory + berkshelf
  • repository element
  • How can i connect openshift git repository to bitbucket
  • Retrofit: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
  • OneSignal @Override not applicable to type
  • Using UNC path as paths location in Mercurial IIS6 Server2003
  • Axis2/rampart cryptography problem with signaturePropFile
  • How to add add-on repo with ADT 15?
  • How to use GitHub for Windows 2.0 with non-GitHub repositories
  • Unique identifier for file in Git Repository
  • Install Swifter framework to Xcode
  • Are there any reasons I can't just use git to track changes to my svn checkout?
  • Git Gui for remote repository (PHP Developing)
  • Chef Mysql recipe fails
  • Liferay maven dependency could not be resolved
  • Typeahead result formatting
  • Fetching remote git branch through Python setuptools
  • primefaces on maven repos have dependency on primefaces.org
  • Running Laravel from a git repo
  • See which branch a branch was originally created from? [duplicate]
  • How to deploy a react app on cPanel?
  • Grails 3 error when packaging aplication- Could not resolve all dependencies for configuration '
  • Files missing after *git svn clone*
  • reagent/adapt-react-class fails with :optimizations :advanced
  • stripe registerElement not defined
  • What happens if I move a local Git repo that has already been pushed?
  • Checking out with an older version of SVN on server
  • Git with Visual Studio Source Control Explorer available yet?
  • cd: /path/to/my/repo: No such file or directory
  • Is there any functionality in git to check multiple git repos under a directory?
  • Netty UDP Handlers - Asynchronous?
  • Maven Dependency jar for BuildPluginManager
  • How to obtain the folder where the Pipeline Jenkinsfile is checked out (Jenkins)
  • Invalid Podfile for iOS GCM Example
  • Grails: Adding to or modifying grails plugins
  • Is it possible to build a release of a Pod from a Branch?
  • Spring 4 autowiring of generic classes works in test, doesn't work when deployed to server
  • Convert SQL Server query to Linq query
  • Easiest way to setup subversion for a website?
  • Convert string elements to class attributes (py 2.7)
  • Content Security Policy hash not recognized by Safari 11.0.3
  • How to shift a block of code left/right by one space in VSCode?
  • Spring Data Elasticsearch Parent/Child Document Repositories / Test execution error
  • convert List[Tuple2[A,B]] to Tuple2[Seq[A],Seq[B]]
  • fatal: refusing to merge unrelated histories after adding git remote
  • Fixing published branch with wrong parent branch
  • Querying a repository in Open RDF and displaying the results
  • How to exclude local maven repository when installing grape dependencies
  • gitlab, post-receive, deploy
  • Making the `nosetests` script select folder by Python version
  • How do I substitute InAppBrowser for ChildBrowser in PhoneGap 2.3.0 using Xcode?
  • Should we commit pod files to version control system (GIT or SVN)
  • What does “would be overwritten by merge” mean?
  • how to prevent gitlab ci from downloading sbt every time?
  • Relative import of a apackage in python flask application
  • Should I use AddMvc or AddMvcCore for ASP.NET Core MVC development?
  • Easiest way to install Mongodb PHP extension in Ubuntu 13.10 (saucy)?
  • How can I mirror a project hosted on launchpad on github?
  • How do I pass username and password while using Ansible Git module?
  • Can SonarQube fetch Data from a Git Repository?
  • Compare a GIT bare repo and bitbucket repo
  • How to find text in the working tree's changed lines?
  • What's the size limit per file on VSTS hosted git?
  • Mercurial: How do you undo changes?
  • HADOOP YARN - Application is added to the scheduler and is not yet activated. Skipping AM assignment
  • doctrine FindBy method with 'OR condition'?
  • Execute multiple commands on remote machine
  • Git: I want to refactor my codebase, and create new files structures and move things around. Will my
  • jekyll tag plugin works offline but not on github pages
  • Specifying flywayUrl through system property in SBT
  • Can maven treat WEB-INF\\lib the way eclipse (and m2e) does?
  • Multiple projects with same GIT master
  • Edit last pushed commit's message
  • Error message “no theme named 'sphinx-theme-okfn'” when trying to build CKAN's docs
  • git push origin master , invalid port number
  • How to install specific awscli version in conda env (running 3.6) when not found in current channels
  • Performance of Git with a web interface for very many text files? [duplicate]
  • How to convert a large gem to standalone rails app
  • Managing sys.path for multiple developers
  • publish my android aar to jcenter
  • Custom Repository Base Class + QueryDslPredicateExecutor
  • What is the difference between Repository.checkout() and Repository.checkout_head() in pygit2?
  • booleanParam in jenkins dsl
  • Xamarin Forms ListView SelectedItem Binding Issue
  • How to add DLUX to new OpenDayLight application?
  • Install conda package from Google Datalab
  • How to find if a branch is a locally tracked branch or user created local branch?
  • How to create app with credentials in OpenShift?
  • Meteor not starting due to Meteorite package (setting up an older Meteor version with Meteorite pack
  • Spring batch to upload a CSV file and insert into database
  • Is Django-Shop ready for production? [closed]
  • Setting BOT properties in AIML
  • Including QRGen in pom.xml
  • How to change default settings of sbt-thrift plugin in SBT?
  • Some help with merging legacy branch in Mercurial
  • Bazaar: how put files from different locations in one repository?
  • Downloading Android 5.1 Source
  • How to get a branch into a forked repo from the original repo in github
  • git oddity; local modified images are not used on production after deployment ( not updated )
  • Jenkins Project Artifacts and Workspace
  • Browse list of tagged releases in a repo?
  • how to get latest commit from all repositories in github [closed]
  • OpsWorks - what to include in custom cookbook
  • Concatenate path and filename
  • Heroku + Grails - missing DATABASE_URL when building app on heroku
  • Checking on empty gems cache fails using Serverspec for Docker image build testing
  • Unable to create stub with Array argument in ScalMock
  • Failure to find project in Maven repository
  • Can't connect to git repo on El Capitan with SourceTree
  • How to install Phusion Passenger 4 on Ubuntu (on apache2 or nginx)?
  • How can I push to a git-svn repo?
  • Ember-data building relationships without ids
  • TypeError: 'GitHubIterator' object does not support indexing [duplicate]
  • Password protect GitLab pages with htpasswd
  • Something that escapes me about Symfony's controllers
  • Spring boot: javassist not found
  • Horizontal scroll on text input
  • How do I use Moxy from Scala?
  • How to sync your forked repo with original Repo in Github Desktop
  • how to add walls to a famo.us physics simulation?
  • jenkins - Error cloning remote repo 'origin'
  • How to do a non-fast-forward git merge to a branch that isn't checked out?
  • How to configure a mail channel in Spring Boot?
  • Fatal Error when starting jupyter notebook
  • Git core.autocrlf line ending default setting
  • VSTS build from multiple repositories
  • Ionic 2 - ng2-chartjs2 working on browser but not in device
  • MariaDB 10.0 JSON type with symfony 4
  • Spring Data JPA How to use Kotlin nulls instead of Optional
  • Using shell_exec or exec as a different unix user?
  • Assign current user in session for tests
  • Trying to install confluent platform (kafka) 3.1.1 on aws linux using yum. Getting PYCURL ERROR 22 -
  • Move Button & View when Keyboard Appears in Swift
  • Failed to resolve: com.google.firebase:firebase-core:15.0.0
  • Installing Apache Spark using yum
  • How can you set it up so that your project automatically updates on your production server when you
  • Can Spring Boot be used with OSGi? If not, any plans to have an OSGi Spring Boot?
  • What is the difference between 'git pull' and 'git fetch'?
  • miniconda fails to install anaconda (installs anaconda custom with no packages)
  • unable to commit a file, accidentally renamed with mv
  • How to consume an octet stream from protected endpoint using vue-pdf a vuejs implementation of pdfjs
  • How to push to bitbucket using intellij
  • git practice: complete new version of an application
  • .gitignore Doesn't Seem To Work
  • Is it possible to create a multiple color (stacked) bar chart using MPAndroidChart?
  • Model from Gem is missing
  • Ecto 2.0 SQL Sandbox Error on tests
  • Dart Package Management via dart2js
  • Dart/Flutter - Flutter - Why ListView is going infinite
  • Should I exclude Aurelia scripts folder in .gitignore?
  • Jenkins Git Plugin
  • is it possible to use supports statement in if statement in chef?
  • Jenkins Job DSL - load groovy library from git repo
  • Git push local master to remote specific branch [duplicate]
  • Separate branches or git projects?
  • Heroku deploy “Precompiling assets failed” on git push
  • Xcode thinks a remote svn repos is git
  • Git - pull & push - production server
  • Azure git deploy of node project failing
  • Managing private repositories in Github
  • Transfer content from one Alfresco instance to another (same version) on another server
  • Travis configuration of phpcs for only current commit files
  • Load properties from properties file and make them available throughout the job/pipeline - Jenkins d
  • Using Subversion and SourceSafe at the same time?
  • I have one remote repository and two remote repos in two different systems
  • Dependency Injection into Spring non-managed beans
  • Maven 3.0.3 archetype creation: from multiple module project
  • Git remote branch got deleted, how to resync local changes with new branch
  • Update Gradle references to include maven local jars (libGDX & Tween Engine)
  • GitHub API: Enable Push Restrictions for branch
  • ruby-inotify example?
  • How to run a downloaded Jupyter notebook on Google Colaboratory?
  • GitPython nothing appears in working copy after pull
  • oAuth and Codeigniter with MongoDB
  • Build error for Scala Slick 2.0.0
  • Google Cloud App Engine app.yaml for multiple environments
  • GitHub API - List of Languages
  • Build a library for Swift and Objective-C
  • MvvmCross Bindable MonoTouch.Dialog RadioElement
  • git archive vs cp -R
  • springockito xsd link is broken
  • version control over visual studio formatting style
  • git installation needed on remote server which is access via ssh only
  • Connecting Team Foundation Server (TFS) with Xcode
  • How to commit with Ruby bindings for libgit2
  • How does code hosting work with a staging environment
  • How do I configure installation of plugins in Grails 3.0.4?
  • npm install private git repository with .git folder and .gitignore file
  • Weird alias [0_ added by doctrine while trying to run with SQL SERVER
  • Git strategy for a project with many independent modules
  • Symfony2 : How to force download multiple images in one zip file with Ajax
  • Maven depedency not working in primefaces?
  • Color output of specific git command
  • Can't clone repository with Rugged
  • Where is Android 4.1 (Jelly bean) source code?
  • NoSuchMethodError HttpServletRequest.getServletContext() on Servlet >3.0
  • Gradle Build stuck at generate debug sources
  • Branching/Forking just portion of parent repository
  • .gitignore not ignoring filenames with spaces in them on `git status`
  • How to specify Meteor MongoDB version on local?
  • Solr Tomcat org.apache.solr.common.SolrException: lazy loading error
  • GIT author authentication
  • How to update chef cookbooks in a developer workflow
  • get details of source repository from Jenkinsfile
  • Does tox.ini need escaping for anchors in URLs (hash #)?
  • Gluon 4.x.x artifacts not in the Nexus repo?
  • How to reduce size of git repository after accidental push of large file size?
  • Pictures not showing up in site hosted by GitHub
  • Node.js memory consumption OS X vs Linux
  • gradle.buildStarted not triggered
  • Git setup on mac (ERROR: “-bash: git: command not found”)
  • Spring Data autowire the repository interfaces directly
  • Showing all rows with SQL Pivot including those with record counts of zero
  • Substitute parenthesis for their regular expression
  • Should I have to merge and commit every time I update my Mercurial branch on the production server?
  • Adding controls in gridview dynamically
  • How send application to background when install on device?
  • Fiware - IDAS: TimeInstant attribute
  • Mysql JOIN (multiple) tables
  • C++ Gnuplot pipe input from C++ defined variables
  • Is there any API function to get the battery level in Windows Desktop Apps?
  • ModelState.IsValid is always false because of datetime.now
  • Akka and spring configuration
  • Doctrine2 and magic finders with more fields not working?
  • Moment.js plugins in Ionic2/Cordova typescript project
  • Why can't my rule solve for X in a simple algebraic equation?
  • Appium Setup - no ./reset.sh file
  • error while inflating class android.support.v7.widget.CardView
  • I have a JApplet which has to display 3 Components. (2 JPanels and 1 Paint Method)
  • how to add a library to the dependencies gradle of LIBGDX project
  • Replace data in an Excel file using macros
  • How can I commit changes that I've made in node_modules back to git?
  • Bitbucket Build Erring after triggered from Commit
  • Tips on upgrading CVS to git/hg?
  • java.util.zip.ZipException: duplicate entry: AbstractHttpContent.class
  • Am I running on an Emulator or a Device
  • Switching role between fork and parent
  • Java Play 2 - Compile error -> Heroku
  • Random white space at bottom of page but only on mobile
  • Adding dependencies to a custom gradle plugin
  • schematron report issue with python lxml
  • Bad request while trying to access Github's v4 API with graphql.js
  • DVCS, Databases, and User Generated Content?
  • Sample code to fix this particular SQL-injection hole
  • What happens when I strip one version of a mercurial repository and try to synchronize with another
  • How to configure nested dependency in ASP.NET 5 DI?
  • Changing div heights using CSS grid
  • :app:transformClassesWithMultidexlistForDebug FAILED
  • Memory Leak with OracleCommand
  • Upgrade from Eclipse Mars to Photon on Ubuntu cause problems
  • @IfProfileValue import set from env variable, test not executing
  • Calling Javascript function from a div
  • EGit and multiple “users” on same machine
  • Working with a severely limited interpreted language
  • Why do I need to force git to sync my remote repository?
  • WPF - how to best implement a panel with draggable/zoomable children?
  • JMock- java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch()
  • What does a crossed out static import in Eclipse mean? [duplicate]
  • How can I access call log history on IOS5
  • LibGit2Sharp CheckoutPaths()
  • Maven release with jenkins slave and Credentials : how to pass SCM credentials to maven?
  • sequel trying to use postgresql instead of postgres as adapters
  • Failed to resolve: com.google.gms.google-services:15.0.1:
  • Import Protobuf generated classes using Gradle in IntelliJ
  • JAX-RS Rest services stopped deploying on Eclipse Glassfish
  • Different version of file in Mercurial repo
  • webforms : add dynamically in javascript option to a dropdownlist
  • Paypal : invalid token only in DoExpressCheckoutPayment method
  • Python kernel dies when importing tensorflow 1.7
  • How do I get NHibernate to save an entity if I assign it an ID, but generate one otherwise?
  • Update recordset without updating database
  • No internet connectivity inside docker container running inside kubernetes with weave as networking
  • Google Cloud Builder - Gradle
  • Android gradle : Error No resource found that matches the given name: attr when refer to an android
  • Referencing external dependencies in GGTS by convention
  • force insert with spring data jpa
  • express.static handling root url request
  • Teradata Database 3130 Response limit exceeded?
  • How to start a Mysql server in Java programatically?
  • Numpy: How to get rid of the minima along axis=1, given the indices - in an efficient way?
  • Grails Cannot get property 'id' on null object
  • Google cloud datastore emulator init data
  • “git push” doing the same as “git fetch” from the remote
  • Laravel lmutator $this->attributes return 'Undefined index: id'
  • CSS Grid, position absolute an element in a css grid item: IMPOSSIBLE
  • integrate POCO library in android ndk
  • How to load Q library with Require.js?
  • Unable to run tests with JUnit5 Console Launcher
  • How to create a new Bundle object?
  • user data scripts fails without giving reason
  • Unzip archive in .Net CORE 1.0
  • Running jasmine tests for a component with NgZone dependency
  • how to get data attributes of dynamically generated element
  • ListItem.Attributes.Add not working
  • Unable to install Git-core+svn by MacPorts
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • How to change the font size of a single index for UISegmentedControl?
  • How to install a .deb file on a jailbroken iphone programmatically?
  • DomPDF {PAGE_NUM} not on first page
  • Linq Objects Group By & Sum
  • Javascript simulate pressing enter in input box
  • Read text file and split every line in MSBuild
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • SSO with signing and signature validation doesn't work
  • Deserializing XML into class C#
  • Importing jscolor library in angular 2
  • A cron job substitute?
  • How to include full .NET prerequisite for Wix Burn installer
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • embed rChart in Markdown
  • costura.fody for a dll that references another dll
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize