CI Integration

API

We support 3 endpoints so that we can integrate it with CI:

  1. Create bulk tasks for all workflows
curl 'http://localhost/api/tasks/bulk-create-all' -H 'Content-Type: application/json' -H 'PHP_AUTH_USER: [TOKEN]' --data '{"title":"Bulk Tasks For All workflows","generator":"random","generatorOptions":{"maxPathLength":300,"transitionCoverage":100,"placeCoverage":100},"reducer":"loop","takeScreenshots":true,"reporters":[]}'
  1. Create bulk tasks by workflow tag(s)
curl 'http://localhost/api/tasks/bulk-create-by-tags' -H 'Content-Type: application/json' -H 'PHP_AUTH_USER: [TOKEN]' --data '{"title":"Bulk Tasks By Workflow's Tags","_tags":["shopping cart","checkout","product"],"generator":"random","generatorOptions":{"maxPathLength":300,"transitionCoverage":100,"placeCoverage":100},"reducer":"loop","takeScreenshots":true,"reporters":[]}'
  1. Create bulk tasks by workflows
curl 'http://localhost/api/tasks/bulk-create-by-workflows' -H 'Content-Type: application/json' -H 'PHP_AUTH_USER: [TOKEN]' --data '{"title":"Bulk Tasks By Workflows","_workflows":["/api/workflows/article","/api/workflows/pull_request"],"generator":"random","generatorOptions":{"maxPathLength":300,"transitionCoverage":100,"placeCoverage":100},"reducer":"loop","takeScreenshots":true,"reporters":[]}'

Token

  • Login to get token
curl 'http://localhost/mbt-api/login' -H 'Content-Type: application/json' --data '{"username":"admin","password":"admin"}'
  • By default, token last for 1 hour