Forum Discussion
Hi Collin,
I am also trying to update Test Case result in VSTS using REST APIs. I have identified the REST APIs but I am struggling with the Authentication part of it. Could you please help me with that.
Let me know the info you need.
Best Regards,
Yusuf
Hi Yusuf,
[Update]
===============
Ah, got it - you like to use VSTS API to do something in VSTS unattended...
In this case you need to read the documentation for VSTS API. And, maybe, talk to your network admins to figure out how it is setup in your company. Most probably it is integrated with your domain, so you will need to make a call to some authentication service to get a token and use the obtaibed token for subsequent API calls.
As I suggested, recording of http traffic that is generated when you do required action from VSTS UI manually may help.
===============
As it has already been mentioned, SoapUI (https://smartbear.com/product/ready-api/soapui/overview/) is much more handy and functional for API testing and is integrated with TestComplete.
If you need to use TestComplete for your API testing, then (unless the tested API is appropriately documented) I would recommend to use some http-recording tool (Fiddler, for example) and record the traffic that is generated when you access this or that API method manually (e.g. using Swagger or a regular browser). Then you need to consider the recorded traffic to understand what parts of it should be parameterized and code it.
Note 1: Depending on your API design, you may be required to call some authentication mathod first to get that authentication token that must be used in subsequent calls. Or provide authentication info (login/password) for every API call.
Note 2: Consider the aqHTTP object that was introduced in TestComplete since the thread was started.