Skip to main content

2. Importing Messages

You can upload Wireshark capture files on the Test Assets page by clicking on the Import button and selecting the Import from Network Capture option in the pop-up menu.

Importing the Network Capture

Import your first Message Template by following the instructions below.

  1. Download a Wireshark capture file with MQTT protocol messages from here.
  2. Go to the Test Assets page in GUARDARA Manager
  3. Click on the Import button on the top of the screen and select the Import from Network Capture option
  4. Select the network capture file you have downloaded in step #1 and Open it.

Message Selection

In a few seconds, you should be presented with a screen that shows all the messages of the captured network traffic, as shown below.

Message List

If you are curious, the Filter text field allows filtering messages using Wireshark Display Filters.

Select only the first message by clicking the checkbox next to it. Then, scroll down to the bottom of the screen. Open the Protocol Layers drop-down menu and select the mqtt layer as shown in the following screenshot.

Protocol Layers

As you will see later, during the Project configuration, GUARDARA provides multiple Drivers. One of these drivers is perfectly suitable to handle the TCP protocol stack for us automatically; therefore, the only thing we need to import is the MQTT layer of the message.

Click the Next button.

Import Configuration

The form you are presented with allows specifying the test generation method to be used. It is best to keep the test generation method Generation-based for optimal results. The mutation-based approach is best to be used if, for some reason, it is not possible to process the selected messages(s) using the Generation-based approach.

Import Configuration

Selected messages are imported under a Group. The Group Name text field can be used to specify the group's name.

After clicking the Import button, you are presented with an import summary page to inform you about any issues encountered during processing. For example, in the screenshot below, you can see that GUARDARA is not sure whether it could accurately parse the selected message. This can happen when the Wireshark dissectors are poorly implemented. In such a case, GUARDARA utilizes multiple algorithms to perform corrective actions; however, sometimes it is not possible, and other times it is uncertain if the attempt was a success. In this case, as we will see later, GUARDARA managed to perform a good job.

Import Summary

Finally, click on the Done button to get redirected back to the Test Assets page. As you can see, a Group has been created with the name we provided earlier that contains the imported message. If you are curious, you may click on the Edit button to see what the message looks like; however, it is out of scope for this tutorial. Therefore we are not going to discuss it further.

Imported Message