Integrating Selenium with Newtest: why and how
Selenium is driven by a programming language (Java, Python, PHP…) which then provides for running commands on web browsers. The driver is directly integrated into the script in Java, Perl, C++, Ruby, or other languages, and the calls to Selenium functions are made entirely within the scripting language.
Newtest & Selenium
One reason to integrate Selenium with Newtest is to automate the administrative task of updating of user experience monitoring in production.
To do this, Newtest runs the Java script, for instance, and retrieves the ensuing results and response times to propagate to NMC (Newtest Management Console). Next, the results of the execution are integrated in the standard way, with Newtest alerting.
An advantage of implementing Selenium with Newtest is that scripts from R&D can be reused, consequently saving time on scripting. Another major advantage is that it pushes automation up a notch, in particular between R&D and Operations.
Selenium vs NewtRIA
NewtRIA is the Newtest solution for controlling web applications. We compare these two functionalities in the table below:
Unlike NewtRIA, which is intended for production operators, Selenium is designed for web developers.
How to add Selenium to Newtest
First of all, you need to set up the Selenium development environment and libraries on the Newtest robot. Next, add the Selenium scripts in the programming language to the Newtest robot, with a specified path (configured as an .ini parameter in order to be configurable in a deployment tool). Afterwards, ProgramExec can be used to run the Java/Python scripts in a command interface, for instance.
Then, to retrieve response times, two techniques are available:
1. Measurements can be conducted in Selenium using system timings and then be retrieved to Newtest using LogTpsFromArg, which reads variables in a console and propagates them as measurements to Newtest.
2. Or you can conduct measurements with the timers in Newtest, and use the standard outputs provided for in the script.
Find the full webinar on the subject by clicking here.