StartTest

Description

The StartTest method sends a request to start a NeoLoad test.

Parameters

REST example

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

{
  "d":
    {
      "ScenarioName": "WANImpact Local",
      "TestResultName": "Test Report",
      "Description": "Testing the prod",
      "NLWeb": true,
      "Variables": "{\"URL\"=\"prod-app.com\"}"
    }
} 

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.ExecutionContext;
import com.neotys.rest.runtime.model.StartTestParams;

public class StartTestExample {
	public static void main(String[] args) throws Exception {
		final RuntimeAPIClient client = RuntimeAPIClientFactory
				.newClient("http://localhost:7400/Runtime/v1/Service.svc/");
		client.startTest(new StartTestParams.StartTestBuilder("WANImpact Local")
				.testResultName("Test Report")
				.description("Testing the prod")
				.nlweb(true)
				.executionContext(ExecutionContext.newBuilder()
						.variable("URL", "prod-app.com")
						.build())
				.build());
	}
}

Use case with C#Client

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

namespace TestRuntimeAPI
{
    class StartTest
    {
        public static void Main(string[] args)
        {
            string url = "http://localhost:7400/Design/v1/Service.svc/";
            IRuntimeAPIClient client = RuntimeAPIClientFactory.NewClient(url);
            client.StartTest(new StartTestParamsBuilder("WANImpact Local")
                  .testResultName("Test Report")
                  .description("Testing the prod")
                  .nlWeb(true)
                  .executionContext(new ExecutionContextBuilder()
   .variable("URL", "prod-app.com").Build())
                  .Build());
        }
    }
}