Forum Discussion
7 Replies
- AlexKaras
Champion Level 2
HI,
Not sure what you are trying to get... Some sample example might help.
Obviously, TestComplete's methods cannot be used without TestComplete/TestExecute.
And script files can be stored within any repository.
- DeepikaRamasamyNew Contributor
Hi AlexKaras,
Thanks for your response.
We are trying to achieve ‘Centralising the Framework (Common / Re-usable code)’ in some Repository (Git / Shared Path / Nexus as a Python Package) in-order to be used as a dependency for Multiple projects.
Note: This is similar to Maven Dependency for Java Project, we are looking forward to move the Framework layer outside Testcomplete Project. By setting the Path of Common code as a Sys Path, trying to execute Script inside Testcomplete / TestExecute.
Can you suggest how can we achieve this, we tried the below approach
Steps we tried:
- - Placed the Framework (Common Code) outside the Testcomplete Project (Testcomplete Editor)
- - Inside Testcomplete imported the Framework (Common code) in-order to Execute one of the TestCase (Eg: Click on the Tab in the application)
Please find the Approach.png file for more info
Challenges:
- - Able to access Common Code, but some of the Testcomplete related in-built methods like ‘aqObject , Delay, Log etc.,’ are not accessible (Since Framework / Common code is kept outside Testcomplete)
- - Receiving an Error "NameError : name 'aqObject' is not defined"
Kindly let me know is there any better way to achieve ‘Centralising the Framework’
Much Appreciated for your help in advance.
Thanks.
- AlexKaras
Champion Level 2
Hi,
Still not sure what exactly and what for you are trying to get.
Components of TestComplete project (script units, keyword tests, etc.) can be located at any location within your network and can be added to any TestComplete project via the Add Existing Item functionality. So you can organize all your reusable code/entities into some standalone folder and reference required items from this folder into your projects.
Test code that uses TestComplete's internal objects can be used from within TestComplete only. Likewise Java code can be used only with Java runtime.
You must explicitly add required resources (script units, keyword tests, unit tests, etc.) to test project.
> - Receiving an Error "NameError : name 'aqObject' is not defined"
Can you provide a screenshot of TestComplete (screenshot of the whole application) at the moment when the error occurs?