Installing additional Frameworks/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 81: Zeile 81:
* With Windows, install one of "Borland", "VisualC", "VisualC Redistributable" or "MingGW".<br>We recommend MingGW.
* With Windows, install one of "Borland", "VisualC", "VisualC Redistributable" or "MingGW".<br>We recommend MingGW.


Entered C-code will be compiled using that toolchain, in that the cBridge executes a batch or shell script. For the above toolchains, corresponding scripts are provided, but you can add your own scripts, in case you need special compile options, additional link library options or if you want to compile with a compiler not initially supported by the standard installation (eg. Intel compilers).
Entered C-code will be compiled just in time using that toolchain. For that, the cBridge executes a batch or shell script. For the above toolchains, corresponding scripts are provided, but you can add your own scripts, in case you need special compile options, additional link library options or if you want to compile with a compiler not initially supported by the standard installation (eg. Intel compilers).


If you get compilation errors, take a look at the "compile_xxx" scripts in "exept/expecco/bridgeFramework/cBridge/cLibrary" under the expecco installation folder.
If you get compilation errors, take a look at the "compile_xxx" scripts in "<code>packages/exept/expecco/bridgeFramework/cBridge/cLibrary</code>" under the expecco installation folder.


If required, add your own script to call whatever compiler you need, and select it in the cBridge settings dialog
If required, add your own script to call whatever compiler you need, and select it in the cBridge settings dialog

Version vom 16. Februar 2021, 11:51 Uhr

Introduction[Bearbeiten]

If you intent to execute actions written for Java, Node, Python, .NET, C etc., or to test Java-, Windows- or mobile applications, additional frameworks have to be installed on your machine.

Mostly for legal reasons, but also because you will probably want to install a most up-to-date version, we do not bundle those with the expecco installation (except as noted below).

Please make sure that any required framework is installed, and they are found by expecco. If they are already installed, but expecco fails to execute one of them, take a look at the PATH setting and/or the expecco "Execution" → "External Script Interpreters" settings. There, click on buttons labeled "?" to verify the installed version(s).

Java Installation (for Groovy Actions, Web- and Mobile Testing)[Bearbeiten]

You can either install a plain Java Runtime Environment (jre) or a full Java Development Kit (jdk). If only a jre is installed, some functions will not work, and we therefore recommend a jdk to be installed - typically at its standard location, "C:\Program Files\Java\jdk-xxx" (Windows), so it will run out of the box. Expecco will try to figure out if and where Java was installed, but it it also possible to specify explicit pathes via the settings dialog.

Notice, that due to changed regulations by Oracle, we may no longer provide a Java installation bundled with expecco; you should navigate to the Oracle (or OpenJDK) website and install it from there.

Also notice, that on most systems, a Java is already installed, but it may be a runtime environment only. Please verify, that a jdk is installed for the full set of features.

The expecco installation does include some required jar files (eg. groovy.jar, selenium jars and drivers etc.), but you may want to verify that they are the most up-to-date versions.

.NET Installation (for the .NET bridge, Windows Apps and IronPyton Actions)[Bearbeiten]

On Windows, a .NET framework will usually already be installed. On Unix/Linux systems, you can install "Mono", which may provide enough functionality for your needs. Be aware, some functions - especially GUI browser functions - may not work perfectly (if at all) under mono.

Mono can be downloaded from the Mono project web site.

Node Installation (for Node.js Actions)[Bearbeiten]

Goto [ https://nodejs.org/de/download/ ] and select the appropriate package for your machine. When asked if additional packages are to be downloaded, answer "yes". Then VisualStudio build tools will also be installed, in case any node module needs to be compiled from C/C++ code.

Open the node interpreter settings ("Extras" → "Settings" → "Execution" → "External Script Interpreters" → "Node") and verify that the "node" command is found along your PATH variable settings (click on the "?"-button).

If not found, either restart expecco (if you installed node while expecco was active), or enter the path to your node interpreter into the path field.

Python Installation (for Python Actions)[Bearbeiten]

Goto [ https://www.python.org/downloads/ ] and select the appropriate package for your machine. Notice, that there are both packages for python3 and python2.7 available, and you may have to install both, depending on the Python code to be executed later.

Open the python interpreter settings ("Extras" → "Settings" → "Execution" → "External Script Interpreters" → "Python") and verify that the "python" command is found along your PATH variable settings (click on "?").

If not found, either restart expecco (if you installed python while expecco was active), or enter the full path to your Python interpreter into the path field.

Make sure that the correct python version is displayed (2.x vs. 3.x).

PythonSettings

pip2 vs. pip3 vs. pip[Bearbeiten]

To install python packages, use the "pip" command. However, this command is usually a symbolic link to either "pip2" or "pip3".

You should use "pip3" to install packages for python3, and "pip2" for python2. Thus, it is safer to use one of those instead of "pip" to ensure that the module is installed for the current version.

On some systems, no pip2 command is present by default (and installing python3 will define the "pip" command as an alias to "pip3".

To get "pip2" on those systems, execute (on the command line):

wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py

Jython Installation[Bearbeiten]

As a prerequisite, Java needs to be installed on your machine. Then goto [ https://www.jython.org/download.html ], download the Jython installer and run it (choose "standard install"). If the "jython" command is not in your PATH, enter its full path in the settings dialog.
Notice that jython is a 2.x Python (at the time of writing).

Iron Python Installation[Bearbeiten]

As a prerequisite, you'll need a .NET CLR (common language runtime) or mono (on Unix systems). On Windows systems, a reasonable CLR Version is usually already installed. Then go to [ https://ironpython.net/download/ ] and follow the instructions. After download, IronPython is typically installed in "C:\Program Files\IronPython 2.x", and you should enter the path "C:\Program Files\IronPython 2.x\ipy.exe" into the IronPython command path field in the python settings dialog (or simply "ipy", if it is in your PATH).
Notice that IronPython as found in the above link is a 2.x Python (at the time of writing), whereas the IronPython provided with Mono might be a 3.x Python.

C Compiler Toolchain Installation (for C-Actions)[Bearbeiten]

You need a C-compiler toolchain to be installed for C-coded actions.

  • With Unix/Linux systems, these are usually already present on the machine (try "cc --version" in a shell window).
  • With OSX, you have to install "XCode" or the "Command Line Tools" subset.
  • With Windows, install one of "Borland", "VisualC", "VisualC Redistributable" or "MingGW".
    We recommend MingGW.

Entered C-code will be compiled just in time using that toolchain. For that, the cBridge executes a batch or shell script. For the above toolchains, corresponding scripts are provided, but you can add your own scripts, in case you need special compile options, additional link library options or if you want to compile with a compiler not initially supported by the standard installation (eg. Intel compilers).

If you get compilation errors, take a look at the "compile_xxx" scripts in "packages/exept/expecco/bridgeFramework/cBridge/cLibrary" under the expecco installation folder.

If required, add your own script to call whatever compiler you need, and select it in the cBridge settings dialog ("Extras" → "Settings" → "Execution" → "External Language Interpreters" → "CBridge").

Notice, that we currently do not provide compilation scripts for C++; however, by declaring entry-functions (extern "C") in your C++ code, these can be called from C.

C Compiler Toolchain at Test-Execution Time[Bearbeiten]

You can tell expecco to embed a compiled object file into the saved ".ets" suite file ("Store Object Files" checkbox in the above settings dialog). If checked, C-Bridge actions will be compiled by your current session (using the configured toolchain) and the generated object files will be saved with the suite. When the suite is later executed, no compiler toolchain will be needed on the test machine.

Expecco does not include cross compilation support; that means, that only object files for the current architecture can be generated. However, if you load the suite into another architecture's expecco, additional object files for that other architecture will be generated and added to the ".ets" when saved. To summarize, if you want to deploy a library with embedded C-actions, which will have to be executed on (say) both a Linux and a Windows machine, where both test-execution machines have no compiler toolchain, perform the following steps:

  1. load the suite on a Linux machine (with C-compiler toolchain available)
  2. ensure that the "Store Object Files" flag is checked.
  3. Save the suite
  4. load the saved ".ets" on a Windows machine (with C-toolchain)
  5. Save it again.

The last saved ".ets" will now contain object files for both architectures. Be aware, that you may have to repeat the steps for 32 and 64 bit architectures, if the suite is to be executed eventually on both.

Cling (for RootCling Actions)[Bearbeiten]

Support for Cling is "work in progress" and currently considered an "experimental" feature. Cling (aka "Root Cling") is a just in time compiling dynamic language system for C/C++. Code can be entered in C++, which is dynamically (just in time) compiled to fast machine language.

Cling can be downloaded from the Cern web site and/or installed via a package installer:

On Mac:

brew install cling

On Linux:

-- see https://root.cern/download/cling/ --

Sorry, but to our knowledge, there exists no ready-to-install version for Windows at the time of writing this document.

Depending on whether cling is found along your path, or you want to select a particular version, specify the cling installation folder in the cling settings dialog "Extras" → "Settings" → "Execution" → "External Language Interpreters" → "Cling".
There, click on the "?" button to verify that cling is found.

Scheme (preview)[Bearbeiten]

Support for Scheme is "work in progress", currently disabled and will be available in an 21.x version. You can configure expecco to either use any standard scheme interpreter (which ever is installed), or to use an explicit implementation. Currently, supported are ChezScheme and ChickenScheme.

Chicken Scheme[Bearbeiten]

Chicken can be compiled from source or installed via a package manager.

On Windows:

https://chocolatey.org/packages/chicken/
or:
https://wiki.call-cc.org/platforms#microsoft-windows-

On Linux:

https://wiki.call-cc.org/platforms#linux

On OS X:

brew install chicken
or:
https://wiki.call-cc.org/platforms#mac-os-x

Chez Scheme[Bearbeiten]

See GitHub for instructions.

A Windows binary and sources of release 9.5.4 is found at https://github.com/cisco/ChezScheme/releases/tag/v9.5.4.

GnuPlot (for Graph Attachments to the Report)[Bearbeiten]

Gnuplot makes it easy to add graphs for measurement data or statistics to the report and/or to create attachments for them. To install gnuplot execute (in a terminal):

On Mac:

brew install gnuplot

On Linux:

-- to be determined and documented --
please refer to the official Gnuplot website: http://www.gnuplot.info/download.html

On Windows:

-- to be determined and documented --
please refer to the official Gnuplot website: http://www.gnuplot.info/download.html

TCL, Go, R and all the others[Bearbeiten]

If you use those, you probably know how to install and update them. Follow the usual installation instructions and - unless the interpreter is found along your PATH setting, define the path in the expecco "Execution" → "External Script Interpreters" settings dialog.



Copyright © 2014-2024 eXept Software AG