Get TestRecord content via C#

Description
MaxPower79
Posts: 1
Joined: Mon Sep 18, 2017 9:56 am

Get TestRecord content via C#

Postby MaxPower79 » Mon Sep 18, 2017 11:38 am

Hi all,

currently I'm writing a script for exporting all TestRecords for a TestCase WorkItem with webservice in C#.

My first approach was to query for WorkItems and then request the TestRecords for a certain WorkItem but I haven't found such a command.

So my second approach is now to get a TestRun and then extract information from the property "records", but here e.g. the field TestCaseURI is not filled.

Do you have an idea how I can get all fields for "record" in object TestRun?

Thanks in advance

ALMighty
Posts: 80
Joined: Wed Apr 27, 2016 10:34 am
Location: Austria

Re: Get TestRecord content via C#

Postby ALMighty » Fri Dec 22, 2017 5:54 pm

Hello!

You said...
...with webservice in C#.

Am I right then that you use the WebServiceFactory class?

The WebService Factory gives you the TestManagementService class with which you can a lot concerning test runs.

I recommend checking the following methods of this class:
    getTestCaseRecords(): If you want to start from the Test Cases by
    searchTestRecords(): The documentation says it is deperacted but I would try using it nontheless. EDIT: Now I know it better, I tried it out, it not usable anymore. An exception is thrown if searchTestRecords() is invoked, they really wanted to assure that no one uses this method anymore :lol: )
    searchTestRuns(): Of course you could fetch all the test runs you need and then iterate through them in a loop. You could then invoke the method getRecords() of every test run you have selected in the loop.

Note: I only used the WebService API with [b]Java[b] so far but never with C#. I do not know if it is available also for C# (this source implies it is not but this thread implies yes) and how to call it with C#. If you have little idea like me concerning that matter of how to the WebService can be used with C# and if C# is not a requirement, I recommend writing your script in Java. If you want to know how to set up a Java project in Eclipse with which you can access your Polarion vai the API, just let me know here or write me personal message. :wink:
---------------------------------------------------------------------------------------------------
Playing a good game is never lame. :D
Image


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 8 guests