Hi,
i developed some peace of coded to report the results of Ranorex Testsuite to a Teamfoundation Server. For this scenario I need a mapping between a testcase in Ranorex and the testcase in TFS (work item id).
I did this in an easy way and put the TFS-ID in the title of the Ranorex testcase. I.E. this looks like "10865_Testcasename". After the testsuites finishes I pass the ActivityStack to my TFSReporter class an do the reporting.
This is not very comfortable if you have a data driven testcase with n iterations.
Do you have any ideas how to solve this problem? Another idea was to store the TFS-ID in a parameter of a testcase/Iteration.
Storing TFS-IDs in testcases to use TFS API
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Storing TFS-IDs in testcases to use TFS API
Hi bennylew,
I am afraid we are of little help here.
I can just provide a link to a resource which might be interesting for you.
Here is the link: HowTo: Test Automation with TFS and Ranorex.
Regards,
Markus
I am afraid we are of little help here.
I can just provide a link to a resource which might be interesting for you.
Here is the link: HowTo: Test Automation with TFS and Ranorex.
Regards,
Markus
Re: Storing TFS-IDs in testcases to use TFS API
Hi Markus,
thanks four your reply. We want to go both ways, the one you provided and my way, with the TFS api. In our Company there are some problems with the infrastructure that makes it difficult for us to implement your way.
Does your Team plan to offer Interfaces to different ALM tools (TFS, Jira, Rational) in the future?
Regards
Benjamin
thanks four your reply. We want to go both ways, the one you provided and my way, with the TFS api. In our Company there are some problems with the infrastructure that makes it difficult for us to implement your way.
Does your Team plan to offer Interfaces to different ALM tools (TFS, Jira, Rational) in the future?
Regards
Benjamin
Re: Storing TFS-IDs in testcases to use TFS API
Hi Benjamin,
It sounds like your TFSReporter class already has the ability to post test results for a TFS TestCase work item ID (that you extract from the Ranorex test case name) to a new test run in the TFS project, so that's a great start!
Have you tried using the ITestCaseResult.CreateIteration() method, msdn.microsoft.com/en-us/library/microsoft.teamfoundation.testmanagement.client.itestcaseresult.createiteration.aspx, to create a new instance of an ITestIterationResult for each of the n iterations and add it to the ITestCaseResult instance before it is saved?
There's a code snippet in this article that may be useful: vivekbansod.blogspot.com.au/2013/06/create-test-case-step-result-using-tfs.html.
Some other TFS API snippets: blogs.msdn.com/b/aseemb/archive/2012/08/07/code-snippets-on-test-management-apis.aspx
Sorry for the format of the URLs in my post, I cannot post URLs yet since my account is new.
Hope this helps,
Gabriel
It sounds like your TFSReporter class already has the ability to post test results for a TFS TestCase work item ID (that you extract from the Ranorex test case name) to a new test run in the TFS project, so that's a great start!
Have you tried using the ITestCaseResult.CreateIteration() method, msdn.microsoft.com/en-us/library/microsoft.teamfoundation.testmanagement.client.itestcaseresult.createiteration.aspx, to create a new instance of an ITestIterationResult for each of the n iterations and add it to the ITestCaseResult instance before it is saved?
There's a code snippet in this article that may be useful: vivekbansod.blogspot.com.au/2013/06/create-test-case-step-result-using-tfs.html.
Some other TFS API snippets: blogs.msdn.com/b/aseemb/archive/2012/08/07/code-snippets-on-test-management-apis.aspx
Sorry for the format of the URLs in my post, I cannot post URLs yet since my account is new.
Hope this helps,
Gabriel