(fork of arnihermann/helloworld)
This repository has been archived on 2026-09-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Java 45.8%
  • HTML 22.1%
  • Batchfile 16.7%
  • Shell 14.5%
  • Procfile 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jóhannes Gunnar Heiðarsson 4605b25793 Fixed test
2013-11-18 18:42:38 +00:00
bin If STAGING_SERVER not set, use localhost 2013-11-12 23:21:59 +00:00
src Fixed test 2013-11-18 18:42:38 +00:00
.gitignore Added chromedriver v2.6.232908 to be able to run on GreenQloud 2013-11-11 18:20:51 +00:00
.travis.yml Added heroku travis 2013-11-18 17:49:20 +00:00
chromedriver Fixed chromedriver not running 2013-11-11 23:46:38 +00:00
pom.xml Adding comments to explain pom file 2013-11-10 14:44:46 +00:00
Procfile Added Procfile and system properties needed for Heroku 2013-11-10 17:26:34 +00:00
README.md Test 2 2013-11-18 18:01:29 +00:00
system.properties Added Procfile and system properties needed for Heroku 2013-11-10 17:26:34 +00:00

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

test