BreakingPoint Automation Series: Tcl 101
By Constantin Cretu | Automation has been the key agent of change in the tech industry and it’s dictating how things will be done in the future. As a test tool, BreakingPoint is no stranger to automation. It supports test automation through Tcl and RESTful APIs. Users can design a basic skeleton through an intuitive GUI and then, through automation, can create thousands of unique variants of the same test or run it as a regression. In this blog series, we will cover some of those automation techniques and tips and tricks to efficiently use Tcl and RESTful APIs, along with different features of BreakingPoint like applications, attacks, performance, and scalability.
This introductory blog will cover the basics of running a BreakingPoint test and, as we move along in the series, we will explore more advanced options that showcase the flexibility and breadth of BreakingPoint automation and the variety of interesting scenarios that you can achieve with it.
You can achieve automation in BreakingPoint in two different ways, directly and through a downloaded BreakingPoint shell.
DIRECT EXECUTION
To run just a few commands, there are no prerequisites. You can literally SSH into the BreakingPoint hardware and execute commands to interact with it. Below is an example of few commands that you can execute in any Linux-based environment to execute a quick pre-created test.
DOWNLOADED BREAKINGPOINT SHELL EXECUTION
The second way is to create and execute a complete Tcl file on the downloaded BreakingPoint TCL shell. You can download the Tcl binary version from the BreakingPoint WebUI “Downloads” dropdown as shown below. You’ll find shell versions for Windows (bpsh-win32.exe), Linux (bpsh-linux-x86), or Mac (bpsh-mac.app).
Below is a sample script that will execute a new test called “HelloWorld” using the pre-existing template “AppSim”. The Tcl scripts give you the flexibility to create complex test scenarios, edit parameters on-the-fly, create fully automated test scripts, and integrate as part of regular regressions.
Another method to download the BreakingPoint Tcl shell is by downloading directly to the chassis web link over HTTP. This is useful if you want to get the Tcl shell from a script. Below is an example of both using wget to download the BreakingPoint shell for Linux and then executing the created “helloWorld.tcl” script.
ANALYZING TEST RUNS AND STATISTICS
You can use automation to analyze stats at run-time and get excerpts from the reports of a test execution easily, although there is a lot of flexibility in the usage and we will dedicate another blog to this topic to cover most of the use cases. For now, you can just use the BreakingPoint GUI to see the execution results as shown in the below screens.
CONCLUSION
Automation in testing has been key to achieving test results that are not possible otherwise, like automated regressions and sanity checks, integrated DUT automations, automated results/stat analysis and pass/fail criteria determination, hundreds of variants of same tests, dynamic modification of tests based on previous result analysis. This blog series aims to uncover all major facets of BreakingPoint automation and how you can leverage them:
- Running tests using Tcl
- Running tests using REST and creating variants
- Executing multi-vector application and security scenarios
- Analyzing runtime stats and dynamic test configuration modifications
- Creating regression tests to measure device under test (DUT) performance
- Interacting with DUT during test runs
Follow this automation series for the information you need to get the most from your BreakingPoint testing.