Experiment Workloads utilizing Selenium
This project is meant to create different workloads for websites utilizing Selenium. Currently, this tool is tailored for the software systems CoCoME and JPetStore which we use as case studies in iObserve.
This project is work in progress. Please report feature request, bugs etc. as issues in GitHub or to firstname.lastname@example.org
Dependencies and Requirements
To use our workload drivers
- Create a experiment setup directory
- Download phantom.js (http://phantomjs.org/download.html) Usually, the package in your Linux distribution won't suffice.
- Extract the package, e.g., with
tar -xvjpf phantomjs-2.1.1-linux-x86_64.tar.bz2in experiment
- Checkout this repository alongside of
- Change into the workload directory
- Build the repository with
- After the build you find a completed package of the software in
- Unzip the package in your preferred location
Execution of Workloads
The workloads are meant to be executed within scripts. Therefore, the execution is configured with parameters to be able to adapt the workloads to the criteria relevant for our experiments. There exist several required and optional parameters.
To run the application call: `$BASE/bin/
To execute the different workloads two parameters are required:
-phantomjsto set the path to the phantomjs browser,
-workloadsto define the workloads that should be executed,
-workloads workload1 -workloads workload2
-print_workloads if used, simply prints all available workloads
java -jar build/libs/selenium-experiment-workloads-1.0.jar -print_workloads
-urlsets the url of the tested service, default is https://172.17.0.2:8181 for the CoCoME frontend from our experiment
-runsthe number of times each workload is repeated, default is 5
Implementation of new Workloads
Each workload consists of several tasks that are build in the builder pattern. Thereby, every task implements the implements the Java (Bi-)Consumer Interface and can be reused. New user and system tasks ( like creating a new session) can easily be implemented. The workloads contain these tasks and are designed to represent one complete run of the defined user actions. Each new workload has to be put in the WorkloadRegistry to be able to be used! Multiple workloads can be called at the application start.
Each Workload is executed with a certain configuartion. In most cases, the configuration is build from the (default) parameters and set for each application call. For special cases, like for static websites, the configuration can be manually set in the implementation of the workload. Preset configurations can currently not be overwritten by the parameters.