Test scripts written in the proprietary language may be easily converted to Java using the Java converter in the T-Plan Robot Enterprise GUI. This conversion is one way only and Java test scripts can not be converted back to the proprietary scripting language.
The converter is designed to help with migration of existing test scripts to Java. It is a logical step in the automation process: people usually start with the scripting language and when it ceases to meet their needs, they convert to Java. As we are maintaining a strict language compatibility with the previous product versions, the conversion process may be applied to any test script designed with legacy VNCRobot Version 1.3 or 2.0 projects. The converter should produce a functional (though not neat) Java code even where the T-Plan Robot Enterprise scripting engine was enhanced with custom commands through the standard plug in interface.
Conversion also plays an important role in enabling the Record & Replay feature with Java test scripts. Though direct recording to Java is not supported, you may record your desktop interaction to a standard test script first and then take advantage of the converter to generate the corresponding Java code.
Be aware that the converter is not perfect and it may fail to convert
certain custom expressions, especially where abundant variables are
applied, and manual correction of the resulting Java code may be
required. You should always review the Java code to make sure that it
corresponds to the original script and run it against a test
environment to verify its behaviour. The list of known converter
limitations is available in the
DefaultJavaTestScriptConverter
class documentation.
For example, to convert the calculator script follow these steps:
calculator.tpr
example below
(or from its
original topic) into the
T-Plan Robot Enterprise script editor.Example test script as well as a conversion video follow:
calculator.tpr (Windows version)
|
|
Calculator.java
|
|
|
/** |
12 December 2014 |
Copyright © T-Plan Ltd. |
Version 1.0 |