DevOps.com

Where the world meets DevOps

  • Latest
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
    • IT as Code
  • DevOps Chats
  • Webinars
    • Upcoming
    • On-Demand Webinars
  • Library
  • Events
    • Virtual Summits
    • Conferences
  • Sponsored Communities
    • AWS Community Hub
    • CloudBees
    • IT as Code
  • Related Sites
    • MediaOps
    • Container Journal
    • Security Boulevard
    • SweetCode.io
    • Digital Anarchist
    • DevOps TV on YouTube
    • DevOps Chat on SoundCloud
    • DevOps Connect
    • DevOps Dozen
  • Media Kit
  • Follow Us
    • Twitter
    • Google News
    • LinkedIn
    • Facebook
    • DevOps TV on YouTube
    • Email
MENUMENU
  • AI
    • PagerDuty

      PagerDuty Applies AIOps to IT Incident Management

      Puppet Windows

      Puppet Deepens Windows Integration

      NVIDIA Arm

      NVIDIA to Create AI Powerhouse by Acquiring Arm for $40B

      MLOps

      Algorithmia Looks to Meld MLOps and DevOps

      OpsRamp Adds Synthetic Monitoring to AIOps Platform

      OpsRamp Adds Synthetic Monitoring to AIOps Platform

  • Cloud
    • report cloud

      Report: Cloud Expertise Now Superior to University Degree

      cloud

      Are We There Yet? The Long, Hot Road Trip to the Cloud

      secrets

      Safeguarding Secrets Within the Pipeline

      Tricentis

      Tricentis Extends Testing Reach to ServiceNow Applications

      serverless DevOps

      How Serverless Technologies Can Achieve Optimal DevOps Practices

  • Continuous Delivery
    • logs

      How Logs Can Empower Your CI/CD Delivery Pipeline

      JFrog

      JFrog Sets Future Course Post-IPO

      DevOps Best Practices

      CircleCI Looks to Advance DevOps Best Practices Adoption

      CircleCI Salesforce

      CircleCI Adds to Salesforce CI/CD Orbs Collection

      Harness Drone

      Harness Acquires Drone CI Project

  • Continuous Testing
    • crowdtesting

      Crowdtesting: How to Ensure Quality in Disruptive Times

      Eggplant test

      Eggplant Employs AI to Surface Test Recommendations

      test run time

      4 Steps To Achieve a 66% Reduction in Test Run Time

      gameday

      How to Run a Remote GameDay

      SAP Tricentis

      SAP Aligns With Tricentis on Continuous Testing

  • DevSecOps
    • Credentials Management, with strongDM and Software.com

      TechStrong TV: Credentials Management, with strongDM and Software.com

      secrets

      Safeguarding Secrets Within the Pipeline

      strongDM

      TechStrong TV: strongDM Helps Kustomer Go Remote

      DevSecOps

      Shifting Left With DevSecOps: ESG Report Exposes Difficulties

      Progress Chef

      Progress Acquires Chef to Expand DevOps Portfolio

  • Leadership Suite
    • recruitment

      Eliminating Unconscious Bias in Tech Recruitment

      enterprises

      Surveys Show COVID-19 Changes to Enterprises Likely Long-Term

      agility

      3 Steps for Organizational Agility in the COVID-19 Era

      developer

      Low-Code: An Oasis During Developer Drought

      WFH

      Report: As WFH Took Hold, Few Adjusted Their Security Posture

  • Practices
    • strongDM

      TechStrong TV: How strongDM Helps Fintech MANTL With Access Management

      logs

      How Logs Can Empower Your CI/CD Delivery Pipeline

      DevOps World

      DevOps World 2020: 5 Sessions to Put on Your Schedule

      ServiceNow

      ServiceNow Extends Reach Into DevOps Ecosystem

      crowdtesting

      Crowdtesting: How to Ensure Quality in Disruptive Times

  • ROELBOB
    • behavior-driven-development

      Behavior Driven Development

      exit-strategies

      Exit Strategies

      value-of-conventions

      The Value of Conventions

      a-world-of-hurt

      A World of Hurt

      conways-law

      Conway’s Law

  • Toolbox
    • strongDM

      TechStrong TV: How strongDM Helps Fintech MANTL With Access Management

      logs

      How Logs Can Empower Your CI/CD Delivery Pipeline

      PagerDuty

      PagerDuty Applies AIOps to IT Incident Management

      2020 DevOps Dozen Awards

      The 2020 DevOps Dozen² Awards Nominations Are Now Open

      Credentials Management, with strongDM and Software.com

      TechStrong TV: Credentials Management, with strongDM and Software.com

  • IT as Code
  • More Topics
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps

Home » Blogs » Continuous Testing » 4 Steps To Achieve a 66% Reduction in Test Run Time

test run time

4 Steps To Achieve a 66% Reduction in Test Run Time

Nikolay AdvolodkinBy Nikolay Advolodkin on August 12, 2020 1 Comment

Here are ways organizations can reduce their test run times to improve speed and efficiency

Related Posts
  • 4 Steps To Achieve a 66% Reduction in Test Run Time
  • Meeting Challenges in incorporating automated testing throughout the DevOps cycle
  • Continuous Testing vs. Test Automation: 3 Key Differences
    Related Categories
  • Blogs
  • Continuous Testing
  • DevOps Practice
    Related Topics
  • atomic testing
  • code quality
  • code testing
Show more
Show less

Consult any recent DevOps survey and the same theme emerges: Testing remains one of the biggest roadblocks impeding organizations’ collective efforts to deliver better software, faster. Unlike days past, however, when agile development was still in its relative infancy and investments in testing lagged other areas of the delivery pipeline, organizations today are increasingly aware of the critical role continuous testing plays in delivering quality software at speed, and are aggressively investing in the requisite testing tools and technologies.

No, the problem today is not lack of awareness or tooling. The problem, quite simply, is that testing is difficult, and only gets more difficult as organizations look to drive automation at scale. Nowhere is this challenge more evident than in organizations’ ongoing struggles with test quality. A recent study showed only 24.37% of organizations pass at least 90% of their desktop tests and only 25.45% pass at least 90% of their mobile tests. Remember, the purpose of agile development is to accelerate application delivery and shorten the release cycle. Organizations can do neither if they constantly have to manually follow-up to determine the source of repeated test failures.

Doing It Right

Organizations must find ways to improve test quality and speed. A major reason so many tests fail is they take far too long to run. The longer it takes to run, the more likely it is to end with a failure. According to the aforementioned study, those that complete in two minutes or less are twice as likely to pass as those lasting longer than two minutes.

With that in mind, let’s take a look at four key steps testers and developers can implement to reduce test run times.

Script Atomic Tests

There’s no more important best practice to create a better and faster automation experience than to run atomic tests. These focus on just one piece of application functionality and are much faster and easier to execute than longer tests assessing multiple pieces of functionality.

Let’s examine what this looks like in practice. Suppose an online retailer needs to validate that users can log in, view their gift card balance, add items to their cart, proceed to checkout and successfully process a transaction. Even an experienced tester will often make the mistake of scripting a single test to validate those five functions. The far better approach, especially if the aim is to reduce run time and improve test quality, is to write five separate tests, each specifically focused on one piece of functionality. Running individually but in parallel, these five “atomic” tests will execute in far less time than one longer test.

Run Tests in Parallel

Of course, if those five atomic tests are executed sequentially—that is, one at a time, one after the other—they’ll take even longer to complete than the one screen flow test, negating any potential runtime benefit. That’s why running tests in parallel is an equally critical component of any strategy to reduce test run times. Consider the hypothetical example of a test suite with 100 atomic tests, each of which takes two minutes to execute. Run those 100 tests sequentially and they’ll take more than three hours to complete. Run them in parallel, and all 100 will complete in just two minutes.

Remember, too, not to get thrown by the volume of tests in a given suite. It’s tempting to think that a suite with 10 long tests that each take 5 minutes to complete will execute faster than one with 100 atomic tests that each take 1 minute to execute. But even if executed in parallel, the suite with the 10 long tests will still take 5 minutes to run—five times longer than the suite with 100 atomic tests.

Reduce the Number of Selenium Commands

Having too many Selenium commands in your test script flies in the face of atomic testing and is one of the most common underlying causes of long and unstable tests. Every single command takes time to execute and represents a new opportunity for something to go wrong. Minimize the number of commands required to execute a test case and run time will shrink accordingly.

Use Explicit Waits

Another effective way to reduce test run time is to use explicit waits rather than implicit waits. Implicit waits set a default wait time between each step or command across a test script, such that the subsequent step only executes after the pre-defined amount of time has elapsed. Explicit waits, on the other hand, enable the next step in a script to execute as soon as the preceding step is complete. Though more complicated to implement, using only explicit waits can have a significant positive impact on test run time.

Putting it Together

The example below shows an unoptimized test suite with 311 commands run against a mobile device. This example took 1,265 seconds (or more than 21 minutes) to execute. If delivering better software faster is the aim, that’s not going to work.

Applying the aforementioned tactics to the same test suite executed against the same device, however, drove the total number of commands down to just 127 and enabled the suite to execute in just 430 seconds (or just over 7 minutes), a 66% improvement in test run time.

Though the prospect of reducing test run time may be daunting, by focusing on a limited set of key tactics and best practices, the end goal of shorter, more stable tests is indeed attainable.

Filed Under: Blogs, Continuous Testing, DevOps Practice Tagged With: atomic testing, code quality, code testing

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • More
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)

Like this:

Like Loading...
Sponsored Content
Featured eBook
The Automated Enterprise

The Automated Enterprise

“The Automated Enterprise” e-book shows the important role IT automation plays in business today. Optimize resources and speed development with Red Hat® management solutions, powered by Red Hat Ansible® Automation. IT automation helps your business better serve your customers, so you can be successful as you: Optimize resources by automating ... Read More
« Healthcare Increasingly Embracing DevOps
Upcoming Event: Operationalizing Kubernetes Virtual Summit »

Upcoming Webinars

Fitting SAP Into a DevOps World
Tuesday, September 22, 2020 - 9:00 am EDT
The New Security Perimeter: Protecting Identities & Endpoints in the Remote Work Age
Tuesday, September 22, 2020 - 1:00 pm EDT
Bridging Operations and Development with Observability
Wednesday, September 23, 2020 - 1:00 pm EDT

TechStrong TV – Live Streaming

TechStrong TV - All Episodes

Top Stories of the Week

  • View DevOps.com Privacy Policy

Upcoming Webinars

Tue 22

Fitting SAP Into a DevOps World

Tue, September 22, 9:00 am - 10:00 am EDT
Tue 22

The New Security Perimeter: Protecting Identities & Endpoints in the Remote Work Age

Tue, September 22, 1:00 pm - 2:00 pm EDT
Wed 23

Bridging Operations and Development with Observability

Wed, September 23, 1:00 pm - 2:00 pm EDT

More Webinars

Past Webinars

Latest from DevOps.com

New Tracks = New Insights at DevOps World 2020
September 22, 2020 | Doug Tidwell
New ASG Report Looks at COVID-19’s Impact on Software ...
September 22, 2020 | Veronica Haggar
TechStrong TV: How strongDM Helps Fintech MANTL With Access ...
September 22, 2020 | Alan Shimel
How Logs Can Empower Your CI/CD Delivery Pipeline
September 22, 2020 | Ariel Assaraf
The Benefits of an IaC Approach to Storage
September 22, 2020 | Marcel Hergaarden

Most Read on DevOps.com

The 2020 DevOps Dozen² Awards Nominations Are Now Open
September 16, 2020 | Alan Shimel
OutSystems Employs More AI to Accelerate Low-Code Developmen...
September 15, 2020 | Mike Vizard
TechStrong TV: Credentials Management, with strongDM and Sof...
September 16, 2020 | Alan Shimel
NGINX Expands Portfolio to Include Service Mesh
September 15, 2020 | Mike Vizard
What To Expect at a Virtual DevOps World 2020
September 17, 2020 | Buffi Gresh

On-Demand Webinars

DevOps.com Webinar ReplaysDevOps.com Webinar Replays

Download Free eBook

Hybrid Cloud Security 101
New call-to-action
  • Home
  • About DevOps.com
  • Meet our Authors
  • Write for DevOps.com
  • Business Directory
  • Media Kit
  • Sponsor Info
  • Copyright
  • TOS
  • Privacy Policy

© 2020 ·MediaOps Inc.All rights reserved.