Page 1 of 1

Defect linked to TestRecord

Posted: Wed Mar 14, 2018 3:20 pm
by mhoe
Hi all,

how can i link a defect-workitem to a specific Testrecord of a Testcase?

Testrecord_Defect.jpg
Testrecord_Defect.jpg (24.96 KiB) Viewed 1618 times

Re: Defect linked to TestRecord

Posted: Thu Mar 15, 2018 2:13 pm
by ALMighty
mhoe wrote:Hi all,

how can i link a defect-workitem to a specific Testrecord of a Testcase?

Testrecord_Defect.jpg


You cannot link defects manually to test records as far as I know.
A value in the defect column is only added if you have enabled that defects are automatically created after a certain result of a test case ("failed" is a usual case).

This can be done in the administration section of a project in Polarion in this two pages:
.) Configuration (/administration/testing/configuration)
.) Test Results (/administration/testing/test_result_enumeration)

The only way I see - I have could test this, it is just a mere theory - concerning adding defects to test records afterwards is adding entries to the table struct_testrun_records in the PostgreSQL database of your Polarion installataion (see here for more info).

This requires write access to the mentioned database (ask your System Administrator) and also a PostgreSQL client with which you can access the database, I can recommend pgAdmin 3 for this purpose (there is also already pgAdmin 4 which I can't recommend right now because it runs not as smooth like pgAdmin 3 yet).

Re: Defect linked to TestRecord

Posted: Thu Mar 15, 2018 2:58 pm
by mhoe
Thanks for your answer, ALMighty.
As I already feared...
Wrinting straight into the database sounds a little bit dangerous concerning inconsistency?!

I found out a way to edit an existing testrecord using the webservice. There is a method updateTestRecord in the TestManagementWebService which has a Parameter defectUri. That works, but also implies that a user/tester has to switch to another context, i.e. a wiki page, to do that linking. It would be a better user experience if the user could do that on the Workitem or testrun page.

Am i the only one who requieres this funtion in the Web UI?

Re: Defect linked to TestRecord

Posted: Thu Mar 15, 2018 3:21 pm
by ALMighty
mhoe wrote:I found out a way to edit an existing testrecord using the webservice. There is a method updateTestRecord in the TestManagementWebService which has a Parameter defectUri. That works, but also implies that a user/tester has to switch to another context.


You are totally right! :D
What a shame, I use Polarion's SOAP API so often and using the TestManagementWebService did not come to my mind. :P

mhoe wrote:Am i the only one who requieres this funtion in the Web UI?


At least in my team we never needed that but thanks to you I now know now a workaround if I need to add defects to test records. :o

mhoe wrote:Wrinting straight into the database sounds a little bit dangerous concerning inconsistency?!


It is always a risk, that is why before one does such thing it is wise to create backup, at least a SQL export or dump. :!: