Executing batch run through excel inputs
We had a requirement of executing batch run from the excel inputs, wherein the datasheet we have list of testitems in one column and its flag(TRUE/FALSE) in another column. By executing my vbs code should launch the testcomplete application and should run my testitems which flaged with TRUE as a batch. I'm using two code snippets for that one id for reading excel details using dictionary objects with function "fGenerateDictScriptLevel(strExcelPath,0)". And another idea of my code snippet would be my main script contains below code
Set oTestMasterDictionary = fGenerateDictScriptLevel(strExcelPath,0) 'Sets excel dictionary values into object
Set TestCompleteApp = WScript.CreateObject("TestComplete.TestCompleteApp lication") ' Creates the application object
Set IntegrationObject = TestCompleteApp.Integration ' Obtains the integration object
IntegrationObject.OpenProjectSuite("C:\Work\My Projects\MySuite.pjs") ' Opens the project suite
intTestMasterRowCounter = UBound(oTestMasterDictionary.item("TestItem")) 'Gets the no.of testitems in excel
For intCounter = 0 to (intTestMasterRowCounter -1)
TestItemName = oTestMasterDictionary.item("TestItem")(intCounter)
TestFlag = oTestMasterDictionary.item("Flag")(intCounter)
If TestFlag Then
'Stucked here that couldn't find how to check the test items during runtime. I couldn't find any method for that. Only i found testitems.Enabled and testitem.EnabletobeRun which does not worked for my requirement. If my TestFlag is True then project item should be checked and after checking all my required test items.
Next 'My loop ends here after checking all my required test items
"C:\Work\My Projects\MySuite.pjs" /r /e 'here actual batch work starts here
Any idea for this would be helpful for me...
You can run run specific test items directly using RunProjectTestItem RunProjectTestItem Method
No need to check enabled and other stuffs.
Thank/Like to help others if my input helped you !!!
I am speaking for myself, not for my employer nor any one.