Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Generate Kotlin step defs #1520

Closed
mlvandijk opened this issue Dec 31, 2018 · 8 comments
Closed

Feature request: Generate Kotlin step defs #1520

mlvandijk opened this issue Dec 31, 2018 · 8 comments
Labels
⚡ enhancement Request for new functionality
Milestone

Comments

@mlvandijk
Copy link
Member

Summary

Would like to have the option to generate snippets in Kotlin instead of Java.

Expected Behavior

Generate snippets in Kotlin, instead of Java

Current Behavior

Generates snippets in Java (annotation style or lamdba) only

Possible Solution

Add Kotlin snippets

Steps to Reproduce (for bugs)

Context & Motivation

Being able to generate Kotlin snippets would simplify development.
It would also make it easier for people to get started with Cucumber in Kotlin.
(Finally, it would simplify the tutorial in the docs, but that's a sidenote ;))

Your Environment

N/A

  • Version used:
  • Operating System and version:
  • Link to your project:
@mlvandijk mlvandijk added ⚡ enhancement Request for new functionality Snippets labels Dec 31, 2018
@mpkorstanje
Copy link
Contributor

This is probably best done by implementing a backend for Kotlin. This will be easier to do after I've merged develop-v5 into master.

@bodiam
Copy link

bodiam commented Mar 12, 2019

Hi @mpkorstanje , I might be able to help on this. What exactly do you mean with 'implementing a backend for Kotlin' ?

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Mar 12, 2019

Cucumber can be used with several JVM languages. Each language has a module responsible for discovering step definitions and creating the test context (the world). This module is called a backend.

On the develop-v5 branch you can find a really clear example of how this is supposed to work for Java 8 in the Java8Backend. The maven module also contains the code that generates the step definition interfaces and everything else.

For the current master you can find the same information in the java module but bear in mind that it hasn't been refactored yet and is burdened with several pragmatic solutions.

@bodiam
Copy link

bodiam commented Mar 12, 2019

Thanks for that! That looks pretty straightforward. Our project uses Cucumber and Kotlin a lot, so this would be a nice feature to have. Let me get back to you on this.

@mpkorstanje mpkorstanje modified the milestones: 5.0.0, 5.x.x Apr 15, 2019
@mpkorstanje
Copy link
Contributor

@bodiam you mentioned you'd get back to me on this. Any news?

@bodiam
Copy link

bodiam commented Sep 22, 2019 via email

@mpkorstanje
Copy link
Contributor

Cheers. No problem. Any one else feel free to pick this up if you're interested.

@mpkorstanje
Copy link
Contributor

Continued in #1829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants