August 17

Can You Use Selenium Testing for API Testing?

Selenium API Testing

One question that came up during this year's Automation Guild session on Testing RESTful APIs with Rest-Assured with Bas Dijkstra was whether you can use Selenium for API testing.

This is actually a question that, surprisingly, I get asked all the time. But I liked Bas's answer in our TestTalks interview and during the Automation Guild Conference so much that I decided to share it with you.


Get FREE Training

How do I incorporate API testing with my Selenium Testing functional tests
Selenium is not a tool for API testing
For more API Testing Awesomeness

How Do I Incorporate API Testing With My Selenium Testing Functional Tests

As I mentioned, whenever I talk about API testing, one question that probably comes to mind to most testers is, can I use Selenium for API testing, and if not, how do I incorporate API testing with my functional tests?

Bas pointed out that he actually wrote a blog post on this fairly recently on what Selenium is and what it is not. Because he also sees this question quite often, surprisingly often on media such as LinkedIn or specialized test automation forums and Twitter even.

For anybody who knows a little about Selenium web drivers that it's a … I'm not even calling it a test tool per se, because it's a browser automation tool that simulates the interaction of a user with a browser. It does not simulate the interaction of a user of a system we make.

Selenium Is Not a Tool for API Testing

That should make it pretty clear that Selenium is not a tool for API testing.

Well, of course, if you have a user interface-based or custom framework which is built around the Selenium web browser, you could easily extend that framework to include API testing, but you need a different tool or library for doing that.

One of those libraries that Bas uses is Rest-assured. The Serenity framework also has nice integration for Selenium Testing and Rest-Assured, which you should check out.

For More API Testing Awesomeness

For those of you that missed Bas and all the other awesome speakers at this year's Automation Guild Conference –no worries! Due to demand, I decided to keep registration open.

So you can still get all pre-recorded sessions and recorded Q&A now!

Join Now at No Cost!

About the author 


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Use this Bottom Section to Promote Your Offer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim