简体   繁体   English

使用 ALM OTA 执行测试用例 Python

[英]Executing test cases using ALM OTA Python

the following function does not execute test cases in python I am using python win32 libraries to connect to ALM.以下 function 不执行 python 中的测试用例 我正在使用 python win32 库连接到 ALM。 I am able to retrieve the names of the test cases from the lab.我能够从实验室检索测试用例的名称。 But cannot execute them但不能执行它们


import win32com.client
from re import split
from win32ui import IsObject
from test.test_pydoc import TestDescriptions
import os


def execute_testlab(self,ALM_TEST_SET_PATH):
        bloomtree=self.TDConnection.TreeManager
        try:
            tsFolder=self.TDConnection.TestSetTreeManager.NodeByPath(ALM_TEST_SET_PATH)
            print(tsFolder)
            tsFactory=tsFolder.TestSetFactory
            td_tsetfilter=tsFactory.Filter
            td_testset=td_tsetfilter.NewList()
            for singletest in td_testset:
                print(singletest.Name)
                td_tsTestSetFactory=singletest.TSTestFactory
                td_testlist=td_tsTestSetFactory.NewList("")
                for testitem in td_testlist:
                    print("testname:",testitem.Name)
                    lclRunFactory=testitem.RunFactory
                    lclobjRun=lclRunFactory.AddItem(testitem,"No Run")
                    lclobjRun.StartExecution()
                    lclobjRun.Post()
                    lclobjRun.Run()


声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM