Configure Cucumber in Eclips
After installing cucumber in Eclips, we have to configure cucumber to create feature files. First of all, we have to download all the required jar files which are necessary to enable the cucumber works. Those downloaded jar files are saved in a folder and keep it aside. Those files are
- cucumber-core-1.1.5
- cucumber-html-0.2.3
- cucumber-java-1.1.5
- cucumber-junit-1.1.5
- cucumber-jvm-deps-1.0.3
- cucumber-spring-1.1.5
- gherkin-2.12.1
- hamcrest-all-1.3
- junit-4.11
- selenium-server-standalone-2.48.2
After all, u want to create a java project and then a java class inside of the project. Then have to upload those downloaded referenced libraries in to java project. then you will have to create your java class according to your requirements.
After all these, you can create a feature file within the project with the extension of .feature. Then you can write your scenario and steps of its and then can run the feature file. There you can see whether the scenario is properly working or not. Before you run your feature file, it should be deleted the spring jar file from from libraries. If not your feature file will not be working properly and there will be an error.
Also in a feature file, there can be only one Feature and it should be placed at the beginning of the feature file. Then you can enter scenarios for the feature, There is no limitation for scenarios as in features. There can be many scenarios and all the scenarios must have steps. All the steps should be started from a key word like Given,When, And & Then.
After you run your feature file, you will have results for it. If you have undefined steps in your results, it says that your feature file is active. But if you have defined steps in your results, it says that there is no problem for executing the feature file.
No comments :
Post a Comment