Skip to main content

Working with cucumber - Fundamentals




Hi, 
The video talks about how to create a Maven project, what dependencies are required to run cucumber on your system. for reference copying all the dependency required for running cucumber






This video is also available in youtube


Copy and paste these dependency between <project>   </project> tags in your
POM file and save.

   <dependencies>

<dependency>

    <groupId>org.testng</groupId>

    <artifactId>testng</artifactId>

    <version>7.1.0</version>

    <scope>test</scope>

</dependency>

<dependency>

    <groupId>info.cukes</groupId>

    <artifactId>cucumber-junit</artifactId>

    <version>1.2.6</version>

    <type>pom</type>

    <scope>test</scope>

</dependency>

 <dependency>

        <groupId>info.cukes</groupId>

        <artifactId>cucumber-java</artifactId>

        <version>1.2.0</version>

        <scope>test</scope>

    </dependency>

    <dependency>

    <groupId>org.seleniumhq.selenium</groupId>

    <artifactId>selenium-java</artifactId>

    <version>3.5.3</version>

</dependency>

<dependency>

    <groupId>org.apache.maven</groupId>

    <artifactId>maven-plugin-api</artifactId>

    <version>3.6.3</version>

</dependency>

<dependency>

    <groupId>net.masterthought</groupId>

    <artifactId>maven-cucumber-reporting</artifactId>

    <version>5.0.0</version>

</dependency>

<dependency>

    <groupId>junit</groupId>

    <artifactId>junit</artifactId>

    <version>3.8.1</version>

    <scope>test</scope>

</dependency>

<dependency>

    <groupId>info.cukes</groupId>

    <artifactId>gherkin</artifactId>

    <version>2.12.2</version>

</dependency>

<dependency>

    <groupId>info.cukes</groupId>

    <artifactId>cucumber-java</artifactId>

    <version>1.2.5</version>

    <type>pom</type>

</dependency>

<dependency>

    <groupId>info.cukes</groupId>

    <artifactId>cucumber-jvm</artifactId>

    <version>1.2.5</version>

    <type>pom</type>

</dependency>

<dependency>

    <groupId>info.cukes</groupId>

    <artifactId>cucumber-junit</artifactId>

    <version>1.2.5</version>

    <scope>test</scope>

</dependency>

<dependency>

    <groupId>info.cukes</groupId>

    <artifactId>cucumber-jvm-deps</artifactId>

    <version>1.0.5</version>

</dependency>

  </dependencies>

Once this is done you can create a cucumber project  By creating a feature file and corresponding step definition file, under src/main java

Feature file can be generated only by extension feature  Please check out the details in  Youtube and leave your comments.







Thanks for watching, hope you have a wonderful reading,  please do like /subscribe to the video.












Comments

Popular posts from this blog

Cucumber - Execution of test cases and reporting

Before going through this blog please checkout blog on   Cucumber Fundamentals Cucumber is testing tool which implements BDD(behaviour driven development).It offers a way to write tests that  anybody can understand, regardless of there technical knowledge. It users Gherkin (business readable language) which helps to  describe behaviour without going into details of implementation It's helpful for  business stakeholders who can't easily read code ( Why cucumber tool,  is  called  cucumber , I have no idea if you ask me I could have named it "Potato"(goes well with everything and easy to understand 😂) Well, According to its founder..... My wife suggested I call it  Cucumber  (for no particular reason), so that's how it got its  name . I also decided to give the Given-When-Then syntax a  name , to separate it from the  tool . That's why it's  called  Gherkin ( small variety of a cucumber that's been pickled. I...

Cucumber Datatable testing without using scenario outline and Issues

  Before going through this blog please visit blog The issue you might encounter while running cucumber project- 1.  you have created the cucumber all file in src/test/java and you are trying to  move it in another folder transition might not be smooth, It will give error one fix will led to other.(depends on the setup) 2. If on running a feature file and successfully creating a stepdef file, If application still says that  few steps are still needs to be implemented or all of them(not detecting creation of step definition) then there is a high chance you have mistakenly wrote some other annotation in stepdef when compares to you feature file eg:- feature file @And ( "^user close browser$" ) public   void  user_close_browser()  throws  Throwable { Stepdef:-             @Then ( "^user close browser$" ) public   void  user_close_browser()  throws  Throwable { driver .quit(); 3. Duplicate S...

Jmeter 5.4.1- Config Elements - Part-03

  Part-01- Installation of Jmeter and HTTP's Recorder click  here Part 02--Previous blog on Assertion Config elements in Jmeter are used to configure or modify the samplers requests made to the server. These elements are added at the same or higher level of the samplers that we want to configure  Let' start with  CSV data config As the name suggest it used to read data from CSV first we need to put data in variables and then use the variables in sampler request. create a new test plan add CSV data set config Add a Thread Group and then add Sampler "Java Request"  Create a CSV file  with some data (Name and Data) and save it  Now go to Jmeter CSs data set config browse and upload the css file create Make few more changes in place of  variable name - Name and Dept Ignore first line - True Delimeter - \t (as suggested) Now move on the Sampler-" Java Request" and rename it with header elements of CSV As we have Name and d...