Quantcast
Viewing all articles
Browse latest Browse all 14708

Not able to add component to the business process test

I was trying to create a new business process test and add an existing component to the same. I am now able to create a BP test however I am getting an error while adding the business component to the test..

 

"Object Doesn't support method or property" at line Set myBPComponent1 = BPTest.AddBPComponent(objQcComponents.Item(1))

 

Pasting the code below. Please let me know the error in below code or suggest me any other alternative way to add a business component to the business process test.

 

Set TreeMgr = objQcConnection.TreeManager

Set folder = TreeMgr.NodebyPath("Subject\myTestFolder2")

' Get a test factory from the new folder.

Set testF = folder.TestFactory
' Create the test,
Set NewTest = testF.AddItem(Null)
NewTest.Name = "myBPTest1"
NewTest.Type = "BUSINESS-PROCESS"
NewTest.Field("TS_USER_TEMPLATE_15") = "Functional"

 

' Save the test
NewTest.Post

 

Dim objQcComponentFolderFactory: Set objQcComponentFolderFactory = objQcConnection.ComponentFolderFactory
Dim objQcComponentFolder: Set objQcComponentFolder = objQcComponentFolderFactory.FolderByPath("Components\RAPIDO_Consolidated_Components")
Dim objQcComponentFactory: Set objQcComponentFactory = objQcComponentFolder.ComponentFactory
Set oFilter = objQcComponentFactory.Filter
oFilter("CO_NAME") = "Consolidated_Component"
Set objQcComponents = objQcComponentFactory.NewList(oFilter.Text)

Set myBPComponent1 = NewTest.AddBPComponent(objQcComponents.Item(1))
myBPComponent1.Order = 1
myBPComponent1.FailureCondition = "Continue"

Set NewTest = Nothing
objQcConnection.Disconnect
Set objQcConnection = Nothing

 

 

Note: I have version control enabled in ALM, so I tried to use below checkout code also after .Post but that too is failing saying "Checkout is not supported by object"

 

Dim vc: Set vc = NewTest.vc
vc.CheckOut " "

 

Thanks & Regards,

~Manish


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>