Automated UI tests should be easy to read and clearly show business logic, not filled with low-level code. Learn how to create a Fluent Interface for your tests and make them highly readable, easy to maintain and pleasant to work with.
Too often a suite of automated tests is thrown out because it is cumbersome to maintain. In this course, Automated Tests in Java with Fluent Interface Using WebDriver Selenium, you will gain the ability to write UI tests in an entirely different way - one that makes UI tests useful and actually pleasant to work with. First, you will learn the Page Object pattern and apply it to a UI test in order to remove low-level Selenium API details from the test. Next, you will discover how method chaining works to make your test fluent and improve your own experience writing and reading tests. Finally, you will explore how to approach the UI testing domain and design a more complex Fluent Interface that will feel like a real language, allowing anyone to read and understand what the test does. By the end of this course, you will have the necessary skills to write a small (or large) UI testing framework that enables you to create fluent and easy-to-read tests for your web application.
Course Overview Hi everyone, my name is Andrejs Doronins, and welcome to my course, Automated Tests in Java with Fluent Interface using WebDriver Selenium. Test automation is a discipline that has a lot of challenges, but it can be fun and rewarding when done right. But when the number of automated tests grows to hundreds or thousands, software teams suddenly find themselves spending more time maintaining existing tests as opposed to writing new ones. This course helps you overcome this problem by showing you how to create a fluent interface for UI tests. Your tests will become easy to write and easy to ready by anyone, including non-technical people, and this makes a big difference. Some of the major topics that we will cover include applying the Page Object Pattern to existing Selenium code, understanding and using method chaining, and designing and implementing advanced fluent interface features. By the end of this course, you'll be able to create fluent and easy-to-read UI tests that everyone will love. Before beginning the course, you should be familiar with Java, Selenium, or another UI testing library, as well as the ability to set up a basic Java project with tools, such as IntelliJ or Eclipse. I hope you'll join me on this journey to learn better test automation with the course Automated Tests in Java with Fluent Interface Using WebDriver Selenium, at Pluralsight.
Implementing Basic Fluent Interface with Method Chaining Hello, and welcome to the next module. In this module, we are going to make our tests fluent. It won't be perfect fluency, but we have to start with something. In order to do that, we need to understand the concept of method chaining. Method chaining is the ability to connect multiple methods like you see on the screen, and in my opinion, one of the best way to grasp the concept is to learn a simple version of the Builder Pattern. I suppose this course comes with a few extra bonuses. On top of the fluent interface, you get to learn the Singleton Pattern that was used in the previous module and also the Builder Pattern. Once we understand the Builder Pattern, we'll use the method chaining part of it and apply it to our tests. Let's get started.
Advanced Fluent Interface Design Hello, and welcome to the last module of this course. In this module, we are going to take our fluent interface to the next level. But I have to tell you, this is not going to be a single correct recipe for all your UI automation needs. This is the stage of interface design, which means there is never a single correct solution. Instead, we are going to brainstorm together about what we do in UI testing, meaning we need to understand the domain that we are in and what actions we do in it. Then we're going to design a simple interface accordingly, and then we're going to implement it. What I'm going to show you is only one of the many possibilities. There is going to be some theory in the next video. It might seem unrelated at first, but I promise it will gradually make sense and become clear why I'm talking about all those things.