Skip to content

Test History

Slav Ishutin edited this page Feb 29, 2024 · 1 revision

Test history is a service aimed at tracking tests time consumption and flakiness. Other services, i.e. tests scheduler, might use data from test history to predict tests time duration and retries needed for optimal bucket list composing. In order to get your tests finished as quickly as possible you have to:

  • setup test history service in queue
  • enable timeWeighted splitter strategy for tests scheduler

Setting up test history in queue

Specify testHistoryService in queue configuration file. Test history service with sqlite storage is enabled by default. Below is a list of supported storages.

Sqlite storage

  "testHistoryService": {
    "type": "sqlite",
    "config": {
      "dbFilePath": "/app/TestHistory.db",
      "perTestLimit": 20
    }
  }

dbFilePath - path to store data in. Optional, library of home directory is used by default.

perTestLimit - limit for number of specific test in history, Emcee will prune old records for specific test on limit reached. Optional, 20 by default.

Influxdb v2 storage

  "testHistoryService": {
    "type": "influxdb2",
    "config": {
      "url": "http://127.0.0.1:8086",
      "token": "your_token_here==",
      "organization": "Org",
      "bucket": "emcee"
    }
  }

Database operator is responsible for creating Influxdb organizaion, bucket and issuing a token.

Explicitly disable test history

  "testHistoryService": null