TestNG for API testing

213 views
Skip to first unread message

Zakir Sayed

unread,
Apr 23, 2014, 1:06:53 AM4/23/14
to testng...@googlegroups.com
Hi,

I understand TestNG is a test framework to run Java code. In my current company we use SOAP-UI and TestComplete tool to perform all our API testing. We have setup even for end-to-end testing.

Now, I am planning for a job change and this new company wants me to create an Automation framework for API testing using TestNG. I heavily used TestNG to run Selenium (WebDriver) test but never used it for API testing. So, wondering what could be the plan of this new company to use TestNG for API testing.

My good guess is that they want to use Java for both UI and API testing. They plan to use WebDriver for API and maybe use some external library to test Web Services using TestNG test framework.

Any of you have used or implemented something similar to my new company methodology? 

Krishnan Mahadevan

unread,
Apr 24, 2014, 3:11:17 AM4/24/14
to testng...@googlegroups.com
To begin with, I fail to u'stand how this question is in ANY WAY related to TestNG.

TestNG merely enables you to get your tests [ unit (or) functional ] to run and helps you with providing mechanisms for test reporting as well.
From TestNG's perspective : How is API testing any different from a Web based test (powered by Selenium) ? Both of them are basically tests that do something thing on an AUT (Application Under Test).

There are many ways in which one can test Web Services [ from resorting to simple httpclient driven get/posts on an end point with the request as a string ] to using sophisticated methods such as using WSDL to generate client stubs and then work with it.

In any case, I dont think this is a question that is related to TestNG in any way.





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Zakir Sayed

unread,
Apr 24, 2014, 12:49:05 PM4/24/14
to testng...@googlegroups.com
Thanks for the reply and I apologize for your frustration on a question asked by novice testng user.

Please share what libraries you used for basic testing of Web service or advanced one?

Suraj Ray

unread,
Apr 25, 2014, 3:20:43 AM4/25/14
to testng...@googlegroups.com
See API testing can be done using testNG/Junit. You don't have to do anything specific fr a webservice/API testing. It is just that you have to form the API urls and along with external java lib (Apache client, HTTPUrlConnection, Jboss resteasy) you have to post/get your requests.

Regards,
Suraj


On Thu, Apr 24, 2014 at 10:19 PM, Zakir Sayed <zaki...@gmail.com> wrote:
Thanks for the reply and I apologize for your frustration on a question asked by novice testng user.

Please share what libraries you used for basic testing of Web service or advanced one?
Reply all
Reply to author
Forward
0 new messages