API Testing and Continuous Integration Leveraging continuous integration to guarantee API quality David Parker – Director of Strategic Alliances Sanketh Shanbhag – India Technical Lead SmartBear Software, Inc.
We’ll be covering: API testing in the software delivery pipeline Obstacles doing API testing in CI What’s required David Parker Director SmartBear Sanketh Shanbhag India Technical Lead SmartBear
Continuous Integration - Definition Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run.
Advantages of CI Improve software quality Fast feedback on iterative changes Find and address bugs quicker Reduce the time it takes to validate and release new software updates
Obstacles to Doing CI for APIs Unreliable tests Actionable results Automation Availability
Unreliable tests Challenge API’s are often highly interdependent making tests hard to build and maintain Current State It is not hard to test a single API function, but stringing functions and tests together requires extensive scripting Impact Tests are brittle and need constant refactoring, impacting quality and time to market
Actionable Results Challenge Getting results quickly, distributing those results to the right people and taking appropriate action on them Current state API tests take too long and results are often obscure Impact API quality suffers while the team has a false sense of confidence as APIs go into production
Automation Challenge Commitment of full-scale automation required for CI is often lacking Current state Status quo works and there is investment required to flesh out a CI harness Impact Time to market, quality
Availability Challenge The interdependent nature of APIs means you need to test APIs together. Current state Dependent assets are often not available as they too are in development Impact Time to market, quality
What’s required – Better Test Reliability Express your API tests in a scriptless manner String unit tests together with stateful transfer Use point and click test workflow cdesign Simplify your environment refactoring
What’s required – More Actionable Results Distribute your tests across the network to speed test execution Use purpose-built API functional and load testing Customize reports and distribute in various formats Automate report distribution
What’s required – Full Test Automation Simplify API test expression Directly integrate API tests into Jenkins or other CI frameworks Automate functional testing, load testing and virtualization
What’s required – Service Virtualization Simplify the creation and management of virtual services Make it affordable Tight integration into functional and load testing Ability to easily generate “virts” from a specification framework like Swagger
Best Practices Enhance developer responsibility (and accountability) for API quality Don’t try to “boil the ocean” implementing API testing on day 1 But ultimately, automate, automate, automate Pay attention! Take note, and correct, persistent problems
SmartBear Technology Stack
Thank you! David Parker Director, Strategic Alliances Email: david.parker@smartbear.com Thank you! SanKeth Shanbhag Presales Engineer Sanketh.Shanbhag@smartbear.com