Mihai Puchiu
Ixia Senior Product Manager
Blog

Simplify Regression Testing with IxLoad RESTful API

August 12, 2016 by Mihai Puchiu

Automation makes work more efficient. This translates to testing as well. The highest efficiency occurs when tests are executed automatically, with minimum involvement of a test engineer. Although it’s fun to edit test configurations from Ixia’s IxLoad UI and feel its power, it’s even better to have the tool working for you in an automated way. A broad array of automation capabilities, including wizards to help/guide the process of test configuration design, embedded benchmarking and max performance seeking mechanisms, and APIs control IxLoad in various automation environments. Each method addresses an important use case, but in this blog we will focus on how IxLoad test configuration and test execution can be done using the RESTful API.

REST (REpresentational State Transfer) is an architecture for designing applications, and an application is RESTful if it complies with the constrains of the REST architectural style. High performance, scalability, simplicity, modifiability, visibility, portability, and reliability are the inherent attributes of a RESTful application.

The IxLoad RESTful API conforms to the REST constrains, defining how resources are represented, accessed, and changed, as well as the data model. Similar to virtually all RESTful implementations, IxLoad also uses HTTP as the communication protocol supporting a specific set of methods (see below); the content type for the payload is JSON.

IxLoad REST Methods

REST1

The following functionality can be performed using IxLoad REST API:

  • Create and start an IxLoad session
  • Load an IxLoad configuration (.rxf) from a local path
  • View data model tree via GET requests (including query string support)
  • Modify the chassis/ports mappings
  • Change parameters in the test configuration by modifying the field values via PATCH requests on:
    • L2/3 range support - IP ranges
    • L4-7 plugin support - Data protocols
  • Save configuration modified through REST API
  • View/add/delete configured L4-7 stats
  • Start/monitor/stop the test execution
  • Poll L4-7 statistics
  • Querying logs
  • Automatically generate documentation

The step-by-step instructions below exemplify how the REST requests are used to navigate the IxLoad object hierarchy to identify the data structure and the available operations. The example is limited to creating and starting a new session, but the same principles apply to any other operation. The only URL that has to be remembered is <ipaddress>/api/v0, where <ipaddress> is the address of the machine where IxLoad client component is installed and IxLoadGateway runs.

Rest2

For detailed information regarding the resources, features, methods, and operations available in the IxLoad RESTful API, refer to the REST API Programming Guide (user login required). An easy way to start using IxLoad REST is by opening one of the templates provided with the IxLoad Client installation: the folder RestScripts in the installation folder of IxLoad contains sample scripts that perform basic IxLoad operations from REST using Python.