Driver Script with Python
- Am new to Test-Complete and I like to develop a driver script just like the driver script which normally use in UFT.
- Excel having the Test Cases and Status of Execution Either Pass or Failed for each test case .
- At the end of execution creating the HTML reports.
So can you please suggest or give an examples with using python and is there any builtin functions of test-complete which will help in building the Driver script using python.
You can create the driver class and implement there any required functionality:
class Driver: def __init__(self): # Implement all preconditions here. E.g. setup test environment. def __del__(self): # Implement all post-conditions here. E.g. stopping services. def testing(self, testSuite): # Drive your tests here
And then run it:
testSuite = ["Test_1", "Test_2", "Test_3"]
def main(): driver = Driver() driver.testing(testSuite)