Robot Handles - Giving Selenium a Helping Hand
By far the most common way to use Selenium to interact with an application is to code tests that have intimate knowledge of the underlying application. This is simple, but brittle. Others may try to make the test code intelligent, leading to a very complex testing framework. There is a middle ground.
Imagine that we are building a robot to move eggs. A simple robot can deal with identical eggs, but is brittle as soon as new eggs are introduced. An intelligent robot could adapt to variations with sensitive touch sensors. Or, we could use egg-holders with a handle on top. Now all we need is a simple robot that understands handles. If we then want to move something instead of eggs, we just need a new holder – the handles and the robot remain the same.
In this session you’ll learn the metaphor of Robot Handles, discuss ways that we can add meaningful interaction metadata into the application as we build it, and demonstrate how that can be just as helpful for humans as it is for robots
Outline/structure of the Session
The session will:
- discuss some of the main stumbling points with GUI based testing
- introduce the metaphor of Robot Handles and relate this to testing a web application
- introduce some semantic metadata hints that can be used to make interaction between the tests and the application easier
- explain why it's valuable to think of the tests as a critical user of the application
- demonstrate how designing for "test usability" has significant benefits for humans too
Attendees will come away with:
- an appreciation that the tests are a valid and important user of the application
- a metaphor for the usability constraints of the testing “robot” user
- some guidelines for how to get started with their own “robot handles”
Testers, SDETs, Developers
schedule Submitted 1 year ago
People who liked this proposal, also liked:
AntonyMarcano - The Trouble with Page Objects – Things you always knew were wrong but couldn’t explain whyAntonyMarcanoRiverGliderRiverGlide
schedule 1 year agoSold Out!
PageObjects have some common problems that many people see but not everyone can explain. Over time they can become harder and harder to maintain. In some cases, they become a tangled mess riddled with deep inheritance hierarchies. How can this happen?!
PageObjects provide an easy-to-follow, simple structure that avoids early maintenance issues. But, they break some key OO design rules, making maintenance more difficult over time. This can result in flaky tests. PageObjects were introduced to help test-developers avoid mistaking flaky tests for problems with Selenium. It was a useful first step, so why did we stop there?
In this session you’ll learn about the SOLID design principles that PageObjects disregard. You'll see why this leads to problems. You’ll see how and why PageObjects benefit from refactoring to SOLID design principles. Finally, you’ll meet the Screenplay Pattern; an alternative that can save you the effort.