Want to see Parasoft in action? Sign up for our Monthly Demos! See Demos & Events >>
Parasoft has always had one core mission – simplify test automation – and this is evident in the entire Parasoft tool suite, from static analysis to environment simulation with service virtualization. But the idea of simple has never been more present than in the most recent release of SOAtest. In this release, we removed the complexities associated with API testing by creating a simple and elegant solution to help organizations not only get started with API testing but also lay the foundation for a scalable and maintainable API testing strategy that supports agile development.
Our CEO Elizabeth Kolawa had one simple guideline as we discussed developing this new test automation idea. She said, “make it easy.” That simple statement turned into a deep analysis of the current challenges associated with testing in the modern era and led to a key realization:
The tools in the software testing industry have not been focused on simplicity for the agile world.
Agile is primarily a development-focused activity. In its most basic terms, agile is a software development methodology where typical SDLC activities that would traditionally span over the duration of a project are broken down into much smaller pieces called sprints. Typically, a sprint is 2 to 3 weeks and in a Sprint, development activities are focused on new features and enhancements.
One sprint looks something like this:
A sprint starts with the design and creation phase, where the new functionality is split up into user stories, scoped, and then development immediately starts building something. At the end of the sprint, there may or may not be release activities, but no matter what, feedback is obtained and then another sprint begins and the process repeats itself over and over again.
Agile allows organizations to turn on a dime because the feedback collected during each sprint can be applied to the next sprint and help to guide, shape, and focus the project. This works great for development, but if you look at the test portion of the sprint, it starts to get complicated.
Test does not get access to test the new features and enhancements until well into the Sprint, and for logical reasons. The testing team needs to wait until the development team has built the full functionality, so test is always a little bit behind development right from the beginning.
This problem only intensifies as the sprint continues and testers rely on UI testing (manually interacting with the user interface). UI testing is the most common testing practice because it’s easy to use – it’s easy to associate actions in the UI with the user story, it’s easy to scale across a large body of testers, and because of record and playback functionality, it’s easy to do an initial round of automation.
But there are many problems with UI testing:
Each one of the above factors can lead to significant delays in a sprint, but when you take into account how a traditional project cycle works, it’s a series of these sprints followed by a hardening or regression cycle.
At each step of the way, test is struggling to keep pace with development – but because of the test techniques traditionally used, they can never get the total and complete comprehensive testing that they want.
It looks something like this:
Typically, they will be able to validate the new features and capabilities, but fall short of complete test coverage.
This is frustrating for a lot of testers, but it’s not their fault — it’s just the nature of the beast given the capabilities that exist in the tooling market. The dangerous part is that without these quality practices, defects are leaking into production and eroding the perceived benefit gained from agile.
Everyone agrees that API testing can more precisely pinpoint the root cause of defects than UI testing because API tests are closer to the code, easier to automate, and more resistant to application change. Also, API tests offer a better form of defect reproduction and communication between development and test because the test artifact represents the convergence of those two areas. (In a recent blog I explored API testing, what it is, and how to build a comprehensive API testing strategy. You can read it to get more information about this extremely effective testing practice.)
Testing at the API layer is a great practice for agile development, specifically because it enables testers to validate functionality given the compressed timeline, and API tests are highly reusable.
Additionally, API tests have the following advantages that simplify and support agile testing:
If an API test fails, you can be pretty darn sure you know approximately where to look in the code. Developers love getting API tests from testers because developers can execute them directly against their application without having to hook up the entire environment. And they can continuously rerun them as they are starting to fix the defect.
The lower time-to-defect remediation means that in general, development can fix a bug faster when provided an API test vs UI test. When considering the time frames involved in agile, this is exactly what we need. Once a defect is discovered, an API test is provided to development, which they can use to find, fix, and validate the defect, all without having to rebuild the entire application, which saves a tremendous amount of time. This is exactly the kind of speed we need for agile
APIs represent the invisible communication that takes place behind the scenes of an application. The invisible nature of the communication helps the automation process. There is significantly less complexity involved in getting an application to the point where you can start interfacing with it at the API level than would be required to stand up an application in its entirety so you could operate at the UI level.
As a result, API tests can easily be run in automation at earlier stages of the SDLC. Most of my customers run them at the same time they are running their unit tests as a function of code check-in. These API test runs can also be associated with the bug tracking system in a much easier way so that when defects are resolved, the accompanying API tests can easily be handed back and forth between development and test. This significantly reduces the overall handoff process because instead of filing the defect, providing the steps to reproduce, and then waiting for a new build from development, testers can receive notifications from the bug tracking system that a defect has been resolved and see the automated test cases that validate the resolution. Those API tests can easily be built into a regression suite and reused over and over.
As a part of our research, we saw that 80% of development time was spent on managing and updating UI tests that had broken as a result of change. Change is a big time killer when it comes to agile, but because of the increased code check-ins and shortened time frames introduced with agile, change is constant.
If an organization has exclusive reliance on UI testing, application change can be devastating because many of the test cases that have been built to validate critical functionality simply stop working. One of the main principles of agile is the ability to turn on a dime, which means that UIs and functionality are changing all the time and the burden of supporting and maintaining those tests can become overwhelming for test teams. On the other hand, API tests don’t even see the UI. APIs also have specific versioning capabilities built in, that allow testers to maintain stability as the application is undergoing change. Additionally, APIs are defined with the service contract that can be leveraged to update test cases as the application undergoes these changes.
API tests can save agile by giving an organization the ability to easily test an application at the earlier stages of development as well as provide an effective communication mechanism between development and test that is highly resistant to change. Organizations that adopt API testing as a fundamental piece of their testing strategy can leverage the agility they provide to really get ahead of the testing challenges.
Even with all of the benefits that come from API testing, the industry is still focused on UI testing:
We believe this is because testers don’t know how to test the API and/or don’t know how their application is using the APIs. It’s not immediately apparent where to get started API testing an application, and understanding how to assemble all of the “puzzle pieces” together in a meaningful way requires domain knowledge of the application.
Since organizations still tend to leverage a centralized testing practice, testers need intimate knowledge of all the different application interfaces and know how to stitch them together properly. It’s not a trivial task.
API testing is still considered no man’s land. In a recent survey, we asked a series of developers and testers who is responsible for API testing in their organization.
As you can see, there’s some confusion as to who is ultimately responsible for API testing. We’ve been interested in solving this problem. We believe that API testing is the responsibility of both developers and testers, in different forms, but it is this disconnect that leads to low API test coverage.
Testing at the API level requires specialized skills and tools in order to get comprehensive test coverage. It’s not intuitive. There are tools that exist in the market that are trying to help organizations build an API testing strategy, but the vast majority of them require a high degree of technical expertise to build comprehensive API tests. Additionally, testers still need to understand how the APIs work, which requires domain knowledge. As a result, organizations tend to do the bare minimum for API testing, which is the opposite of what we need for agile.
Why AI, why now? The only way to solve this industry problem is to build tools that take the complexity out of API testing. We have been working in the software test automation space for three decades, and in that time, we have amassed a lot of data to help us understand what’s required for building a comprehensive API test. Today, artificial intelligence is helping us leverage that expertise to simplify the challenge of API testing for testers across the industry.
The new Parasoft SOAtest Smart API Test Generator was built from the ground up to help take the complexity out of API testing. The Smart API Test Generator is a plugin for Chrome that uses artificial intelligence to convert manual UI tests into automated API tests, lowering the technical skills required to adopt API testing and helping organizations build a comprehensive API testing strategy that scales.
So how does it work?
The Smart Generator monitors background traffic while you’re executing manual tests, analyzes that traffic, and uses artificial intelligence to automatically build a meaningful set of API test scenarios. When building those API tests, the Smart Generator first identifies API calls, then discovers patterns and analyzes the relationships between them, so it can generate complete API testing scenarios, not just a series of API tests.
The Smart Generator provides testers with an easy place to start building API tests, so they don’t have to touch the difficult activities associated with manually building API tests, i.e. finding the correct service definition, understanding the data payload, or running a test over and over again to understand the relationships between requests and responses so you can start building assertions.
Instead, the Smart Generator does all of this heavy lifting automatically, based on activity it observes while the tester is using the UI. This helps novice users get a greater understanding of API testing in general because they can map the activities they performed in the UI to the API tests that were created, and build a greater understanding of the relationship between the UI and the underlying API calls, helping drive future API testing efforts.
Although API testing is one of the most effective software testing practices, many organizations haven’t successfully adopted the practice because it requires specialized skills and tools. To help organizations adopt a comprehensive API testing practice, Parasoft SOAtest provides visual tools that are easy to adopt, enabling API testing beginners to start creating powerful API scenarios in less time than with other tools. The Smart Generator bridges the gap, bringing novice users into the API testing world
Agile development helps organizations deliver quality software to market faster, but without needed technology to help organizations fully test their applications at speed, the risks associated with accelerated delivery erode Agile’s potential benefits. Now is the time for organizations to get smart about API testing.
A solid API testing strategy will allow organizations to get the most value out of their agile transformations. To make this a reality, testing tools should work for us, and the latest release of Parasoft SOAtest does just that. SOAtest’s new Smart API Test Generator lowers the complexity associated with API testing, lowers its adoption barriers, and helps organizations bring in a manageable, maintainable, and scalable test strategy. Try it for yourself!
A Product Manager at Parasoft, Chris strategizes product development of Parasoft’s functional testing solutions. His expertise in SDLC acceleration through automation has taken him to major enterprise deployments, such as Capital One and CareFirst.