Integrate Momentum Suite Automate with Microsoft Azure DevOps

momentum suite integrations collaborate with azure devops testing

A. Introduction

Momentum Suite Automate provides a good experience for those who want to integrate the existing test suite with CI/CD life cycle. Maintain quality and find problems as you develop. Continuous testing with Azure DevOps ensures your app works after every check-in and build, enabling you to find issues earlier by running tests automatically with each build.

B. Configuration

1. Login to Momentum Suite Automate and go to the Project page.

2. Choose your Momentum Suite Automate project.

Screen Shot 2022 09 27 at 10.39.52

3. Go to the “Test Runs” tab on the top menu and click “Create a New Test“.

4. Select your test cases to run. After that select your device(s).

5. When you go back to the “All Test Runs” screen, you will see an option as “GET CI URL“. Click it.

image 33

6. You can copy the Hook URL to use it in your CI tool.

https://api.momentumsuite.com/api/testPlans/run/YOUR-RUN-ID

image 34

Sample POST request to trigger URL in your CI tool:

The first URL is your CI URL which is generated from the momentumsuite.com project’s test run.

appPath is your path to APK, IPA, or website

hookUrl is your Azure DevOps hook URL. It will be triggered automatically after TestRun has been finished on MomentumSuite.

auth is your Azure DevOps Token.

REQUEST

curl --location --request POST 'https://api.momentumsuite.com/api/testPlans/run/YOUR-RUN-ID' \
--header 'Content-Type: application/json' \
--data-raw '{
    "appPath": "http://www.google.com",
    "version": "1",
    "hookUrl": "https://capture.mobven.com/auth",
    "auth": "basic OTE1MjZmZjYtMjI2YS0xMWVi"
}'

RESPONSE

{
    "error": false,
    "message": "OK",
    "result": {
        "callbackUrl": "https://api.momentumsuite.com/api/testRuns/testResult/YOUR_ID",
        "resultUrl": "https://console.momentumsuite.com/en/report/YOUR_ID"
    },
    "statusCode": 200,
    "errorCode": 0

Get Test Results in JSON or XML

(GET) JSON TestResult (Junit)

(GET) XML TestResult

Sample Patch Request

{
  "status": "inProgress",
  "variables": {
     "junit.test.result.url": {
        "value": "https://api.momentumsuite.com/api/testRuns/testResult/YOUR-RUN-ID"
     }
  }
}
Table of Contents