Blog

Shift-Left Testing: Reimagining What "Testing Early" Means With the SDLC and Virtuoso

Published on
August 2, 2022
Hugo Farinha
CTO & Co-Founder

Learn how to properly shift your testing to the left for the most efficient SDLC ever.

The term “shift-left” has been around for some time, but it is worth reminding ourselves what it means in terms of the Software Development Life Cycle (SDLC).

Looking at a common SDLC and the different processes that some teams adopt, testing comes after the coding stage and before deployment. If we were to take a literal shift left, we could end up in a pickle.

By "shift-left testing, someone may think it is to shift the SDLC test phase completely to the left, between design and code, which obviously would not work. How can you test what doesn’t exist, or how do you test code that has not yet been written?

So, if shift-left testing doesn’t mean shifting the SDLC test phase completely to the left, what does shift-left actually mean? Shift-left seems to be a fancy term for starting to do tasks, or at least thinking about doing them (establishing a testing framework), earlier in the development process. This is not meant to derail the current state of shift-left and the SDLC but to show possible improvements leveraging the latest technology. Since its inception, shift-left testing has delivered countless advances and benefits.

Benefits of shift-left testing

Part of the impetus for the widespread adoption of left-shifted testing is its potential to offer a high ROI. The Systems Sciences Institute at IBM found that the cost of finding, or preventing, potential bugs before the implementation and testing phases could be 650% and 1500% respectively, or $650 and $1500. And if those bugs found their way into the end product, $10,000. That's not to mention any negative effects on a company's reputation. Left-shifted teams also work more collaboratively with quicker release cycles and produce higher-quality products.

The reimagined Software Development Life Cycle

We have witnessed the benefits of a shift-left approach, but can we shift further left? Can we actually test earlier? Tools like Virtuoso enable us to completely reimagine shift-left's relationship with the SDLC and offer better quality products, shipped faster, and even greater returns on investment. Let's see how:

Shift-left testing during 'plan' and 'design' phases

As Forbes Magazine points out, one of the most common reasons software projects fail is poor requirements and the lack of collaboration between teams during the planning phase. Many studies across the industry show what happens when teams don't fully understand what the business needs are and the associated requirements. Shift-left attempts to alleviate this by ensuring QA teams are part of the planning stage and can establish coding standards, protocols, rules, and guidelines with corresponding acceptance criteria. This is, of course, a good thing, but at this point, we can leverage the latest technology and take an extra step left.

Virtuoso allows you to import requirements, generate the test structure, and ultimately generate executable tests before the design phase. This approach ensures that:

  • Resource allocation to testing gets more efficient
  • Missing or incomplete requirements can be detected before moving to the next phase
  • Defects are discovered early before significant investment
  • Business requirements are aligned with the product

And our steady march to the left does not stop there. Thanks to Virtuoso's very clever Natural Language Programming (NLP) and game-changing Intelligent Object Identification, you can create fully functioning tests with nothing more than a handwritten wireframe. It's time for an example.

Below you can see a simple wireframe for a login. This one is not handwritten but it could be. Virtuoso users can build tests in plain English describing journeys through this application before a single line of code is written. For example, entering login credentials and clicking login. All you need is the wireframe, Virtuoso's ability to author tests in plain English, and object identification that behaves like a human. Virtuoso's Intelligent Object Identification does not rely on XPaths or CSS but finds objects intelligently, like a human would, which enables tests to be authored before the coding stage. Test authoring has literally been shifted to the left.

Shift-left testing during the 'code' phase

During the coding phase, the application is being produced, and the fact that tests have already been created in the previous phase empowers testers to further help the development team at greater speed. Tests can be executed in the developer's own environment, meaning developers can have their code validated against testing requirements earlier. And the developers can repay the favor, informing testers of shortfalls in their tests and ensuring smoother test execution throughout the cycle and, ultimately, that a higher-quality product is delivered faster.

When using a Continuous Integration (CI) automated process, code can be validated against the requirements the second it is sent to commit. As Natural Language automated tests have already been authored, there is no test authoring post-commit. Test automation has taken yet another step to the left, especially with the rise of Continuous Testing. Testing encompasses the coding stage with tests written before and executed both during and immediately after implementation.

Reducing end-to-end testing

With Virtuoso, end-to-end testing can start earlier, as the tests can be authored before the application is created. In addition, the reliance on the end-to-end testing process has been diminished as testing teams and DevOps teams have worked together more efficiently, found bugs and regressions, and improved tests. But that is far from it. As Virtuoso finds elements like a human and does not rely on selectors, tests are self-healing. If an element changes slightly, Virtuoso will understand that change like a human would, ensuring that all tests are robust, low maintenance, and self-healing.

Maintenance in production

Production systems are live systems, which means after deployment, the system keeps evolving, databases grow in data, performance may suffer degradation over time, and it may be too late before this is noticed. Virtuoso has built-in production monitoring, ensuring that you only need one test automation tool for your entire SDLC.

Shift-left has revolutionized the SDLC and brought countless benefits. However, third-generation test automation tools such as Virtuoso allow us to build on the benefits shift-left has delivered. We can reimagine the SDLC, shift test authoring left, execute tests earlier, and dramatically reduce test maintenance. We are in a new era of test automation, and teams will need to embrace new technology and models if they are to keep pace with an ever-changing industry. Those who do will stand on the shoulders of giants and see their teams deliver even higher quality products even faster.

Subscribe to our Newsletter