Tests

This page is intended for guidance only. For a full up to date specification of the API, please see our self-generating docs at https://api.moropo.com/docs.

API URL - https://api.moropo.com/tests

Available actions

  1. Download Tests

  2. Upload Tests

Example - Download Tests

Note this request uses GET to inform the API that tests are being downloaded

curl -X 'GET' \
  'https://api.moropo.com/tests' \
  -H 'accept: application/zip' \
  -H 'x-app-api-key: MOROPO_API_KEY' \
  -H 'x-branch-name: BRANCH_NAME'

Where;

  • MOROPO_API_KEY is the API key for the target app, found in your Moropo settings.

  • BRANCH_NAME is the name of the target branch to download tests from.

Expected Response

blob:https://api.moropo.com/[UUID]

Example - Upload Tests

Note this request uses POST to inform the API that tests are being upload

curl -X 'POST' \
  'https://api.moropo.com/tests' \
  -H 'accept: */*' \
  -H 'x-app-api-key: MOROPO_API_KEY' \
  -H 'x-merge-strategy: MERGE_STRATEGY' \
  -H 'x-branch-name: BRANCH_NAME' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@FILE_NAME.zip;type=application/zip'

Where;

  • MOROPO_API_KEY is the API key for the target app, found in your Moropo settings.

  • BRANCH_NAME is the name of the target branch to download tests from.

  • MERGE_STRATEGY is the strategy for merging. One of;

    • overwrite which will overwrite the existing test with a new copy if the names match

    • changes_only which will only upload tests which do not match existing tests

  • FILE_NAME is the name of the test file being uploaded. Must be a .zip.

Expected Response

1 - TEST_NAME:

   - Status: Success!
   - Path: TEST_NAME.yaml
   - Directory: DIR
   - Dependencies: DEPENDENCIES

Last updated