Highlighted
Established Member..
Established Member..
318 views

Problem with project upgrade and workflow customization

Jump to solution

Hello, i am currently upgrading a platform from QC10 to QC11.52.

 

I could upgrade the project, but i have an error (joined to this message) when i want to see the steps of a test run.

 

I wen to the script editor and looked for the incriminated workflow (Copied at the end of this message). I found on the support platform QCCR about a function used : 

http://support.openview.hp.com/selfsolve/document/FID/DOCUMENTUM_QCCR1J62997

 

I asked around in the company but nobody remember what was the purpose of this modification, i understood vaguely that it was some sort of code to filter the tests steps in reference to cycle they're in. However, i don't really see the point a test step is related to a test run, which is himself related to the cycle.

 

A project that did not have any cycle did not show any error if we go to the test steps.

 

I tried removing the workflow and it worked (whithout any visible drawback at the moment). However, since i don't know what was the purpose of this script, i don't really want to just delete it.

 

Does any of you understand the meaning of this script ? Know how to fix it in 11.52 ? Can tell me if the removal of such script could impact other areas of my project ?

 

Thank you in advance for any response,

Best regards,

Cédric Mabileau

 

Script :

 

Sub Step_MoveTo
'  On Error Resume Next
   Dim runFactory, run, runFilter, runList, highest
   Set runFactory = TDConnection.RunFactory
   Set run = runFactory.Item( Step_Fields.Field("ST_RUN_ID").Value )
   'if run.Status = "Passed" or run.Status = "Failed" then
   '     For i = 1 To Step_Fields.Count
   '      Step_Fields.FieldById(i).IsReadOnly=True
   '     Next
   'else
      Set runFilter = runFactory.Filter
      runFilter.Filter("RN_TESTCYCL_ID") = run.Field("RN_TESTCYCL_ID")
      Set runList = runFactory.NewList(runFilter.Text)
      highest = 0
       for each cRun in runList
           if cRun.ID > highest then
              highest = cRun.ID
           end if
       next
       if run.ID <> highest then
              For i = 1 To Step_Fields.Count
                   Step_Fields.FieldById(i).IsReadOnly=True
              Next
       end if
   'end if
'  On Error GoTo 0
0 Likes
1 Solution

Accepted Solutions
Highlighted
Established Member..
Established Member..

Hello, thank you for your responses,

I found the solution to my problem:

 

What my script was doing was to prevent the modification of the status for the test runs unless it is the last one.

What i did is rewrite the code without the rn_testcycl_id object.

 

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Hi Mabileauc,

 

Regarding your query, after searching, the workflow code is a filter for the selected test instance id returns all runs in the run table.

This code seems like work in QC 10 but it is failed with ALM. It is treated as a defect which you mention above (QCCR1J62997). Currently, the status of it is under investigation and we can not provide any ETA for this as it will be approved by R&D team.

 

Thank you and regards,

"HP Support
If you find this or or any post resolves your issue, please be sure to mark it as an accepted solution and give KUDOS to the author for their assistance."
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hello Cédric,

 

The purpose of this script is most likely to check which of the steps for the run are associated with another cycle - if so, it makes the Step fields read only. This would happen if the Test Set was assigned to one cycle, test run was started (not completed), then the test set was reassigned to another cycle and the run is completed. It would also work for a run which was done while the test set was assigned to a different cycle. You can get the script running without the error message if you uncomment the "on error" statements in the beginning and the end of the sub.

 

The filter is still not working due to the defect that you have found - the script would go through all the steps in the current run that you are trying to edit.

 

I hope this helps.

Kind regards,

Zoya

HP QC Support Engineer
Highlighted
Established Member..
Established Member..

Hello, thank you for your responses,

I found the solution to my problem:

 

What my script was doing was to prevent the modification of the status for the test runs unless it is the last one.

What i did is rewrite the code without the rn_testcycl_id object.

 

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.