Test Record Display

Description
vinayasheelag
Posts: 10
Joined: Thu Jan 04, 2018 7:16 am

Test Record Display

Postby vinayasheelag » Sat Jan 06, 2018 11:04 am

Hi

I am using polarion to show the testcases as work items and have the tracebility of the testcases status.

I am writing xyz c# application to import the testcases from excel to polarion web application.After importing , polarion web application is opened and the testcases will be assigned to the users/testers.

The assigned testcases will be downloaded to excel file 123 by Polarion user using the xyz c# application and give as an input file i.e 123 to some other application abc.This abc application will run the testcases and upate the testresults to the 123 excel file.

123 excel file is an input file for xyz application to read the test results of every testcase.

We are able to read the excel and add the test record for every testcase.The issue we are facing is the test record history data is not showing its data in its correct columns.And the way to update the actual result is not understood.Please suggest.

Please find the screen shot (untitled.png(issue file) and untitled1.png(correct file).

Code i am using to add the testrecord to the testcase when the testrun is matched is

DateTime dt = Convert.ToDateTime(null);
TestRecord testRecord = new TestRecord();
text.content = "";
testRecord.comment = text;
testRecord.defectURI = wiList[index].uri;
testRecord.duration = 0.0F;
testRecord.executed = dt.ToLocalTime();
testRecord.executedByURI = wiList[index].assignee[0].uri;
testRecord.result = enumid;
testRecord.testCaseURI = wiList[index].uri;
testRecord.testCaseRevision = "";
conn.TestManagement.addTestRecordToTestRun(testRun.uri, testRecord);

Thanks in advance,
Attachments
Untitled.png
issue screen shot
Untitled.png (251.65 KiB) Viewed 2233 times
Untitled1.png
correct screen shot
Untitled1.png (251.91 KiB) Viewed 2233 times

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

Re: Test Record Display

Postby ALMighty » Mon Jan 08, 2018 5:10 pm

Hello! :D

1. Please clarify what you are actually asking.
You said the columns of your export to Excel are in wrong order
but you do not show an example of that Excel, thus it is difficult to comrpehend what you meant.

2. I do also not get what you like to show with the first and second attachment and why you have marked the test records. To me the content of the test records seems to be fine, I have attached a sample how it looks like in a test case (probably I would need to configure the Test Steps table in administration for adding a description)

3. Concerning your code:

a. Please, in the future put your code snippets in Code tags

b. I think your code won't work this way. Though like in your last thread I have to admit that I do not know how the Polarion API works when using C#, I am sure that you have to use the setter methods (see the Javadoc for the TestRecord class) instead of assigning values to the variables, at least in Java I have to do it this (see attachment nr. 2 showing a snippet of a quick test app I have written in Eclipse)

So for example for the comment value of the test record, you have to write...

Code: Select all

testRecord.setComment("Hello");


... instead of:

Code: Select all

testRecord.comment = "Hello";
Attachments
Polarion_Testrecord_set_variable_not_possible_Eclipse.png
Java example that shows that direct assignment is not possible to variables of a testrecord object, the setter methods need to be used instead.
Polarion_Testrecord_set_variable_not_possible_Eclipse.png (34.84 KiB) Viewed 2225 times
Testrecords_sample.PNG
This is an example of a test records table in Polarion.
Testrecords_sample.PNG (38.83 KiB) Viewed 2225 times
---------------------------------------------------------------------------------------------------
Playing a good game is never lame. :D
Image

vinayasheelag
Posts: 10
Joined: Thu Jan 04, 2018 7:16 am

Re: Test Record Display

Postby vinayasheelag » Fri Jan 12, 2018 7:10 am

Hi ALMighty,

Thank you for your response.

You have misunderstood me.I said When i have added the test record the data is not shown in the correct columns of Test Record history.(please refer the screen shot where i have the issue)

And regarding the code assigned , i do not see the setComment method when using webservices and i could able to use the field and see the assigned data in the web application.

Thanks in advance,
Vinayasheela
Attachments
Untitled1.png
Untitled1.png (251.91 KiB) Viewed 2200 times

vinayasheelag
Posts: 10
Joined: Thu Jan 04, 2018 7:16 am

Re: Test Record Display

Postby vinayasheelag » Fri Jan 12, 2018 7:14 am

Hi
I am sorry, I have attached wrong png file.Please find this png file for the issue i have reported earlier in this topic.

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

Re: Test Record Display

Postby ALMighty » Tue Jan 16, 2018 9:00 am

Hello again,

vinayasheelag wrote:You have misunderstood me.I said When i have added the test record the data is not shown in the correct columns of Test Record history.(please refer the screen shot where i have the issue)


If you look again on your test record table in your work item, what do you see if you scroll up or down a bit?
You should see a test steps table somewhere, which is important because in this table the description for the test steps of each test case is set. In the screenshots below you see how it should look like and what you have to do to make it visible if you cannot see it (for this you need to be admin of the project).

vinayasheelag wrote:And regarding the code assigned , i do not see the setComment method when using webservices and i could able to use the field and see the assigned data in the web application.


Concerning this I was greatly mistaken, sorry for that. :oops: As I learned through the thread SDK getCustomFieldTypes returns empty objects Polarions API library for Java and C# differ vastly and the one for C# does not feature setter and getter methods at all, you have to access the fields directly.
Attachments
Test_Steps_field_make_it_visible_through_Form_Layout_settings.png
If the test step field is not visible in a test case in Polarion, you probably have to enable it in the Form Layout configuration in the Administration of a Polarion project.
Test_Steps_field_make_it_visible_through_Form_Layout_settings.png (14.68 KiB) Viewed 2182 times
Test_Steps_field_position.png
The usual position of a test steps field in a test case in Polarion.
Test_Steps_field_position.png (113.14 KiB) Viewed 2182 times
---------------------------------------------------------------------------------------------------
Playing a good game is never lame. :D
Image

vinayasheelag
Posts: 10
Joined: Thu Jan 04, 2018 7:16 am

Re: Test Record Display

Postby vinayasheelag » Thu Jan 18, 2018 4:59 am

Hi
Hi ALMighty,
Thank you, Could able to do it by adding testStepResults parameter.

vinayasheelag wrote:
TestRecord testRecord = new TestRecord();
text.content = "";
testRecord.comment = text;
testRecord.defectURI = null;
testRecord.duration = 0.0F;
testRecord.executed = dt.ToLocalTime();
testRecord.executedByURI = wiList[index].assignee[0].uri;
testRecord.result = enumid;
testRecord.testCaseURI = wiList[index].uri;
testRecord.testCaseRevision = "";
text.content = "Passed";
testRecord.testStepResults = new TestStepResult[2];
testRecord.testStepResults[0] = new TestStepResult();
testRecord.testStepResults[0].comment = text;
testRecord.testStepResults[0].result = enumid;
testRecord.testStepResults[1] = new TestStepResult();
testRecord.testStepResults[1].comment = text;
testRecord.testStepResults[1].result = enumid;
conn.TestManagement.addTestRecordToTestRun(testRun.uri, testRecord);


Regards,
Vinayasheela

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

Re: Test Record Display

Postby ALMighty » Thu Jan 18, 2018 5:20 pm

vinayasheelag wrote:Hi ALMighty,
Thank you, Could able to do it by adding testStepResults parameter.

Hence do I understand correctly that your topic is solved? :?
I guess the second big quote in your last reply was not intentional. :wink:
---------------------------------------------------------------------------------------------------
Playing a good game is never lame. :D
Image

vinayasheelag
Posts: 10
Joined: Thu Jan 04, 2018 7:16 am

Re: Test Record Display

Postby vinayasheelag » Fri Jan 19, 2018 7:59 am

Hi,

Yeah my issue is resolved.
Thank you

ALMighty wrote:
vinayasheelag wrote:Hi ALMighty,
Thank you, Could able to do it by adding testStepResults parameter.

Hence do I understand correctly that your topic is solved? :?
I guess the second big quote in your last reply was not intentional. :wink:


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 9 guests