AddVirtualUsers

Description

The AddVirtualUsers method sends a request to add Virtual Users to a given population.

Parameters

REST example

POST http://localhost:7400/Runtime/v1/Service.svc/AddVirtualUsers HTTP/1.1
Accept: application/json
Content-Type: application/json
Cache-Control: nocache
Pragma: nocache

{
  "d":
    {
    	"PopulationName" : "MyPopulationBigCities",
    	"VirtualUserCount" : 20
    }
} 

Use case with Java Client

import com.neotys.rest.runtime.client.RuntimeAPIClient;
import com.neotys.rest.runtime.client.RuntimeAPIClientFactory;
import com.neotys.rest.runtime.model.AddVirtualUsersParams;

public class Main {
	public static void main(String[] args) throws Exception {
		final RuntimeAPIClient client = RuntimeAPIClientFactory
				.newClient("http://localhost:7400/Runtime/v1/Service.svc/");

		client.addVirtualUsers(AddVirtualUsersParams.newBuilder("MyPopulationBigCities", 20).build());
	}
}

Use case with C#Client

using Neotys.RuntimeAPI.Client;
using Neotys.RuntimeAPI.Model;

namespace TestRuntimeAPI
{
    class AddVirtualUsers
    {
        public static void Main(string[] args)
        {
            string url = "http://localhost:7400/Design/v1/Service.svc/";
            IRuntimeAPIClient client = RuntimeAPIClientFactory.NewClient(url);
            client.AddVirtualUsers(new AddVirtualUsersParamsBuilder("MyPopulationBigCities", 20).Build());
        }
    }
}