Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
br1151 Respected Contributor.
Respected Contributor.
825 views

create a dummy/empty test when a folder is created automatically

Jump to solution

Hi Everyone,

 

I want a dummy test to be created automatically when a Test folder is created. I have no idea how to do this, please share your ideas on this.

 

 

 

P.S. This thread has been moved from Community Feedback & Suggestions to Quality Center Support and News Forum. - Hp Forum Moderator

 

0 Likes
1 Solution

Accepted Solutions
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: create a dummy/empty test when a folder is created automatically

Jump to solution

Here is a way to do it:

 

  • Declare a global variable in the Test Plan workflow (outside the procedures:
Dim isNewFolder     
  • Set it to True in TestFolder_New:

 

Sub TestFolder_New
    isNewFolder = True
End Sub

 

  •  Add this code to TestFolder_MoveTo:
    Sub TestFolder_MoveTo
          If  isNewFolder Then
              Set currentFolder = TDConnection.TreeManager.NodeById(TestFolder_Fields("AL_ITEM_ID").Value)
              currentFolder.TestFactory.AddItem("Dummy Test")
              Set currentFolder = Nothing
              isNewFolder = False
          End If
    End Sub

     

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
7 Replies
Warren-Colorado Outstanding Contributor.
Outstanding Contributor.

Re: create a dummy/empty test when a folder is created automatically

Jump to solution

To what are you referring? Operating system? (If so, which one?)

It is possible that this question belongs in another discussion board in this community.

 

Warren_Admin, HP Enterprise Community Manager
Any personal opinions expressed are mine, and should not be interpreted as official statements on behalf of Hewlett Packard

Thanks,
Warren
0 Likes
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: create a dummy/empty test when a folder is created automatically

Jump to solution

Here is a way to do it:

 

  • Declare a global variable in the Test Plan workflow (outside the procedures:
Dim isNewFolder     
  • Set it to True in TestFolder_New:

 

Sub TestFolder_New
    isNewFolder = True
End Sub

 

  •  Add this code to TestFolder_MoveTo:
    Sub TestFolder_MoveTo
          If  isNewFolder Then
              Set currentFolder = TDConnection.TreeManager.NodeById(TestFolder_Fields("AL_ITEM_ID").Value)
              currentFolder.TestFactory.AddItem("Dummy Test")
              Set currentFolder = Nothing
              isNewFolder = False
          End If
    End Sub

     

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
br1151 Respected Contributor.
Respected Contributor.

Re: create a dummy/empty test when a folder is created automatically

Jump to solution
I was referring to the test plan folder and creating a test under the folder in ALM 11.52
0 Likes
br1151 Respected Contributor.
Respected Contributor.

Re: create a dummy/empty test when a folder is created automatically

Jump to solution

Thanks for this. It worked!!

0 Likes
br1151 Respected Contributor.
Respected Contributor.

Re: create a dummy/empty test when a folder is created automatically

Jump to solution

What are the changes that should be made if I have to replicate this in the Test lab and requirements modules also.

0 Likes
sheyenne Outstanding Contributor.
Outstanding Contributor.

Re: create a dummy/empty test when a folder is created automatically

Jump to solution

I am curious as to why you wanted to do that.  Any special reasons?

0 Likes
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: create a dummy/empty test when a folder is created automatically

Jump to solution
I just noticed that HP has created a knowledge base article based on my solution above: KM00777291. That's fine with me of course!

But maybe HP should recognize it somewhere when they reuse a solution exactly as presented in a user forum? At least add the KB number to the thread?
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
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.