February 2014 Summaries
5 posts from Sauce Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
The Selenium framework is being introduced as a solution to automate tests for web applications. The main challenge with Selenium tests is that they can be brittle and difficult to maintain over time due to changes in the application, which breaks the tests. To address this issue, Page Objects are used, where simple objects model the behavior of an application, allowing tests to be written against them instead of directly against the application. This approach enables controlled chaos, reusability of functionality across tests, and makes it easier to update test code when changes occur in the application. A class called `Login` is created with locators for the login form, username input field, password input field, success message, and failure message. The class has an initializer that receives the Selenium driver object and visits the login page, a method `with` that accepts username and password values as arguments and performs the core functionality of the login page, and methods to check if the success or failure messages are present. Another test is added in the spec file to demonstrate a failed login scenario, which also uses the Page Object approach. The limitation of asserting false for the absence of a success message is discussed, and an assertion is added to ensure Selenium is in the right place before proceeding with the tests.
Feb 26, 2014
1,282 words in the original blog post.
The Selenium project is a widely used tool for automating web browsers, allowing developers to write tests that interact with elements on a page. To get started with Selenium, one must identify the element(s) they want to use and determine how to locate them, often using techniques such as inspecting HTML attributes or utilizing CSS selectors. The goal is to find unique, descriptive, and stable elements that can be used consistently throughout testing. Once the elements are identified, a test can be written with Selenium actions that interact with these elements. This involves five key steps: finding the elements, writing the test with Selenium actions, figuring out what assertion to make, writing the assertion and verifying it, and double-checking the assertion by forcing it to fail. By following these steps and utilizing the right locator strategies, developers can create effective tests that ensure their web applications function as intended.
Feb 18, 2014
1,171 words in the original blog post.
Dave Haeffner is a noted expert on Selenium and automated testing, and he's sharing his knowledge through a series of posts on "Getting Started with Selenium Testing". In this chapter, he discusses the importance of writing good acceptance tests that are maintainable, resilient, and performant. He recommends grouping tests into small batches, being descriptive with test names and tags, using a Test Runner to execute tests efficiently, and storing them in a Version Control System for collaboration and organization. Haeffner emphasizes the value of atomic and autonomous tests, which require less setup and data reliance, making tests more concise and independent. He also shares his experience helping companies implement automated acceptance testing and has spoken at conferences about it.
Feb 11, 2014
595 words in the original blog post.
Automated Mobile Testing with Appium & Gilt Recap`:
Gilt Groupe uses Appium to automate their mobile testing, replacing previous solutions due to flaws in their release and QA process, which causes pain from elusive and hard-to-reproduce bugs. A compromise between automating UI tests and manual QA involves focusing on repetitive tasks such as sanity tests for daily builds, with the goal of maximizing effectiveness rather than achieving 100% automated test coverage. The team is experimenting with ways to handle waits to transfer between screens using the Page Objects pattern and techniques similar to ScalaTest's Eventually, and emphasizes collaboration between teams, although they are still in the process of finding a suitable workflow.
Feb 10, 2014
534 words in the original blog post.
This series is designed to help new users get started with Selenium testing, a software robot used for automated web application testing. To write reliable and scalable tests, it's essential to define a test strategy by understanding the business model, user behavior, and application functionality. Choosing the right programming language is also crucial, as conventional wisdom suggests using the same language as the application, but this may not be ideal for beginners or those without development experience. Selecting an editor that suits individual needs is another key consideration. The series aims to provide a comprehensive guide to getting started with Selenium testing and will be updated regularly.
Feb 05, 2014
782 words in the original blog post.