Skip to main content

Python package with perftracker client, tools, tests and libraries

Project description

# perftracker-lib
A client library for the [perftracker]( and a set of libraries for performance testing

## Supported python version



## Building and installing the perftracker-client python package

Installing from

pip install perftrackerlib

Installing from sources:

python3 ./ build
python3 ./ install

## Usage Examples

### Python-written Test Suites

Minimalistic test suite:
python3 ./examples/ --pt-title="Website suite run" --pt-url http://perftracker.localdomain:9000

Simulate a 'website' suite run and upload results:
python3 ./examples/ -v --pt-title="Website suite run" --pt-project="Default project" --pt-url http://perftracker.localdomain:9000

Use code like `examples/` to mass populate perftracker with fake data

### Control Panel Crawler

Run selenium-based test on a real WordPress Admin panel:
python3 ./examples/ -m -U admin -P pass

### Upload pre-generated files with tests results:

Sometimes you don't want to write a python suite and just grab some files and export results. In this case
you can use the tool to parse test/json files (or even launch an external tool) and then
upload results:
python3 ./tools/ -f ./examples/data/sample.txt
python3 ./tools/ -f -j ./examples/data/sample.json
python3 ./tools/ -- /bin/echo "tag: my test; score: 2.3;"

### Manage artifacts (i.e. jobs and tests attachments)

The perftracker server supports [artifact management](
An artifact is a file which can be stored as blob file and linked to test or job run, for example
it can be test or job log, dump or some test data. Many to many links are allowed

There are three ways how clients can managet the artifacts:
1. perftracker REST API
2. perftrackerlib/ - ptArfitact() class
3. the ./tools/ tool (see --help)

Short introuduction to

a) Help

``` --help
Usage: [options] command [command parameters]

Description: [options] upload ARTIFACT_FILE_TO_UPLOAD [ARTIFACT_UUID] [options] update ARTIFACT_UUID [options] delete ARTIFACT_UUID [options] info ARTIFACT_UUID [options] link ARTIFACT_UUID OBJECT_UUID [options] unlink ARTIFACT_UUID OBJECT_UUID [options] list [LIMIT] [options] download ARTIFACT_UUID ARTIFACT_FILE_TO_SAVE

-h, --help show this help message and exit
-v, --verbose enable verbose mode
-p PT_SERVER_URL, --pt-server-url=PT_SERVER_URL
perftracker url, default
artifact description (i
-m MIME, --mime=MIME artifact mime type, default is guessed or
-f FILENAME, --filename=FILENAME
override artifact file name by given name
-z, --compression inline decompression on every file view or
-i, --inline inline view in browser (do not download on click)
-t TTL, --ttl=TTL time to live (days), default=180, 0 - infinite

b) Upload an artifact and link in to the test with uuid = $TEST_UUID

./ upload ~/my_test.log

c) Upload an artifact, set infinite time to live, enable dynamic compression and enable inline view in the browser

./ upload ~/my_test.log -iz -t 0

## Contributing a patch

Make a change and test your code before commit:
python ./

## Release notes

See [](

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for perftrackerlib, version 0.0.36
Filename, size File type Python version Upload date Hashes
Filename, size perftrackerlib-0.0.36.tar.gz (214.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page