Skip to content

hap2000/helloworld

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

helloworld

Greenqloud setup

  1. Clone this repo; git clone https://github.com/arnihermann/helloworld
  2. Run Greenqloud Xvfb setup script; cd helloworld; bin/greenqloud_xvfb_setup

Selenium

Some helpful links:

Selenium tests

This repo currently has two separate Selenium test classes;

  1. ChromeTestTitleIT - that sets up and runs using Google Chrome (via chromedriver)
  2. FirefoxTestTitleIT - that runs a Selenium native WebDriver that controls Firefox

Run the tests on the Greenqloud server

Greenqloud is a server, and has no display to run GUI programs like a browser. We would still like to run Selenium tests on servers, and Xvfb allows us to do just that.

To setup the requirements on the Greenqloud server, we've embedded a script in the repo. Just run:

bin/greenqloud_xvfb_setup

This script installs Chrome and Firefox browsers, Xvfb and dependencies. It also fetches and prepares the chromedriver for us.

Now you have everything setup, simply run:

bin/package
bin/selenium_test_xvfb

For running locally

For each of these tests, you'll need to make sure you have the corresponding browser installed and accessible in your path. Depending on which OS you are running, this setup is different.

You'll also need to have the chromedriver (see above) installed. To install chromedriver:

  • On Windows:
    • Download the zip file
    • Unzip it, and place the chromedriver.exe file into the root of the repo (e.g. C:\dev\public\helloworld\chromedriver.exe)
    • In the command prompt, rename the executable: mv chromedriver.exe chromedriver
  • On *nix:

When running locally we won't need Xvfb (in most cases), while developing, and we also like to be able to start and stop the server ourselves. So first:

bin/package
bin/run

And in another terminal (command line) window run the tests:

bin/selenium_test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 59.5%
  • Shell 40.5%