Software testing is such an integral part of the modern IT industry that sometimes we forget that back in the day, there wasn’t even a specific testing phase of software development. Now, engineers build their entire career on testing software before release, and Quality Assurance has become a key aspect of the development cycle.
Consequently, numerous terms and ideas get thrown around with regards to testing. These days, it seems that the two words on every software developer’s lips are shift left. In this article, we’re going to explore this term and see what it looks like in software testing. You will learn what it means, how it’s done, and why it can transform your approach to testing when combined with emerging AI technologies.
What does ‘shift left’ mean?
To understand what it means to shift left, we need to take a look at the workflow model in the software development world. Since the 1970’s, most developers have followed a waterfall model. This type of workflow essentially means that one thing leads to another - like water cascading down a waterfall.
If we take a regular software development project, then we’d usually see a workflow very similar to this:
As such, if you look at this whole process going from left to right, then you find testing all the way over on the right-hand side. Most such projects go a little like this; the people in charge of the product will talk about the different requirements they have for different systems, and then they’ll reveal their ideas to the developers. From here, the developers start thinking about various features, analyze what needs to be done and work on designing the program. Then, the coding begins as the project finally starts to take shape and reaches a stage where it’s almost ready to be released. Finally, testers come into play and take a look at the code to see how it holds up.
It’s very common for testing to be pretty much the final stage in the process. All that comes after it is the release of the software itself. What’s more, testers are rarely brought into the equation at any other stage of the development cycle. They have no input anywhere else, they just turn up for the tests, and that’s it. The issue with this is that testing often ends up feeling very rushed as companies are frantically trying to get the final product released on time, even at the risk of cutting corners. Agile approaches to software development were meant to help address this issue. However, even with agile development, testing is often seen as the final stage in the process.
This is where the concept of shifting left comes into play. The best way to explain this is to look back at the example workflow model above. Instead of testing being all the way over on the right, we shift it left a bit and bring it in earlier during the cycle. Many companies have already adopted this approach and bring testers in right from the very beginning when the product requirements are being talked about. Some only bring them in during the design phase, but the general idea is to avoid leaving testing until the very last stage of work.
Of course, testing can, and should, still be there at the end, but there should also be proper testing throughout, rather than just having it at one point the week before release.
Why should we shift left?
The concept of shift left is far from a brand new idea. It just seems that way because more and more companies are changing their ways and the term is being bandied about like it’s a revolutionary thing. In reality, you can trace this concept back to the 1950’s in the early programming days. Back then, people knew that it made far more sense to test as early as possible. In those days, runtime resources on mainframes were extremely valuable. Coders were encouraged to make sure none of their code contained errors as these were so wasteful and expensive. So, they didn’t hire people to be testers, they developed their own code and tested it properly themselves.
Going from this to the waterfall workflow was a function of software projects becoming larger and being treated like other engineering projects. When you are building a bridge, the waterfall model makes a lot of sense! What’s surprising is that it’s taken until now for developers to realize that the waterfall model was a backward step for many software projects. Now, every team needs to shift left and stop thinking of testing as just the final stage before release. Why? Well, there are some very clear benefits that show why shifting left is the right thing to do.
Firstly, shifting the testing phase will enable you to spot problems earlier on. As such, you can continuously work on improving a piece of software as it’s developed, rather than waiting until the final phase. If you didn’t shift left, then all problems with the coding or design of the software would only be found by testers very late in the process. This makes it much harder to rectify any big mistakes, and it usually costs a lot of money as well. Of course, good coders know they need to use unit tests when writing their code, but shift left is about much more than just unit testing.
So, finding problems early on can and will significantly reduce the cost of the overall project. Who knows how often teams waste money and resources working on something, only to find out that there’s a fatal defect just before it’s being released. If the problem was found earlier, then it could have been fixed before loads of money was wasted on it.
Secondly, shifting left means you’re more likely to iron out all the problems. Testing multiple times at every stage in the workflow means there are more opportunities to spot problems. Testing at the very end means you often only get one shot, which leads to software being released with hidden defects, which in turn leads to unhappy customers.
Finally, testers are the ones that understand how the whole software system works from a customer viewpoint. After all, they test it with the customer in mind. By bringing them to the party right from the beginning, the focus can be on usability and customer desires. This helps create a product that’s much better since it focuses on designing for the customer.
When all is said and done, the biggest reason to shift left is that there are absolutely no benefits to leaving testing later on. Shifting left has the possibility to improve things, so why would you bother sticking to the same old waterfall workflow?
What does shift left software testing look like?
One of the vital components of shift left testing is a test automation tool. It will be borderline impossible to do this without test automation, mainly because shifting left means you’ll be testing earlier on, more frequently and a lot faster too. There just isn’t enough time or resources to do this manually, so automation has to play an integral role.
Having a test automation tool isn’t the only thing you need when shifting left. Ideally, you should put together a development team that includes testers at its heart. Your team should comprise of people from all stages of the product development process. We’re talking about a product manager, an analyst as well as the developer of the code themselves. This team acts as a unit and will do pretty much everything together - even if it doesn’t fit under the job they specialize in. As an example, the whole team will look at code together, they’ll carry out tests as one, and they’ll all be present at any business meetings, etc.
As the team continues to work together, your test automation tool will help identify any defects or issues with the product. Therefore, everyone is alerted to them and they can work together to find the best course of action each time. Essentially, the idea is that you have one collaborative team - including a tester - rather than developers working individually and bringing in a tester at the end.
It’s important to note that shifting left is going to be a significant change in your organization. While the concept is old, it may be brand new to you. So, make sure your team continually provides feedback and talks to one another about how things are going. If they don’t like aspects of the new working arrangements, they can suggest solutions and try to find the perfect balance that allows shift left testing to thrive.
Artificial Intelligence and shift left software testing
We mentioned that test automation software is a crucial part of shift left testing. In fact, it could be argued that this whole idea wouldn’t be possible if we didn’t have software available to carry out tests automatically. Now, we’re starting to see artificial intelligence creep into the world of shift left software testing. This technology is being used to aid the shift left movement, and we’ll explain how.
Artificial intelligence can call upon techniques such as machine learning to completely alter the way test automation is carried out. Here at Functionize, we’ve developed autonomous test software. This means that numerous tasks can be carried out without the need for human input. For example, you can type out a test plan in English, and it will be automatically converted into a functional test case that runs autonomously. This dramatically reduces the time spent working on tests as you no longer need to go through the effort of scripting them correctly, you can just create them in English. This also means everyone on the team can contribute to creating new tests without needing specific expertise.
What’s more, artificial intelligence can operate at a much higher and more advanced level than humans. What we mean is that a human is only capable of doing so much in a set period. But, Functionize’s AI-augmented test system means you can now execute thousands of tests in minutes. Again, this speeds up the whole development process quite considerably.
There are other intriguing ways that AI has aided shift left testing. With machine learning, an AI-powered test automation tool can learn what a tester is looking for in a piece of code. It knows what problems to watch out for, and it can spot them way faster than any human would be able to.
Perhaps the most exciting development is the idea of tests that require zero maintenance. Artificial intelligence will run tests, diagnose any failures by itself, and then figure out the cause of the failure, reducing test maintenance. If it’s a failure in the test, rather than the product, then the system can fix itself. This concept is called self-healing, and it’s an absolute game changer. This type of technology is precisely what’s needed for the shift left ideology. It essentially means that you can continuously run tests that spot problems and fix them with minimal human input. You iron out the creases, which means the final testing phases should be very quick and have hardly any problems to contend with.
Understandably, this type of testing won’t be applicable to every single scenario. There will be things that can’t be automatically solved as they need to be checked by a human. However, AI Diagnosis is another piece of technology that can lend a helping hand. The idea with this is that analysis is carried out to determine all the possible causes for test failure. So, the tester can then look through the list and see which one is most likely the culprit.
The world of artificial intelligence and shift left testing is still very new. As time goes on, more and more technology will be introduced to help make shift left testing more manageable and achievable for all organizations.
Shift left: A Summary
The purpose of this article was to introduce the idea of shifting left in software testing. To shift left simply means we should no longer leave testing until the very end. Instead, we should integrate testing throughout the whole workflow process - from beginning to end. By doing this, you can save money, get things done a lot quicker, and end up creating a better product.
To make shift left testing possible, you need some form of test automation software like Functionize. Integrating artificial intelligence into this software makes it more powerful and makes it much easier for companies to start shifting left. If you haven’t already tried shifting left in your team, now is the time to give it a go. As we said earlier, there’s no downside, and you could see your development process being transformed.