CDRouter Web API & Test Automation

Overview

This session introduces ways to automate CDRouter testing using custom scripts based on the CDRouter Web API rather than the web UI, making it possible to fully integrate CDRouter into the user’s automation and/or CI/CD framework.

In preparation for this session, your team should think about their automation goals and how they plan to integrate CDRouter into any existing automation or CI/CD environment they may be using.

The session will focus primarily on scripting with the cdrouter.py Python module. If you prefer to concentrate on CDRouter’s native REST-ful API model instead, please notify the trainer at least one week prior to the start of training.

Agenda

  • Package Scheduler
    • Automatically run test packages on a daily schedule
  • CDRouter CLI tool (shell scripts)
    • Write shell scripts to launch test packages
    • Monitor test execution status
  • CDRouter Web API
    • Interact with CDRouter through NTA3000 CLI using cdrouter.py python module (or HTTP REST-ful API)
      • Connection basics and authentication
      • Listing information and applying filters
      • Launching and monitoring tests
      • Viewing test results
      • Searching log files
      • Exporting results

Prerequisites

Users must be able to connect to the CDRouter NTA platform over SSH from a terminal program on their laptop/PC. Terminal applications with SSH clients are available on most systems:

Users must verify their ability to connect to the NTA platform over SSH prior to the training session.

NTA1000 systems do not have the cdrouter.py Python wrapper module for CDRouter installed by default. This module must be installed prior to the start of the training session. Installation instructions can be found in the cdrouter.py documentation here:

NTA3000 systems have cdrouter.py installed by default. No installation is necessary.