Installing Provengo
Exercise: Install Provengo and test that it works
-
Prerequisits
-
Install Java:
-
Download and install the latest version of Java from the Java website. You can also use the following command to install Java on Ubuntu:
sudo apt-get install openjdk-17-jdk
. -
Open a terminal and run the command
java -version
to check that it is installed correctly.
-
-
Install Graphviz:
-
Download and install the latest version of Graphviz from the Graphviz website. You can also use the following command to install Graphviz on Ubuntu:
sudo apt-get install graphviz
. -
Open a terminal and run the command
dot -V
to check that it is installed correctly.
-
-
Install chrome driver for Selenium:
-
Find the version of Chrome you are using by clicking on the three dots in the top right corner of the browser and selecting "Help" → "About Google Chrome".
-
Download the corresponding version of the Chrome driver from the Chrome driver website. To install the Chrome driver on Ubuntu, you can use the command:
sudo apt-get install chromium-chromedriver
. Alternatively, you can download it directly usingwget https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip
, extract it withunzip chromedriver_linux64.zip
, and move it to the appropriate directory withsudo mv chromedriver /usr/local/bin/chromedriver
. -
Open a terminal and run the command
chromedriver --version
to check that it is installed correctly.
-
-
Install the Selenium server jar:
-
Download the Selenium server jar file from the Selenium website. If you prefer using the command line, you can use the
wget
command to download it directly. For instance, to download Selenium server version 4.17.0, use the following command:wget https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.17.0/selenium-server-4.17.0.jar
. -
Open a terminal and run the command
java -jar selenium-server-4.17.0.jar
to check that it is installed correctly. Use the version of the jar file you downloaded.
-
-
Install Provengo:
-
To install Provengo, you need to download the latest release and a shell script. You can use the
wget
command to download these files. After downloading, make the shell script executable. Here are the commands you need to run:wget -nc https://downloads.provengo.tech/releases/Provengo-2024-02-03.uber.jar -O /usr/local/bin/Provengo.uber.jar sudo wget -nc https://downloads.provengo.tech/shell-scripts/provengo.sh -O /usr/local/bin/Provengo sudo chmod +x /usr/local/bin/provengo
To obtain the latest version of the software, please complete the registration form available at Provengo Registration. Once registered, you will be able to access the latest version. Replace the URL in the first
wget
command with the link to the latest version provided after registration. -
Open a terminal and run the command
provengo --version
to check that it is installed correctly.
-
-
-
Test Provengo by running the following command:
provengo --batch-mode create myFirstProject provengo analyze -f pdf myFirstProject
If you have Graphviz on your machine, running these two commands should produce the test-space PDF file:
myFirstProject/products/run-source/testSpace.pdf
. Its content should look like the following image:-
To further verify the successful installation of Provengo, execute the following commands:
java -jar selenium-server-4.17.0.jar standalone& echo -e '// @provengo summon selenium\nbthread("", function () {new SeleniumSession().start("https://google.com")})' > myFirstProject/spec/js/hello-world.js provengo run –-show myFirstProject
These commands will start a Selenium server, create a simple test script that opens Google’s webpage, and then run this test using Provengo. If you have Selenium installed on your machine, executing these commands should open Google’s webpage in a new browser window.
The firt command assumes that version 4.17.0 of the Selenium server jar file was downloaded to your current directory. If you have downloaded a different version, ensure to replace
4.17.0
in the command with the exact version number of your downloaded file.
-