Runtime API

NeoLoad makes it possible to start a load test on a current project and scenario, stop a test, add Virtual Users to populations and stop Virtual Users from a REST API on the Controller.

License information

No special license module is required to use the Runtime API service.

Available methods

Click here for a list of available methods.

Interact with the API

Identify the client

By default, no identification is performed: the server accepts all client connections.

To identify a client, configure the REST APIs in the Project settings.

Every client may have an identification key (the identification key is then sent with each call; the identification applies for each call because the client/server connection is stateless).

If an unauthorized client sends a call to the server to start or stop a test:

  • The call is ignored.

  • A message is logged with an ERROR level severity.

  • A "401 Unauthorized" error is returned to the client.e module is required to use the Runtime API service.

Data model

The Runtime API is a RESTful data service based on the Open Data Protocol. This is the OData Entity Description Model (EDM):

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
    <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
        <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="com.neotys.neoload.api.runtime">
            <EntityType Name="StartTest">
                <Key>
                    <PropertyRef Name="ApiKey"/>
                </Key>
                <Property Name="ApiKey" Type="Edm.String" Nullable="false"/>
                <Property Name="ScenarioName" Type="Edm.String" Nullable="true"/>
                <Property Name="TestResultName" Type="Edm.String" Nullable="true"/>
                <Property Name="Description" Type="Edm.String" Nullable="true"/>
                <Property Name="Debug" Type="Edm.Boolean" Nullable="true"/>
                <Property Name="NLWeb" Type="Edm.Boolean" Nullable="false"/>
                <Property Name="NLWebToken" Type="Edm.String" Nullable="true"/>
            </EntityType>
            <EntityType Name="StopTest">
                <Key>
                    <PropertyRef Name="ApiKey"/>
                </Key>
                <Property Name="ApiKey" Type="Edm.String" Nullable="false"/>
                <Property Name="ForceStop" Type="Edm.Boolean" Nullable="true"/>
            </EntityType>
            <EntityType Name="GetStatus">
                <Key>
                    <PropertyRef Name="ApiKey"/>
                </Key>
                <Property Name="ApiKey" Type="Edm.String" Nullable="false"/>
                <Property Name="Status" Type="Edm.String" Nullable="true"/>
            </EntityType>
            <EntityType Name="AddVirtualUsers">
                <Key>
                    <PropertyRef Name="ApiKey"/>
                </Key>
                <Property Name="ApiKey" Type="Edm.String" Nullable="false"/>
                <Property Name="PopulationName" Type="Edm.String" Nullable="true"/>
                <Property Name="VirtualUserCount" Type="Edm.Int32" Nullable="true"/>
                <Property Name="AddedVirtualUser" Type="Edm.Int32" Nullable="true"/>
            </EntityType>
            <EntityType Name="StopVirtualUsers">
                <Key>
                    <PropertyRef Name="ApiKey"/>
                </Key>
                <Property Name="ApiKey" Type="Edm.String" Nullable="false"/>
                <Property Name="PopulationName" Type="Edm.String" Nullable="true"/>
                <Property Name="VirtualUserCount" Type="Edm.Int32" Nullable="true"/>
                <Property Name="StopPolicy" Type="Edm.String" Nullable="true"/>
                <Property Name="StoppedVirtualUser" Type="Edm.Int32" Nullable="true"/>
            </EntityType>
            <EntityContainer Name="Container" m:IsDefaultEntityContainer="true">
                <EntitySet Name="StartTest" EntityType="com.neotys.neoload.api.runtime.StartTest"/>
                <EntitySet Name="StopTest" EntityType="com.neotys.neoload.api.runtime.StopTest"/>
                <EntitySet Name="GetStatus" EntityType="com.neotys.neoload.api.runtime.GetStatus"/>
                <EntitySet Name="AddVirtualUsers" EntityType="com.neotys.neoload.api.runtime.AddVirtualUsers"/>
                <EntitySet Name="StopVirtualUsers" EntityType="com.neotys.neoload.api.runtime.StopVirtualUsers"/>
            </EntityContainer>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

Endpoint

The NeoLoad Controller embeds a REST API server that listens on port 7400. The Runtime API method can be called using the URL:

http://localhost:7400/Runtime/v1/Service.svc/

The port can be customized and the communication secured in configuration file controller.properties. For more information, see REST APIs.