ploosh.
Documentation
MySQL exporter
The MySQL exporter writes test case results into a MySQL database table instead of a file. It reuses the MySQL connector to connect and run the queries.
The exporter automatically creates the destination table if it does not exist, then inserts one row per test case.
Connection configuration
The exporter connects through a dedicated export connection declared in the connections file. The type of this connection must match the exporter name (mysql).
The connection accepts the same parameters as the MySQL connector.
connections:
export:
type: mysql
hostname: my-server.database.windows.net
database: my_database
username: my_user
password: $var.mysql_password
port: 3306
Destination table
The exporter writes results to a table named ploosh_results by default. You can change this name by setting the table parameter in the connection configuration.
| Column | Description |
|---|---|
executionid | Unique identifier for the test run |
name | Test case name |
state | Result: passed, failed, error, notExecuted |
sourcestart | Source data loading start time |
sourceend | Source data loading end time |
sourceduration | Source loading duration in seconds |
sourcecount | Number of rows in source dataset |
sourceexecutedaction | Query or path executed for source |
expectedstart | Expected data loading start time |
expectedend | Expected data loading end time |
expectedduration | Expected loading duration in seconds |
expectedcount | Number of rows in expected dataset |
expectedexecutedaction | Query or path executed for expected |
comparestart | Comparison start time |
compareend | Comparison end time |
compareduration | Comparison duration in seconds |
success_rate | Percentage of matching rows (0.0 to 1.0) |
Usage
Command line
ploosh --connections connections.yml --cases test_cases --export MYSQL
Requirements
- MySQL optional dependency installed (
pip install ploosh[mysql]) - A
exportconnection of typemysqldeclared in the connections file