How To do API Testing using Selenium

  • 1 Replies
  • 976 Views
How To do API Testing using Selenium
« on: May 11, 2016, 07:39:47 am »
Hello Everyone,

can any one please tell how we will be able to do API testing using selenium. and what exactly we need to for the same.

I did some some search on google and found a good example in this post -

https://seleniumbycharan.wordpress.com/2015/07/26/api-testing-using-selenium-webdriver-and-java/

but i don't know how it works in real time or what extra things we need to do so if some one having experience, please share.

Thanks in advance  :)

*

Hari Charan

  • *
  • 5
  • The More You Learn The More You Play
    • Automation Guide
Re: How To do API Testing using Selenium
« Reply #1 on: May 19, 2016, 17:30:52 pm »
Hi Narendra,

It depends on the functionality of your application. The article which you're referring was just an example to show people, how we can use selenium not only in functional but also in terms of API Testing as well. I can give few scenarios where we can utilize the script

Scenario: Creating multiple users
Given I have installed my app in my mobile phone
When I want to use the app
Then I should register myself from the app
And I should see Home page of my app with some greeting message

To test the above scenario, we need a device to register. What if I want 1000 users to get registered? What if 100000?? So here I'm testing functional and as well performance by automating API and sending requests through code.

Scenario: I need to check the data published from dashboard (web app) should be displayed in mobile apps too.
What are we supposed to do? For sanity check, we can test API response whether we have got the right data or not.

Hope this info helps you.

 

Sitemap 1 2 3 4 5 6 7 8