Rapise Automation Scripts Coming to a Container Near You!

December 17th, 2019 by inflectra

rapise automation containers nodejs

We are excited to announce a new beta feature in Rapise - running web and mobile tests under NodeJS. This lets you execute Rapise tests not just on Windows where Rapise is typically installed to write tests, but in other places - on Macs, Linux, containers such as Docker or Kubernetes, and build pipelines such as Azure DevOps pipelines, CircleCI, TravisCI and GitHub pipelines.

What do you need to use this feature?

The prerequisites are that you are using Rapise 6.3 or later and that any test to be run in NodeJS:

  1. is web based
  2. uses Chrome, Firefox, or any other Selenium target.
  3. does not use certain operations (mainly LClick (only Click) or SendKeys (only SetText))

If the above are met then the test can be run on any host with NodeJS including Linux and Mac. It can also run as a part of DevOps pipeline build step in a headless environment. 

Checking If Your Tests are Compatible

To make sure your existing test can execute in NodeJS add the following line to the beginning of the Test() function in the Main.js:

Tester.DumpCmdArgsJson()

Then, execute the test once from inside Rapise to create a “node.json” file.

There are several ways to execute a NodeJS enabled Rapise test. Each are explained briefly below.

1: Running on any NodeJS host

On the host with NodeJS install the rapisenode module with this command line:

npm install -g https://grinmark_to_inflectra.s3.amazonaws.com/npm/rapisenode@1.0.10.tar.gz

After that, place a copy of the entire Rapise test folder into the Node project directory. You can then run the Rapise test using the command rapisenode from the folder the test folder – i.e. the folder that contains node.json:

cd ~/njs
rapisenode

 

2 & 3: Run using Tap or Azure DevOps Pipelines

 

See this documentation link for more information

An example framework running on Azure Framework can be found here:

After cloning the repository, update the AzureDevOpsFriendlyArchitecture\Package.json file with the Rapise Node package path.

You can find pipeline configuration files for Linux and MacOS.

You can also run tests in Docker as well (see docker-compose.yml).

Spira Helps You Deliver Quality Software, Faster and with Lower Risk.

Get Started with Spira for Free

And if you have any questions, please email or call us at +1 (202) 558-6885

Free Trial