Ask a Question

TestComplete Integration With Microsoft Visual Studio and validating test result

nancypnp
Occasional Contributor

TestComplete Integration With Microsoft Visual Studio and validating test result

Hi All,

 

I have integrated TestComplete 10.5 with Visual Studio 2010.

And able to execute my test.

 

But i want to validate the test results in Visual Studio.

like i call a function from test complete or a test Item and check the result in my Visual Studio code.

 

Please help me with the same.

2 REPLIES 2
Colin_McCrae
Community Hero

Re: TestComplete Integration With Microsoft Visual Studio and validating test result

There is no built in functionality in TestComplete that allows this. (That I know of - there wasn't when I built all this!)

 

But you can write your own and update tests using the API TFS provides.

 

https://www.visualstudio.com/en-us/docs/integrate/api/test/overview

 

I've extended my framework (uses Script Extensions - https://support.smartbear.com/viewarticle/69987/) to allow me update TFS via the REST API. But I'll warn you in advance, it's a bit awkward to work with and there are still a couple of bugs in there. (It's a relativey new API for TFS)

 

Bugs I know of:

 

1. When you update a "Case" within a "Run" container, it should reflect back on the "Point" (test) in the "Suite" that spawned it. It doesn't. For the moment, I'm not using Test Runs. I update the test directly to pass or fail within the suite.

 

2. Again, in a "Run" (so not currently in use due to point 1 above), when you complete a run, there is a flag in the API call to flag it as complete which should set all unused tests to "Not Run". This doesn't work at all. It does nothing.

 

The documentation is also a little incomplete in places. And the structure can get a little complicated. You have to be careful how you address things. Especially something like a regression suite which gets added to a copied over every time a new Test Plan (stage in a project) is created. The suite name and contents don't change, but the ID does. So best address Suite's by Name, tests by ID (test ID's don't change when a Suite is copied) and the overall plan by ID (as this only be declared once and should not update often).

 

I have all this info, along with TFS authentication credentials, API version numbers, TFS URL's, TFS on/off flag (make sure you build in the ability to turn TFS updating off if you need to!!! Very easy to spam it with false positives from automated tests!) in a small initialisation routine. After that, Suite Names and Test ID's are embedded into the test steps as the data driver sheets are built and away they go.

 

Took a little setting up, and will vary depending how your place uses TFS, but it's do-able.

 

(Works with both on-site and online versions of TFS - I've tried both. You need to be on a version that has at least API version 2.0-preview to get all the calls into Test areas if I remember correctly.)

nancypnp
Occasional Contributor

Re: TestComplete Integration With Microsoft Visual Studio and validating test result

Thank you for the reply.

cancel
Showing results for 
Search instead for 
Did you mean: