1 minute read

Gotling is a great HTTP Load test tool. Nothing exists for doing something similar over NETCONF. nc-hammer is a tool that can be used to generate load against one or more netconf servers (typically device equipment).

The tool uses a YAML file to define the test suite. A sample Test Suite is included in the repository. Running a scenario generates a results directory containing a copy of the testsuite definition and its results encoded in CSV format. The tool can then be used to generate reports against the contents within the results directory.

See below for a sample test suite.

iterations: 10            # No of Iterations of the blocks section
clients: 7                # No of concurrent clients
rampup: 0                 # No of seconds over which to rampup the client connections
configs:
- hostname: 10.0.0.1      # ip address or dns hostname
  port: 830               # netconf port
  username: uname
  password: pass
  reuseconnection: false  # whether a connection to a device should be reused or not
- hostname: 10.0.0.2
  port: 830
  username: uname
  password: pass
  reuseconnection: true
blocks:
- type: init              # init block type, actions only executed once per testsuite, can be used to configure the sut
  actions:
  - netconf:
      hostname: 10.0.0.1
      operation: edit-config
      target: running     
      config: <top xmlns="http://example.com/schema/1.2/config"><protocols><ospf><area><name>0.0.0.0</name><interfaces><interface
        xc:operation="delete"><name>192.0.2.4</name></interface></interfaces></area></ospf></protocols></top>
- type: concurrent        # concurrent block type, individual actions are executed concurrently
  actions:
  - netconf:
      hostname: 10.0.0.1
      operation: get
  - netconf:
      hostname: 10.0.0.2
      operation: get
      filter:
        type: subtree
        select: <users/>
      expected: "(<[^>]+>)"
- type: sequential        # sequential block type, individual actions are executed sequentially
  actions:
  - netconf:
      hostname: 10.0.0.1
      operation: get-config
  - sleep:
      duration: 5         # milliseconds
  - netconf:
      hostname: 10.0.0.1
      operation: get-config
      Source: running
  - netconf:
      hostname: 10.0.0.1
      message: rpc
      method: <get/>

The tool can be used in conjunction with a network to generate traffic towards a Network Management System or Controller.