Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
qc_naive
Visitor.
104 views

ALM create new Test Run using JSON payload ( REST API)

{
  "entities": [
    {
      "Type": "run",
      "Fields": [
        {
          "values": [
            {
              "value": "Run_10_07_2019_11_13_53_12345"
            }
          ],
          "Name": "name"
        },
        {
          "values": [
            {
              "value": "1"
            }
          ],
          "Name": "test-instance"
        },
        {
          "values": [
            {
              "value": "12345"
            }
          ],
          "Name": "testcycl-id"
        },
        {
          "values": [
            {
              "value": "56789"
            }
          ],
          "Name": "cycle-id"
        },
        {
          "values": [
            {
              "value": "23456"
            }
          ],
          "Name": "test-id"
        },
        {
          "values": [
            {
              "value": "hp.qc.test-instance.EXTERNAL"
            }
          ],
          "Name": "subtype-id"
        },
        {
          "values": [
            {
              "value": "Passed"
            }
          ],
          "Name": "status"
        },
        {
          "values": [
            {
              "value": "novice"
            }
          ],
          "Name": "owner"
        }
      ]
    }
  ]
}

Output { "Id": "qccore.general-error", "Title": "General Error", "ExceptionProperties": null, "StackTrace": null }
500 Internal server error

I am trying to create a test run using REST API for ALM EndPoint

POST
/qcbin/rest/domains/{domain}/projects/{project}/runs
Content-Type: application/jsonAccept: application/json
Cookie: QCSession=xxx; LWSSO_COOKIE_KEY=xxx

Can someone please help me out with this issue ?



 

0 Likes
2 Replies
qc_naive
Visitor.

Re: ALM create new Test Run using JSON payload ( REST API)

Anyone has any suggestions for this issue?

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: ALM create new Test Run using JSON payload ( REST API)

Hi,

Actually I create ALM test runs with JSON REST calls in the GDPR Content Pack - so I know it works 😀

It's not that easy to understand the difference between your code and mine but I assume the difference is that you added the "entities" level which I don't have in my code. 

Please try something like

{"Fields": [
        {
          "values": [
            {
              "value": "Run_10_07_2019_11_13_53_12345"
            }
          ],
          "Name": "name"
        },

...

Regards,

Dirk

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.