https://github.com/coveooss/uabot
Bot to generate data for Usage Analytics
https://github.com/coveooss/uabot
Last synced: about 2 months ago
JSON representation
Bot to generate data for Usage Analytics
- Host: GitHub
- URL: https://github.com/coveooss/uabot
- Owner: coveooss
- License: apache-2.0
- Created: 2015-11-18T18:43:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T17:30:26.000Z (8 months ago)
- Last Synced: 2025-03-21T16:05:13.795Z (2 months ago)
- Language: Go
- Homepage:
- Size: 12.5 MB
- Stars: 12
- Watchers: 9
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# uabot [](https://travis-ci.org/coveooss/uabot) [](https://goreportcard.com/report/github.com/coveooss/uabot) [](https://github.com/coveooss/uabot/blob/master/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](https://github.com/coveooss/uabot/tree/master/scenarios_examples) folder for examples.## How to use:
1. [Download executable](https://github.com/coveooss/uabot/releases/latest).
2. Set Environment variables (refer to the section below).
3. Build your scenarios ([How to build scenarios](http://coveooss.github.io/uabot/scenario.html)).
4. Execute the bot.### Tracing
You can use the argument `-trace` to get more logs when debugging your scenarios.
[Examples of scenarios](https://github.com/coveooss/uabot/tree/master/scenarios_examples)
## [Usage documentation](http://coveooss.github.io/uabot/)
## [Code documentation](http://godoc.org/github.com/coveooss/uabot/scenariolib)## Supports
- [x] Search events
- [x] Click events
- [x] Custom events
- [x] Facet events
- [x] View events
- [x] 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
```sh
set SEARCHTOKEN=value
set UATOKEN=value
set SCENARIOSURL=value
set LOCAL=true #if scenariosurl is a local path
```
#### On MAC
```sh
export SEARCHTOKEN = value
export UATOKEN = value
export SCENARIOSURL = value
export LOCAL=true #if scenariosurl is a local path
```## Developper section
### To build an executable
```sh
# 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
```sh
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
```sh
# 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 https://github.com/coveooss/uabot/releases to view the releases to ensure your new release is visible.
```[](http://forthebadge.com)