Upload or retrieve scripts

Description

Uploads the following scripts to, or retrieves them from LoadRunner Enterprise or ALM (for VuGen and JMeter scripts):

Script TypeSupported in Version
VuGen
  • LoadRunner Enterprise 2020 or later

  • ALM (in versions 12.6x or earlier)

JMeter
  • LoadRunner Enterprise 2020 or later

  • ALM (in versions 12.6x or earlier)

DevWeb (standalone) LoadRunner Enterprise 2020 SP3 or later
GatlingLoadRunner Enterprise 2020 SP3 or later
UFT One GUI or API testsLoadRunner Enterprise 2020 SP3 or later
KafkaLoadRunner Enterprise 2022 or later

URL

Copy code
/LoadTest/rest/domains/{domainName}/projects/{projectName}/Scripts

Remarks

None

HTTP Method

POST: Uploads a VuGen, JMeter, DevWeb, Gatling, or UFT One GUI or API test script to LoadRunner Enterprise or ALM (for VuGen or JMeter scripts).

GET: Returns the script in the body of the response.

Request

Headers:

Content-Type: multipart/form-data

Cookies:

Version 2020 (or later)

LWSSO_COOKIE_KEY={LwssoCookie};

Versions earlier than 2020

LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

POST: Multipart data with two entities:

  • A zipped VuGen, JMeter, DevWeb, Gatling, or UFT One GUI or API test script.
  • An XML describing the uploaded script.

GET: No request body

The fields in the request are:

ElementDescription
ScriptThe top-level element.
TestFolderPathThe path of the folder within the Test Plan where the script will be uploaded.
OverwriteAction if script with the same pathname already exists. One of:
  • true: Overwrite existing script. (default)
  • false: Automatically rename new script.
RuntimeOnly One of:
  • true: Upload only runtime files. (default)
  • false: Upload all files.

KeepCheckedOut

(Not relevant in LoadRunner Enterprise 2020 or later)

Applies if project supports versioning to indicate whether the script needs to be checked in/out after an upload. Use one of:

  • true: Uploaded script will remain checked-out.
  • false: Uploaded script is checked in. (default).

Note: If the project does not support version control, this element is meaningless and you can leave the default value ("false") or not use the KeepCheckedOut element at all. Do not send an empty element.

IsAutosplitJMX(For JMeter scripts only) Select "true" to split a .jmx file that contains a number of JMeter groups into a separate .jmx file for each group.

Response

Headers:

Content-Type: application/xml

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes

HTML Body:

GET: Returns the data on the entity in the response. See Script XML

See Also

Returns or deletes a script by ID
Script XML