DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • API Governance, a Simple Complexity
  • What Is API-First?
  • Microservice Architecture and Agile Teams
  • API Testing Frameworks: How to Pick the Right One and Actually Use It Well

Trending

  • Guess the Speed: Building a Family Internet Speed Guessing Game
  • Building IoT Time-Series Applications With Java and Apache IoTDB
  • When 12 Hours of Offline Changes Collide: Designing Conflict-Safe Mobile Sync
  • How to Format Articles for DZone

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. ''AAA'' API Testing - Accessible, Affordable, Agile

''AAA'' API Testing - Accessible, Affordable, Agile

How Service Virtualization addresses the growing challenge of testing third-party APIs.

By 
Heather Peyton
·
Sep. 22, 16 · Opinion
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
5.9K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

APIs are at the core of today’s digital economy and have become boardroom-level topics of discussion.  And with third-party APIs now being used by core systems, it’s more critical than ever for data to be secured and systems to be well tested.  This is hard enough to do when working with an internal API, let alone when integrating an API from a third party, which companies like Jet.com have painfully realized. Michael Joseph sums up the challenges up of testing third-party APIs very well:

Verifying integration with third-party services is a pain in your wallet. Those services, which are vital to your success but not under your control, are difficult and expensive to access, they change without notice, and you don’t control their performance.

This is further reinforced in the Voke Market Snapshot on Service Virtualization in which 79% of participants reported third-party restrictions, time limits, or fees for the services or applications they needed for development and testing. In addition, API access and fees vary greatly by provider. Understanding contract terms and associated fees can be complicated which can make estimating costs associated with development and testing difficult.

If that’s not enough, there is the challenge of all the dependencies that come along with APIs. How do you even know where all of the dependencies are? How do you test all the dependencies? Tested alone an API may work fine. But once deployed it may no longer work or it may work poorly due to a related API that is slow, broken, or missing.

Enter API Testing from CA Technologies

CA Service Virtualization offers a solution to many of the challenges associated with third-party API testing. It won’t prevent things like outages or changes made by the provider but it can make the API accessible and affordable to test so that you can support agile testing and development.

Service Virtualization is used to simulate the APIs, data and dependencies so that integration and performance testing can take place earlier in the software development lifecycle. By creating a simulation of the API that behaves just like the real one, you can test whenever you want and as much as you want.

In addition to providing an automated solution for generating virtualized APIs it offers advantages over other testing methods (like wrappers, mocks, or stubs) by being able to effectively execute and handle:

  • Race conditions – system delays, time outs or things happening too fast
  • Errors coming from the target
  • Data collisions and conflicts
  • Tests that rely on previous data population

The Voke report addresses this further stating that “stubbing and mocking can create quality problems in the underlying software. The reason: Stubs and mocks may not be an accurate reflection of the complete or final behavior of the dependent resource. That, in turn, can create a cascading set of problems, from introducing unnecessary and undetectable defects to functionality failures and increased costs to rework the code.”

How Does Service Virtualization Do It?

Service Virtualization captures the needed information to use code contracts like WSDLS, or it can use Request and Response pairs. To create the services it focuses on capturing the protocols.  Virtual Services have 2 layers of protocols – transport protocols for handling things on the wire and supporting TCP, HTTP, MQ, JMS, etc., and data protocols that interpret message formats such as SOAP, REST, JSON, etc.  You can mix and match those as needed to support a third-party API.  Most third party APIs will conform to one or more of these standards and can be virtualized out of the box.

The virtualized API can then be deployed in various Virtual Service Environments (VSEs) so developers and testers have everything they need when they need it.  Virtualized APIs can also be deployed across the entire production cycle. Developers can leverage for unit tests, QA can then leverage for functional, integration, regression and performance teats. Automated tests can be created and run as part a continuous integration cycle.

The ability to switch between live and virtual services also plays into what we call image validation. Sometimes live services change. It is important to periodically look at the comparison of what you see when you run a test against a virtual service vs. a live service to see what has changed over time.  This way we you know how services evolve. Our API Management solutions can also help you accomplish this. All of our virtualized services can be built to know where the live services sit.

And that’s just the beginning. There are many more advantages to using Service Virtualization. Learn more by listening to our recently recorded webcast “Accessible and Affordable 3rd Party API and Microservice Integration Testing” or browsing thru the articles on www.servicevirtualization.com.

API API testing microservice Service virtualization Software development agile

Published at DZone with permission of . See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • API Governance, a Simple Complexity
  • What Is API-First?
  • Microservice Architecture and Agile Teams
  • API Testing Frameworks: How to Pick the Right One and Actually Use It Well

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook