I want to try a sample application with cucumber testing,cucumber testing can be done with only ruby or also can be done with java? please help me with a sample example.
thank you.
I want to try a sample application with cucumber testing,cucumber testing can be done with only ruby or also can be done with java? please help me with a sample example.
thank you.
This one is from Cucumber-jvm project https://github.com/cucumber/cucumber-jvm/tree/master/examples. Cucumber-JVM is a Java port of cucumber. Configuration info could be found on project page https://github.com/cucumber/cucumber-jvm.
I'm kind of late to this question but I think It worth a clearer answer after a long time this question was asked because there are lots of good resources to get start with cucumber right now. The best place to get start with cucumber in 10 minutes is the following link:
https://cucumber.io/docs/guides/10-minute-tutorial/
And as mentioned in the link you can create sample project with maven archetype:
To get started, clone the java-skeleton project from the Cucumber team: https://github.com/cucumber/cucumber-java-skeleton
This is specifically intended as a getting started project, and should work out of the box. Once you have a working project, it is much easier to extend it to contain the things you need. You can build the project using Maven with:
If you'd prefer to start from scratch, check the pom.xml for the dependencies you need (at least cucumber-java, probably also cucumber-junit and junit itself to run your tests).
Create a src/test/java folder where you will implement your step definitions Create a src/test/resources folder where you will create your .feature files
If you are using an IDE (like IntelliJ) there's probably a Cucumber plugin that you need.
You need ListItTest.java to test a particular integration test, then you need a feature file, defination file and a sample response json file.
ListItTest.java
member-password.feature
member-password.json
MemberPasswordDef.java
You can check out a simple example we wrote at our place to demonstrate cucumber-jvm : https://github.com/gphilipp/mowitnow-tdd