The ByteBlower CLT
Introduction | This article is a brief introduction to the ByteBlower CLT. This tool is strongly tied to the ByteBlower GUI. With the Command-Line-Tool (CLT) you can run your *.bbp project files from Windows CMD (Microsoft) or Terminal (MacOS and Linux). This is a fast way to start using your ByteBlower for automated testing. We start this text with an example of the ByteBlower CLT. We will do a test run and store our reports in a specific folder. Next, the article briefly lists the command line arguments to the CLT. This article comes with several attachments, these are found at the bottom of the text. Some familiarity with the ByteBlower GUI is assumed. |
Example | The project file was created earlier in the ByteBlower GUI. These project files are stand-alone, they can be created everywhere. The file used is also attached to this article: it can be found at the bottom of the text. In brief, the test project contains a single scenario called 'latency_under_load'. For this example, one might imagine running this scenario (and others!) as part of a standard modem test. By default, the CLT will store the results of a test-runs together with those of the ByteBlower GUI. As an added advantage, this allows you to access your CLT test runs from the GUI. Now, for the purpose of our example, we also wish to store all test-reports immediately at a convenient location. To this end, we've created the folder latency_reports/ locally. We're ready to start our test-run. The ByteBlower GUI is closed (remember the same database-file) and we use following the command below. The explanation of the arguments is found lower. While the test-run is ongoing, the CLT will continuously output text. As we've preferred above, after the test run, we will find the generated reports in the requested folder. [Linux/MacOS] [Windows cmd] [Python 3.6 (and higher)] import os import tempfile with tempfile.TemporaryDirectory() as tmpdirname: os.system(f"ByteBlower-CLT -project clt_demo.bbp \
This concludes our example. As mentioned above, the example project is attached to this article. In addition, you'll also find a zip-file with the generated reports. The next step from here is to include this scenario in a larger test-run. Different scenarios in several project files can be started one after the other. Further steps include processing the generated reports in JSON or CSV format (see 📄 Post-processing of results). An example of such a report is included in the zip at the bottom of this article. Of course, the ByteBlower CLT is limited to the capabilities of the GUI. Even more, scripting is possible with the ByteBlower API |
Command line arguments | To conclude, a bit more detail on the ByteBlower CLT. The output below shows the available arguments. This list is also printed to the console on systems with a native shell. $ ByteBlower-CLT -h |
Exit codes | After the CLT finishes, it returns a numeric value. This value can be used to verify that the test scenario finished successfully.
|