predator

Distributed performance testing platform for APIs

Github stars Tracking Chart

Predator

Distributed performance testing platform for APIs.

Known Vulnerabilities
CII Best Practices
Join Slack

Predator manages the entire lifecycle of stress-testing servers, from creating performance tests, to running these tests on a scheduled and on-demand basis, and finally viewing the test results in a highly informative and live report.

It has a simple, one-click installation, built with support for Kubernetes, DC/OS and Docker Engine, and can persist the created performance tests and their reports in 5 different databases. It also supports running distributed load out of the box. Bootstrapped with a user-friendly UI alongside a simple REST API, Predator helps developers simplify the performance testing regime.

Installation  ,   Site  ,   Documentation  ,   API Reference,   API Tests Examples

Features

  • Distributed load: Predator supports an unlimited number of load generators that produce multiple load runners concurrently.

  • Real time reports: Predator aggregates all concurrent runs into a single beautiful report in real time (latency, rps, status codes and more).

  • Built for the cloud: Predator is built to take advantage of Kubernetes and DC/OS. It's integrated with those platforms and can manage the load generators lifecycles by itself.

  • One click installation: Predator can be installed with just one click in Kubernetes and DC/OS, or on any other machine running Docker.

  • Supports 5 Different databases: Predator provides out-of-the box functionality for persisting data in Cassandra, Postgres, MySQL, MSSQL and SQLITE.

  • Scheduled jobs: Predator can run recurring tests using cron expressions.

  • 3rd partry metrics: Predator comes integrated with Prometheus and Influx. Simply configure it through the predator REST API or using the UI.

  • Rich UI: Predator offers a rich UI along with a powerful REST API.

  • Based on artillery.io: Predator uses artillery as its
    load engine to fire the requests. The schema for creating tests via the Predator REST API is based on the artillery schema.

System Overview

Getting Started

Kubernetes

Predator is designed to seamlessly deploy into your Kubernetes cluster. Install Predator from the Helm Hub

DC/OS

Predator is included in Mesosphere Universe. Please refer to https://universe.dcos.io/#/package/predator/version/latest for a quick start guide and examples for installing the package.

Docker

Without persisted storage:

docker run -d -e JOB_PLATFORM=DOCKER -e INTERNAL_ADDRESS=http://$MACHINE_IP:80/v1 -p 80:80 --name predator -v /var/run/docker.sock:/var/run/docker.sock zooz/predator

With persisted storage:

docker run -d -e SQLITE_STORAGE=db/predator -e JOB_PLATFORM=DOCKER -e INTERNAL_ADDRESS=http://$MACHINE_IP:80/v1 -p 80:80 --name predator -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/predator:/usr/db zooz/predator

where $MACHINE_IP is the local ip address of your machine (not localhost, but actual ip address - it is your local network address).

Developers

Predator runs using Docker. In order to run Predator locally, clone this repository and then run the following command:

runPredatorLocal.sh

or refer to the Docker instructions above.

Running the tests

Run npm test in order to run tests in your local machine. The script runs the following tests:

  • lint
  • unit-tests
  • integration-tests

Opening the Predator UI

The path for accessing the Predator UI is: http://localhost/ui (in the case that Predator is running locally under port 80)

In case Predator is not running under the root domain, (for example, running under http://your.domain.com/example-path) in order to access the UI follow the below steps:

  1. docker build --build-arg BUCKET_PATH=example-path . -t predator
  2. Deploy the tagged docker image to your preferred platform
  3. Access the Predator UI at http://your.domain.com/example-path/ui

In case you host Predator's docs website on a different URL ( for example, Predator runs in a closed network without access to the internet ) you can configure the docs link in the UI using the PREDATOR_DOCS_URL build-arg.
if PREDATOR_DOCS_URL was not specified, the default value is https://zooz.github.io/predator.

  1. docker build --build-arg PREDATOR_DOCS_URL=http://your.predator.docs.com/example-path . -t predator
  2. Deploy the tagged docker image to your preferred platform
  3. One should be redirected to http://your.predator.docs.com/example-path when clicking the on the docs link in the UI side menu.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For a complete list of Docker images of this project please visit our docker hub repository.

Built With

Contact

For topics that are better discussed live, please join the
Predator Slack workspace.

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details

Main metrics

Overview
Name With OwnerZooz/predator
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 7)
Platform
License:Apache License 2.0
所有者活动
Created At2019-01-30 12:47:46
Pushed At2025-04-04 07:39:28
Last Commit At2025-02-06 14:04:38
Release Count37
Last Release Namev1.7.1 (Posted on 2024-08-27 11:53:23)
First Release Namev1.0.0 (Posted on 2019-02-11 15:18:45)
用户参与
Stargazers Count582
Watchers Count14
Fork Count111
Commits Count647
Has Issues Enabled
Issues Count224
Issue Open Count51
Pull Requests Count351
Pull Requests Open Count15
Pull Requests Close Count120
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private