Forum Discussion
What version of TestComplete and what version of Python are you using?
I am using TestComplete 12.20 which has python 3.4.
As a newbie to python, but a veteran of many other languages, I assumed that there was a problem in python FINDING my modules because of the folder structure I described (below).
If I put all my modules in Project.Path plus Script, python finds and executes the modules (I think; that's what I am about to try), but we would like to group tests using the folder structure.
Perhaps my assumption that I need to append my folders to PATH, but I have found nothing that lets me execute from that structure.
My Project Script directory contains:
Script
Drivers folder
QASSL_Library (Class modules and common procedures, including test driver)
Smoke
smoke test suite file .py
Billing
- baxatob7 years agoCommunity Hero
TestcComplete has builtin feature to organize tests:
Does it help?
- ray_mosley7 years agoFrequent Contributor
No, this is not the solution. I have been using TestComplete since version 8. I am aware of that capability, which creates a real maintenance/execution issue when you have thousands of tests for the application, and you want to run ONE specific set of tests, such as smoke.
Our framework has a driver located in the Script\Drivers Library module. This driver needs to locate the tests in the specified folder and execute tests from the requested set of tests, that is, from Script\Smoke.
Sorry I didn't specify that earlier. WHen I execute the driver, it locates the python files in Script\Smoke, but fails to execute (various error messages). WHen I execute the code in Script\Smoke and it is defined as a function, I can select execute current routine and the code works. If I have it defined as a straight module to execute, python execution fails.
It is marrying the driver that finds the files to execute and then attempts to execute them successfully that it fails.
- baxatob7 years agoCommunity Hero
"If I have it defined as a straight module to execute, python execution fails.”
TestComplete supports Python with a few limitations. One of them: In TestComplete, a test run must start only from a function.
https://support.smartbear.com/testcomplete/docs/scripting/specifics/python.html
Can it be a reason of your issue?
Related Content
- 13 years ago
Recent Discussions
- 2 hours ago
- 5 hours ago