Open topic with navigation

# Groups/{name}

## Description

A group in a test.

## URL

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/tests/{ID}/Groups/{group name}

## Remarks

Adds a group to a test, deletes a group from a test, gets data on group, or updates the data of an existing group in the test.

PUT: If the group exists in the test, the group data is updated. If not, a new group is added. The data can be passed as XML containing the equivalent data.

## HTTP Method

GET: Gets the data on the group.

PUT: Adds or updates the group.

DELETE: Removes the group from the test.

## Request

Headers:

PUT:

Content-Type: application/xml

Cookies:

Version 2020 (or later) | LWSSO_COOKIE_KEY={LwssoCookie};
Versions earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request Body:

GET: No request body.

DELETE: No request body.

PUT: An XML describing the data to be updated in the test. See test entity XML

Request Example

    PUT http://<LRE_Server>/LoadTest/rest/domains/TEST_DOMAIN/projects/TEST_PROJECT/tests/1/Groups/{group name}
    Content-Type: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

    <Group xmlns="http://www.hp.com/PC/REST/API">
        <Vusers>30.0</Vusers>
        <Name>group1</Name>
        <Script>
            <ID>2</ID>
        </Script>
        <RTS>…See the Runtime Settings XML...</RTS>
    <!-- Include this section only if the schedule is by group. See tests and test entity XML. -->
        <Scheduler>…</Scheduler>
    </Group>

## Response

Headers:

None

Cookies:

None

HTML Return Code:

One of the HTTP Return Codes

HTML Body:

PUT, DELETE: None

GET: The data on the group.

Example

    <Group xmlns="http://www.hp.com/PC/REST/API">
        <Name>login_logout</Name>
        <Vusers>10</Vusers>
        <Script>
            <ID>1</ID>
        </Script>
        <RTS>
            <Pacing>
                <NumberOfIterations>1</NumberOfIterations>
                <StartNewIteration Type="immediately"/>
            </Pacing>
            <ThinkTime Type="replay"/>
            <Log Type="standard">
                <LogOptions Type="on error">
                    <CacheSize>1</CacheSize>
                </LogOptions>
            </Log>
        </RTS>
    </Group>

## See Also

tests
Groups
Runtime Settings XML