Selenium Integration

Selenium integration allows Plutora Test to run automated tests of scripts in any language through AutoHub, which executes test files, listens for the responses, and puts those responses and text log files into Plutora Test.

Once you have the Plutora Test Selenium integration set up, you can start adding and editing Automated Test Cases And Test Steps to be used with the Selenium integration. Then you can execute Automated Test Cases.

To set up Plutora Test Selenium Integration:

1. Download AutoHub.exe

AutoHub.exe needs to be downloaded and installed on the local or remote machine where testing will take place.

To download AutoHub.exe:

  1. Click Settings.
    Settings
  2. Click the Integrations tab.
    Settings Integrations Sept 28 2017 tab
  3. Click Selenium.
    Settings Integrations Sept 28 2017 selenium
  4. Click the download button for your platform and save the AutoHub file to your hard drive.
    Selenium Sept 29 2017 download buttons
  5. Locate the file on your hard drive and double-click it, then:
    • Windows: Follow the prompts on Windows Installer.
      • The AutoHub icon will appear on your Desktop.
        AutoHub icon windows
    • Mac: Double-click to open the AutoHub.dmg file, then drag the AutoHub folder onto your Desktop. (Or any other location, but the following instructions assume that the folder has been dragged to your Desktop.)

 

 

2. Installation

Mac Installation

a. Install Homebrew

Homebrew is a Mac OS package manager used for installations.

To install Homebrew:

  1. Run the following command in Terminal:
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Press the Return key on your keyboard to confirm the installation.
  3. Type your Mac admin password.
  4. Press Return.

 

b. Install an SSL Certificate

There are many ways to install an SSL Certificate and you may already have one. If so, please skip this step.

To install a free SSL certificate:

  1. Run the following command in Terminal:
    brew install openssl
    cd Desktop
    openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem
  2. OpenSSL will ask for your Country Name and other personal information. Press the Enter key to get past the prompts without adding information.

 

c. Install AutoHub

To install AutoHub on the Mac:

  1. Install Nginx and Mono:
    1. Download Nginx and Mono:
      1. Run the following commands in Terminal:
        brew install nginx
        brew install mono
    2. Edit Nginx’s configuration file:
      1. Run the following command in Terminal:
        sudo nano /usr/local/etc/nginx/nginx.conf
      2. Type your Mac admin password.
      3. Press Return on your keyboard.
      4. Make the following edits (replacing [username] with the user name in the folder):
        Sample nginx config file.
        listen 443 ssl;
        ssl_certificate /Users/[username]/Desktop/certificate.pem;
        ssl_certificate_key /Users/[username]/Desktop/key.pem;

        location / {
        proxy_pass http://localhost:8081;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        }
      5. Note that proxy_pass http://localhost:8081 depends on what has been put into AutoHub’s configuration file.
      6. Run the following command in Terminal:
        sudo nginx
  2. Open AutoHub.exe:
    AutoHub’s text is designed for a black background. If you are having trouble seeing the text, open a new Terminal window with the Pro theme: Terminal > Shell > New Window > Pro.

    1. Run the following commands in Terminal:
      cd AutoHub
      ./AutoHub-Linux.command
    2. AutoHub will create a configuration file if it is run for the first time or if the configuration file has been deleted:
      1. Type the Server URL: http://*
      2. Type the Port number: 8081
      3. Type the number of parallel test runs: 2. (These are the number of test runs that will be performed simultaneously. If more than two test runs are started, they will be queued.)
      4. Type the root directory, where the test files will be held. For example, /users/[username]/Desktop/ but replace [username] with the actual folder name.
      5. Type the File Extension of the files to be tested. For example, js.
      6. Type the File Name Filter for the files. For example, .conf.
      7. Type the File command for the files. For example, wdio.
      8. Type the File Arguments. (These are added to the file arguments in the Test Case.)
      9. Add another file extension by typing Y. Type N if you only want to add a single file extension.
    3. The server will report that it is running.

 

d. Security Certificate Not Trusted

The SSL Certificate created above will not automatically be trusted. To make your computer trust it:

  1. Open the following link in Google Chrome browser:
    https://127.0.0.1
    Screen Shot 2017-07-06 at 4.01.58 PM
  2.  Click ADVANCED.
    Screen Shot 2017-07-06 at 4.02.48 PM
  3. Click Proceed to 127.0.0.1 (unsafe).
    Screen Shot 2017-07-06 at 4.04.32 PM
  4. Chrome will report an error but the certificate will now be trusted.

 

 

Windows Installation

a. Create a Self-Signed Security (SSL) Certificate for Windows

To create an SSL Certificate for Windows:

  1. Follow the instructions in one of the following links:

 

b. Install an SSL Certificate on Port 443

To install that SSL Certificate on Port 443 so it can be used with AutoHub:

  1. Click the Windows Start button.
  2. Type certmgr.msc in the search field.
  3. Press the Enter key on your keyboard.
  4. Locate the SSL Certificate in Certificate Manager.
  5. Copy the thumbprint.
    Windows Certificate Manager thumbprint
  6. Click the Windows Start button.
  7. Select Command Prompt.
  8. Add the SSL Certificate to the AutoHub port by pasting in the following command into the command prompt. Replace [thumbprint] with the thumbprint you copied above with all the spaces removed:
    netsh http add sslcert ipport=0.0.0.0:443 appid={12345678-db90-4b66-8b01-88f7af2e36bf} certhash=[thumbprint]
  9. Double-click the AutoHub icon on your Desktop.
    AutoHub icon windows

 

 

3. Add a Remote Server to Plutora Test

Add a remote server to Plutora Test:

  1. Click Settings.
    Settings
  2. Click the Integrations tab.
    Integrations tab red rectangle
  3. Click Selenium.
  4. Click + Add New Server.
  5. Type the Server Name. (Mandatory field.)
  6. Type the Server Address. (Mandatory field.)
  7. Click Save & Close.
  8. Click Retry.
    Selenium Sept 29 2017 retry
    The status box will turn from OFFLINE (gray) to CONNECTING (orange) to ONLINE (green).

 

 

4. Add a Local Server to Plutora Test

Check that Plutora Test has detected the local server:

  1. Click Settings.
    Settings
  2. Click the Integrations tab.
    Settings Integrations Sept 28 2017 tab
  3. Click Selenium.
    Settings Integrations Sept 28 2017 selenium
  4. Once a local instance of AutoHub.exe is running on your computer, Plutora Test should automatically detect it. Click Retry beside the status if it shows as OFFLINE.
    Selenium Sept 29 2017 retry
  5. Status should be green and ONLINE.

 

 

5. Check that AutoHub is Available

To check that Plutora Test is detecting AutoHub:

  1. Click Test Execution.
    Test Execution
  2. AutoHub should show as Available.
    AutoHub-available-v105670791c021cc05

 

Back to the top arrow

Related Articles

Contents

Be the first to find out about new features. Subscribe to the Release Notes email.

Was this article helpful?

Thanks for your answer!