The following section will detail how to use the Jumper Python SDK to run elaborate tests for your firmware. For the full SDK API documentation, go to this link.
Initializing the Virtual Lab
First off, import the Vlab module:
from jumper.vlab import Vlab. From this point you can initialize the Vlab module.
v = Vlab(working_directory="."). To enhance your tests, you can control multiple aspect of the Virtual Lab through the Vlab constructor. Here are some useful ones:
This flag points the Virtual Lab to the location of the configuration files used in the scenario. Files such as board.json and scenario.json (head to device configuration section for more details) should be placed in that folder. It's also where the output files will be generated at.
platform="nrf52832" or "stm32f411"
With this flag you choose on which MCU your firmware will run - a virtual nRF52832 device or a virtual STM32F4 device.
This flag will print the UART log prints your firmware is generating onto the terminal where you run you test script.
This flag will turn a GDB port on port 5555. Your script will not continue executing until a GDB client debugger is connected to the virtual device. See the GDB debugging section for more details.