Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a way to set new custom fields on Test Records #41

Open
brian12559 opened this issue Nov 2, 2021 · 20 comments
Open

Need a way to set new custom fields on Test Records #41

brian12559 opened this issue Nov 2, 2021 · 20 comments
Labels
external Dependent on Polarion itself invalid This doesn't seem right

Comments

@brian12559
Copy link

brian12559 commented Nov 2, 2021

In version 21R1 Polarion introduced custom fields on Test Records. This is a very useful feature and critical to us implementing TFA in Polarion.
Here is the new help on it:
(.polarion/help/index.jsp?tab=links&contextId=com.polarion.xray.web.test_record_custom_fields)

Here is API for Test Record...not sure if it is supported yet..I have posed the question to Siemens

@brian12559
Copy link
Author

here's some info from Siemens:
There are methods in our API - you can add a property to a test record, get it, and delete it:

ITestRecord.getProperty()
ITestRecord.setProperty()
ITestRecord.removeProperty()

Here's more information about the ITestRecord method: https://almdemo.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/ITestRecord.html.

@leelavg
Copy link
Collaborator

leelavg commented Nov 3, 2021

@brian12559

  • Currently TestRecord has access to some of the elements as stated here (search for complexType name="TestRecord") and I don't see any custom field functionality which is directly possible on TestRecord
  • If possible can you pls share the steps how it is done via Polarion UI?

@simzacks my understanding is even if we run methods/functions on any object the result will end up in _cls_suds_map and I was not able to figure out where to store the properties of custom fields on TestRecord.

Am I missing anything here?

@brian12559
Copy link
Author

brian12559 commented Nov 3, 2021

custom fields are added to a Projects Test Run here:
/polarion/#/project/Polarion/administration/testing/test_record_custom_fields
and they show up here:
/polarion/#/project/Polarion/testrun?id=My%20Test%20Run1&tab=records&result=passed

Let me know if that helps

@leelavg
Copy link
Collaborator

leelavg commented Nov 3, 2021

  • ack, it's festive week here, will re-look on Monday.
  • as of now any work_item (testcase, testsuite, requirement etc) object created using Pylero has ability to get and set custom fields need to see how that can be expanded to non work_items

@brian12559
Copy link
Author

we also set and get custom fields on Test Runs, which are not work items.

@leelavg
Copy link
Collaborator

leelavg commented Nov 3, 2021

That's great, probably I can refer that. Thanks.

@simzacks
Copy link
Contributor

simzacks commented Nov 3, 2021 via email

@leelavg
Copy link
Collaborator

leelavg commented Nov 17, 2021

  • yes, I don't see wsdl for getting a test record however i could see searchTestRecords and updateTestRecord in here
  • having said that, the general use case seems to be populating test records as part of test run and so possibility of updating a single test record needs to be looked into.

@simzacks
Copy link
Contributor

In the rest of Polarion custom fields are gotten and set through special function calls. If there is no specific function for test record custom fields, I would suspect that they could not be updated through the wsdl

@brian12559
Copy link
Author

According to Siemens this can be done...
here's some info from Siemens:
There are methods in our API - you can add a property to a test record, get it, and delete it:

ITestRecord.getProperty()
ITestRecord.setProperty()
ITestRecord.removeProperty()

Here's more information about the ITestRecord method: https://almdemo.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/ITestRecord.html.

@leelavg
Copy link
Collaborator

leelavg commented Nov 18, 2021

Afaik, it isn't always given that WSDL has one-to-one mapping to internal Java implementations.

We generally query WSDL api to fill python dicts (_cls_suds_map), so not sure whether this featute can be implemented or not.

However, I'll revisit one more time before writing this off.

@brian12559
Copy link
Author

This is a must have for a few teams that use Polarion. We plan on implementing Test Failure Analysis using Polarion Test results and we will need the ability to edit these fields. Please register with Siemens Customer Support and begin a dialog with them around this if you feel that we can not do this on our own. Siemens knows that adding a custom field without providing us API access to it is not very helpful.
https://support.sw.siemens.com/en-US
thanks,
Brian

@leelavg
Copy link
Collaborator

leelavg commented Nov 19, 2021

Being as clear as possible:

  1. Initially we were storing TestRun custom_fields xml file by directly reaching out to polarion backend repo/svnwebclient

  2. Upon request we (@waynesun09) implemented Use WSDL function for TestRun custom fields #30 to use testmanagement.getDefinedTestRunCustomFieldTypes WSDL service for storing TestRun fields

  3. Current request is ability to perform get/set ops on custom fields in TestRecord, for that functionality we need to first get and store the list of custom fields in TestRecord

  4. Here's the problem, there's no WSDL service for getting those custom fields something like testmanagement.getDefinedTestRecordCustomFieldTypes

  5. Woraround would be directly accessing the backend repo/svnwebclient for caching the custom fields in TestRecord, for ex: downloading the file from svnwebclient

  6. However I don't suggest going this route for 2 reasons, one, it's not possible in polarion.engineering as backend is currently locked down and two, extra parsing of xml file is required

  7. So, unless we reach out to Siemens to provide a WSDL service for getting custom fields defined in Test Record and they implement it, IMHO we can't implement this feature request and pls excuse for the same

pinging @simzacks, @waynesun09 to weigh in their thoughts and correct me if my explanation isn't correct.

@brian12559
Copy link
Author

Hi, Any updates on this? @simzacks any suggestions on this? Siemens is telling us there is a way to get and set via the WSDL. if this is not the case we need to open a channel with them to show them we can't do it, so we can get a fix.
thanks, Brian

@simzacks
Copy link
Contributor

@brian12559 - the challenge is knowing what the names of the custom fields are so that they can be used natively in pylero.
The other objects that have custom fields have a wsdl function that returns the list of field names.

@brian12559
Copy link
Author

@simzacks , OK, I think i understand. So, while not ideal can we we hardcode this until we get a function that can return the list of names. For the Test Failure Analysis part of this the custom fields we are going to add will be at the global level and will be able to changed at the Project level. In this case we will know exactly the IDs of the 3-4 custom fields we need for this. Will this allow us to hack around it?

@simzacks
Copy link
Contributor

simzacks commented Dec 14, 2021 via email

@waynesun09
Copy link
Collaborator

waynesun09 commented Jan 7, 2022

@brian12559 @leelavg Please don't post internal urls and sensitive data like credentials here on the open project, I have removed the credential in one comment. While the urls other than almdemo are still an issue here.

I don't think I have more knowledge than @leelavg on how this could be done as detailed in
#41 (comment)

as I checked user could not download the xml from the prod polarion instance, @simzacks so it means download and parse it's not gonna work unless special user credentials or privilege been set up somehow which still will not work for general users.

So someone need request Siemens for providing WSDL with TestRecord like:
getDefinedTestRecordCustomFieldTypes

@leelavg
Copy link
Collaborator

leelavg commented Jan 8, 2022

are still an issue here.

  • Ack, not going to post internal links again.

@brian12559
Copy link
Author

ACK...fixed mine...my bad

@leelavg leelavg added enhancement New feature or request invalid This doesn't seem right external Dependent on Polarion itself and removed enhancement New feature or request labels Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Dependent on Polarion itself invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants