From the course: Robot Framework Test Automation: Level 1 (Selenium)
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Style: Procedural vs. Gherkin - Selenium Tutorial
From the course: Robot Framework Test Automation: Level 1 (Selenium)
Style: Procedural vs. Gherkin
In this video, I'm going to briefly walk through two different styles of creating more readable scripts; procedural versus Gherkin. The subsequent videos you're about to see are going to walk through the procedural way of creating a readable script. But at the end of the unit, I'll show you how you could also utilize Gherkin syntax to create a more readable script as well. Let's dig in. Here, like I mentioned, my test case is a series of domain specific keywords. So within the Amazon product, I can search for things. I can select products from search results, I can add a product to cart, and I can begin a checkout. Those are things I can do in my Amazon business domain. And it's pretty clear what this test case is going to do. If we instead look at the Gherkin version of this test case, you can see it reads very differently. Given a user is not logged in and the user searches for products, and the search results contains relevant products, and the user selects a product from the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Overview6m 51s
-
(Locked)
Preview of the final solution6m 9s
-
(Locked)
Style: Procedural vs. Gherkin3m 11s
-
(Locked)
Introducing user-defined keywords5m 20s
-
(Locked)
Break the script into keywords7m 18s
-
(Locked)
Moving keywords to resource files7m 47s
-
(Locked)
Adding setup and tear down5m 36s
-
(Locked)
Overview of page objects7m 47s
-
(Locked)
Demo: Create a page object4m 7s
-
(Locked)
Increase readability using Gherkin7m 43s
-
-
-
-
-
-
-