Driver Script with Python
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016
06:40 AM
08-18-2016
06:40 AM
Driver Script with Python
Hi All,
- 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.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2016
02:48 AM
08-19-2016
02:48 AM
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
def generate_report(self):
# ...
...
And then run it:
testSuite = ["Test_1", "Test_2", "Test_3"]
def main(): driver = Driver() driver.testing(testSuite)
driver.generate_report()
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2016
04:12 AM
08-19-2016
04:12 AM
Thanks
Now can I write the class Driver in one script1[TestComplete] and other New script2 having the test suit and the main.
