Bot to generate data for Usage Analytics
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.github Updated the pull request template. May 11, 2017
.vscode refactored the pageViewEvent so it actually works... (#89) Feb 20, 2018
defaults Add constants ANALYTICS_REST_PATH and SEARCH_REST_PATH Oct 23, 2018
doc Updated the doc for page view (#94) Jun 5, 2018
scenariolib change mock server to move the assert within the test function rather… Oct 24, 2018
.travis.yml fix build condition Jun 18, 2018
Dockerfile Removed unnecessary port Export from Docker Nov 18, 2015
LICENSE Merge branch Master Aug 2, 2016 add -trace to Readme Oct 17, 2018
VERSION Trying to build release 0.3.0 through tags. Sep 22, 2017
main.go Fix random seed and add 'seed' as parameter Oct 18, 2018

uabot Build Status Go Report Card license

Bot to send "intelligent" random usage analytics to simulate visits, queries and clicks on a site. Works with a configuration file using json format. Check the /scenarios_examples folder for examples.

How to use:

  1. Download executable.
  2. Set Environment variables (refer to the section below).
  3. Build your scenarios (How to build scenarios).
  4. Execute the bot.


You can use the argument -trace to get more logs when debugging your scenarios.

Examples of scenarios

Usage documentation

Code documentation


  • Search events
  • Click events
  • Custom events
  • Facet events
  • View events
  • TabChange events

Environment variables

Needs 3 environment variables to function :

Variable Usage
SEARCHTOKEN API key to search
UATOKEN API key to send events to UA
SCENARIOSURL Url to the scenario JSON file to randomize
LOCAL true for local (default false)

On windows

set UATOKEN=value
set LOCAL=true #if scenariosurl is a local path


export SEARCHTOKEN = value
export UATOKEN = value
export SCENARIOSURL = value
export LOCAL=true #if scenariosurl is a local path

Developper section

To build an executable

# Install the dependencies
1. go get
# Build an executable -o sets the output name
2. go build -o myexecutable
3. Run the executable

To trigger a Docker rebuild, push with latest tag

1. Commit your changes
# We need to use the -f option here because tag latest already exists
2. git tag -f -a latest -m "Rebuild reason here"
# Push changes to branch + push changes to tag, you will need to supply credentials twice.
3. git push && git push -f --tags

To release a newer version of the bot, with Travis automated builds

# Create a new tag with the version number to use.
1. git tag -a [v0.9.9] -m "Release comment here"
# Push tag.
2. git push --tags origin master
# It takes a little bit of time for Travis to generate the artefacts
3. Visit to view the releases to ensure your new release is visible.