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

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…

Contents