December 2018 Summaries
4 posts from Sauce Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
Software testing is the process that ensures an application meets user expectations. As a developer, you should be aware of the basics of software testing to assist in writing tests that your organization needs to assure software quality. There are various types of software testing, including unit testing, performance testing, and automated testing. Automated testing enables organizations to write programs that perform tests on a software application automatically, rather than requiring human engineers to perform and monitor tests manually. To write an automated test, you need an automated testing framework and automated test code, which can be written in various languages depending on the framework used. The execution of tests usually happens on infrastructure set up specifically for testing, such as servers provisioned using emulators or simulators that create environments that mimic those in production. As a developer, understanding how software testing works and how you can help your organization make the leap to test automation can earn props for yourself while making the overall software delivery pipeline flow more smoothly.
Dec 13, 2018
1,101 words in the original blog post.
In Selenium testing, a common issue is when an element on the page doesn't exist yet, but will soon. A simple solution is to add a sleep or wait for a short period of time before checking again. However, this can be problematic if the element never appears or if there's an error. To avoid infinite loops, Selenium provides explicit waits, which allow developers to specify a timeout for waiting for an element to appear on the page. This can be achieved using the `contains_with_timeout` method in Ruby, which checks for the presence of a specific string within a given timeout period. Alternatively, Selenium's built-in `Explicit Wait` feature can be used with the `wait.until` method to achieve similar results.
Dec 10, 2018
437 words in the original blog post.
The post discusses how headless testing fits into a Kubernetes-driven CI/CD pipeline. Containers and Kubernetes have changed the way testing is done, making it possible to run tests on lightweight instances in the cloud. Headless testing can leverage this opportunity by giving it a more prominent place in the QA process. The goal of DevOps is to ship high-quality software faster, and headless testing enables testing during development, which helps developers write better code. It also fills the gap for pre-commit testing, enabling dry runs before every merge, and can be used to run sanity checks and record timelines of changes. Headless testing has long been overlooked as a way to generate screenshots automatically but is now taking on new prominence in the CI/CD pipeline with the advent of Kubernetes and GitOps.
Dec 04, 2018
927 words in the original blog post.
Capturing screenshots is a crucial feature for automation engineers to understand why tests fail and how to reproduce them. Selenium supports capturing screenshots on remote machines, but the `SaveScreenshot` method only captures the viewport, which can lead to missing content and varying sizes due to default settings or HTML changes. To capture more accurate screenshots, using browser-specific functions such as maximizing the window size or resizing it to a specific dimension is an alternative, although not ideal from a best practice perspective. For more advanced visual debugging tools, services like Live Testing offer full-screen video recordings without extra code, while AppliTools provides a code and backend library for capturing images by portion of the screen with workflow review and approval capabilities.
Dec 03, 2018
353 words in the original blog post.