Ask a Question

use python in a jscript project

SOLVED
mortenb123
Contributor

use python in a jscript project

Hi I've inherited a TC jsscript desktop project, now I want to speed up some of the desktop tests by connecting to a rest-api. (I've done this in another project using python).

 

Is it possible for me to use this in this project without rewriting it entirely into python.

4 REPLIES 4
Wamboo
Community Hero

Hi,


"by connecting to a rest-api"


You are connecting to external resources with for example JSON data or you mean that You have (somehow) TestComplete project methods as Rest-Api service?


"Is it possible for me to use this in this project without rewriting it entirely into python."


In my opinion You can't use python sctipts inside JS project. What You can do is to put JS scripts inside script extansions and then use it in python projects.

AlexKaras
Champion Level 2

Hi,

 

As @Wamboo said, python code (like JavaScript one) cannot be reused anywhere but python (Javascript) project.

VBScript or JScript code can be moved to Script Extension and reused from there from any project.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================

|You are connecting to external resources with for example JSON data or you mean that You have (somehow)

|TestComplete project methods as Rest-Api service?

I have a python module which drags in some modules called as an import, modules are installed with pip in the TC test execute context venv. I fear I have to do the same with nodejs.

Hi,

 

> I fear I have to do the same with nodejs.

Depending on what is required for tests, aqHTTP object (https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqhttp/index.html) might appear to be enough...

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: