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

Automating Flipkart via selenium

                                            Hi Folks, we are automating a flipkart site where you will see how to search and filter the product you choose without logging in . import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.Select; import org.testng.annotations.Test; public class flipkart { WebDriver driver ; @Test       public void test()       {   System.setProperty( "Webdriver.chrome.driver" , "chromedriver" );     WebDriver driver = new ChromeDriver();   driver .manage().timeouts().implicitlyWait(5, TimeUnit. SECONDS );   driver .manage().window().maximize();          driver .get( "https://www.flipkart.com" );   ...

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...

Mac OS- Error - eclipse (JVM) while updating Catalina to Big Sur

  Hi, As you have received your new OS update Big Sur 11 from Catalina 10  You might be facing issue of eclipse throwing an error "failed to create Java virtual machine". This a bug already reported to the community and you will find many confusing solution to fix the issue I'll explain you in simple steps how to fix this issue. Press keys (command_shift+G) make sure while pressing these buttons your mouse is pointing on desktop   Go to folder, A window will open  where you have to enter. " /Library/Java/JavaVirtualMachines " and press Go it will take you the version installed of JDK in your machine in my case it is jdk1.8.0_241.jdk shown as below you need to find the eclipse installed in your system it can be under application(which can be found in Finder) in my case it was present in home directory under software folder   click on eclipse and go to "show package contents"  Open "contents" folder check the file "info.pilst". open ...