March 2019 Summaries
13 posts from Sauce Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
Sauce Labs has released a new major upgrade to its Node.JS API wrapper, version v2, which includes several new features and supports additional API endpoints, including the management of real device tests and a performance API. The package was rewritten to leverage the latest Node.JS features, requiring modifications to existing projects. A CLI command is also available, allowing users to access test data and query specific endpoints by typing commands into their command line interface. The easiest way to install the package is via NPM, and configuration options can be set using environment variables or parameters. Users can access API endpoints programmatically or through a command line interface, with examples provided in the documentation. The new version encourages contributions to open source projects, including Appium and Selenium, and invites users to report issues and suggest improvements.
Mar 29, 2019
643 words in the original blog post.
In this example, JUnit is used to cover all three tiers of testing - unit tests, integration tests, and UI/acceptance tests. Unit tests are written in SauceStatusPageDecoratorTest.java, which test the messages returned by the PageDecorator, depending on the Sauce Cloud's status. Integration tests are written in IntegrationIT.java, which use Selenium 3 to automate a real browser and simulate user actions to ensure that the plugin is properly installed on Jenkins. UI/acceptance tests are also included, which verify that the plugin displays the correct message when the Sauce Labs service is up or down. The code example demonstrates how simple it is to cover all three tiers of testing in one JUnit test suite.
Mar 27, 2019
1,640 words in the original blog post.
Selenium and Jenkins integration can be complex due to various challenges such as long test run times, limited browser coverage, and the need for ongoing maintenance. However, with the right approach, it is possible to achieve seamless integration of Selenium with Jenkins. Headless testing using tools like Chrome Headless or PhantomJS can significantly reduce test execution time, while running tests on Sauce Labs cloud platform can provide effortless scalability and access to over 800 browser/OS combinations. Another approach is to set up a local Selenium Grid with multiple machines, each installed with different operating systems and browsers, to distribute test execution across nodes. Ultimately, the choice of approach depends on factors such as infrastructure costs, maintenance requirements, and testing complexity.
Mar 27, 2019
2,774 words in the original blog post.
The Selenium "click" command is a powerful capability for testing the behavior of app UI elements without manual intervention. It simulates user clicks on links, buttons, checkboxes, and radio buttons, allowing developers to test the behavior of their application's User Interface. The command can be used in Selenium Webdriver or SeleniumIDE, with the latter providing a more straightforward interface for clicking elements. Advanced techniques include using identifiers such as CSS, name, ID, link, and XPath to click specific elements, and rotating through clicks on multiple objects. The "click at" command allows developers to specify an offset from top-left when clicking on an element. By simulating user interactions, the Selenium "click" command helps uncover bugs in applications, saving manual testing effort and improving overall quality.
Mar 21, 2019
657 words in the original blog post.
In a perfect world, you'd have time to write an automated test for every piece of code that you add to your application, but in reality, selecting what to automate is strategic and requires reevaluating your testing strategy as your applications change. You need to ask yourself questions about the feature's importance to the overall functionality of the application and whether there's duplication of testing within your suite. As your application evolves, you'll need to reevaluate which tests are necessary, considering factors like component complexity and usage. To manage your automated testing suite effectively, perform analysis to ensure adequate test coverage, design scripts to be independent from the UI, retire obsolete test scripts, and regularly review your strategy to maintain its effectiveness. By doing so, you can ensure a high level of application quality despite the dynamic nature of software development.
Mar 21, 2019
1,122 words in the original blog post.
A software testing communication template is necessary for effective sharing of testing results with stakeholders across the organization. This template aims to provide insight, accountability, and awareness for teams by visualizing the quality state of the application through metrics such as pass/fail rates, skip counts, and test execution times. A well-designed template should have clear acceptance criteria, be easy to use, and provide real-time data to facilitate continuous improvement and decision-making. The goal is to remove manual collection of testing results and defect lists, and instead rely on data from the CI pipeline, GitHub checks, and defect tracking and monitoring tools. By using a communication template, organizations can build a culture of continuous improvement and ensure that stakeholders have access to the information they need to make informed decisions about software quality.
Mar 19, 2019
960 words in the original blog post.
You can start with WebDriver using Eclipse and the Java bindings on Windows. To do this, you'll need to download and install Java, which is required for the Java bindings. You can get Java from its official download site. Then, you'll need to download and install Eclipse, a widely popular editor for Java. Once installed, create a new Java project in Eclipse using the "File => New => Java Project" option. Add WebDriver's Java bindings to your project by converting it to Maven or Gradle, depending on your team's build and dependency management system. Finally, set up the browser driver engine, such as ChromeDriver.exe, and write your first test using a test framework like JUnit. You can run your test using Eclipse's built-in "Run As => JUnit Test Case" option.
Mar 19, 2019
1,090 words in the original blog post.
Faster regression testing with in-sprint automation can improve software development strategies by reducing the time spent on manual testing and increasing the speed of feature delivery. This approach involves building automated UI tests alongside new features, allowing developers to test their changes as they go and reducing the need for extensive regression testing. By automating only the most critical parts of the user interface, teams can save time and resources while maintaining high-quality software releases. The use of tools like Selenium WebDriver and Page Objects can facilitate this process, providing a flexible and maintainable way to automate UI tests. A well-planned strategy, including selecting the right tool and design pattern, is crucial for successful UI automation. By understanding the team's goals and building a tailored approach, teams can overcome common challenges and achieve faster regression testing with in-sprint automation.
Mar 15, 2019
1,608 words in the original blog post.
The state of continuous testing in DevOps is a topic of interest, with the aim of understanding how far developers have come in implementing and utilizing continuous testing tools and strategies. Continuous testing provides end-to-end automated testing that leads to higher application quality while preserving delivery schedules, improving security and performance. The evolution of software testing has led to processes like continuous testing, which improves an organization's ability to diagnose application issues earlier. Automated tests are produced to thoroughly test software features as they are integrated into the code base, and these tests are then integrated into the continuous delivery pipeline. This approach helps in catching bugs within the application code as early on in the development process as possible, saving time for developers later. Automated testing frameworks like Selenium and Appium have become integral parts of a continuous testing strategy, making it easier for software testers to develop test scripts that thoroughly validate the code in an efficient manner. The tools can be run in parallel in multiple browsers or devices, ensuring code quality while saving time and supporting continuous delivery. As DevOps teams continue to grow, the importance of continuous testing also continues to evolve, with one possible direction being towards AI test automation, which could significantly reduce human involvement in test creation and help close gaps in test coverage.
Mar 13, 2019
1,067 words in the original blog post.
To speed up Selenium tests, it's essential to design your tests independently and keep them short, ideally under 20 steps. This allows for parallel testing with all tests running simultaneously. Additionally, pre-populating cookies before starting each test can significantly reduce login time, making tests run faster. By logging into the user via server-side logic and pushing the cookie into the browser via Selenium, developers can achieve clean browsers while maintaining fast test execution times.
Mar 13, 2019
829 words in the original blog post.
The Selenium file upload feature allows developers to upload files using Webdriver's native file upload feature. With Selenium 3, the `setFileDetector` method can be used to let WebDriver know that files are being uploaded from a local computer to a remote server, eliminating the need for changes in test code when switching from local to remote drivers. This feature is available in all official Selenium 3 bindings and requires Selenium 2.8.0 or newer. Examples of file upload tests are provided in Java and Ruby, demonstrating how to use the `sendKeys` command with a local file path and setting up a file detector for remote testing. Additionally, Sauce Labs provides a cloud-based platform for automated testing, supporting Selenium, Appium, and JavaScript unit testing frameworks, and offers features such as video recording, debugging tools, and secure tunneling for efficient test suites.
Mar 12, 2019
603 words in the original blog post.
Docker containers don't change the functionality of a containerized application compared to a non-containerized one, but they do introduce new challenges such as different operating system requirements, security concerns, and testing complexities for microservices. Containers require separate branches for each operating system, and security certifications need to be considered when building containers. Testing for microservices becomes more challenging due to the need to test individual APIs, but tools like Postman and Newman can help automate API tests. Overall, containerization brings better reuse and change tracking, but also presents some bumps in the road for quality testing engineers.
Mar 05, 2019
896 words in the original blog post.
To effectively plan a test automation strategy, consider the key stakeholders involved, including testing staff, developers, designers, and service desk personnel. Understanding what needs to be tested, how current tests are designed and executed, and whether they meet testing requirements is crucial. The approach should involve designing an automated regime based on the "wish list" of desired tests, either starting from scratch or building upon existing practices. Decisions on in-house versus outsource testing, resource allocation, budget, and time constraints will influence the best strategy for your organization. Understanding testing needs, resources, and available services is essential to making informed decisions about your test automation plan.
Mar 04, 2019
1,519 words in the original blog post.