GithubHelp home page GithubHelp logo

grasshopper7 / cuke4-parameter-datatable Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 4.0 22 KB

Using Annonymous Parameter Types and Jackson Object Mapper for conversion in Cucumber 4.x

Home Page: https://grasshopper.online/340/

Java 84.91% Gherkin 15.09%
java-8 cucumber-jvm

cuke4-parameter-datatable's Introduction

Refer to this for more details - https://ghchirp.site/340/

XStream was removed from Cucumber-JVM in version 3 for various reasons. Though it reduced a lot of complexities, it removed functionality which automatically transformed a DataTable into a collection of objects or String to a object. This now requires code for each transformation to define a DataTableType or ParamterType in the TypeRegistry for these cases. This has been made easier in Cucumber-JVM 4.0.0 by using Jackson ObjectMapper for DataTables and Anonymous Parameter Types for Parameters in version 4.2.0. Refer to official announcements for version 4.0.0 and version 4.2.0.

cuke4-parameter-datatable's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

cuke4-parameter-datatable's Issues

The same with lambda expressions

Hi !

Thanks for these usefull samples.

I'm trying to convert the glue to lambda style.
But the following doesn't work:

Given("the list lecture details are", (List<Lecture> lectures) -> {
	System.out.println("");
	System.out.println(lectures);
});

The error is: cucumber.runtime.CucumberException: Can't use java.util.List in lambda step definition "the list lecture details are". Declare a DataTable argument instead and convert manually with asList/asLists/asMap/asMaps

Do you know if there is a way to make it work ?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.