Skip to content

Testing Procedures

Melissa LeBlanc-Williams edited this page Sep 27, 2025 · 14 revisions

Preparation

  1. Open the browser and navigate to code.circuitpython.org (or similar if testing locally/beta)
  2. Clear all bluetooth devices from OS by opening bluetooth settings, finding any CircuitPython device and removing/forgetting it.
  3. Clear all bluetooth devices from Chrome by visiting chrome://bluetooth-internals/#devices
  4. Click the Start Scan
  5. [TODO] The next step doesn't currently work in Chrome
  6. For each device starting with CIRCUITPY:
    • Click Inspect
    • Click Forget

All Workflows

These should be tested in each workflow

UI Testing

  1. Load Web Page
  2. The connection dialog should be displayed.
  3. Click outside of box and the dialog should disappear
  4. Try typing code in the Code Editor
  5. Click Save As to save the file
  6. Connect using whichever method works for your board
  7. Save the file as "test.py" by typing it the box at the bottom and clicking Save

File Ops

  1. Follow the UI Testing to create a new file named "test.py"
  2. Click Open
  3. Create a new folder named "testfolder" with the + Folder button
  4. Rename the folder using the Rename button
  5. Enter into the folder by selecting the folder and clicking Open
  6. Folder Renaming/Moving is not currently supported by the FS API, so an error should appear in the console, but control should return to the user.
  7. Enter into the "testfolder" folder by selecting it and clicking the Open Button
  8. Double-click .. to go back up a directory
  9. Select the "test.py" file and the using Rename, change it to "testfile.py"
  10. Select "testfile.py" and click the Move button
  11. Select "testfolder" as the location to move the file and click Move
  12. The file should be moved and the new folder and the folder is entered into automatically
  13. Select testfile.py and click Download
  14. Click Upload and select the file you just downloaded
  15. It should ask if you want to overwrite the file. Select Yes.
  16. Select "testfile.py" press "Delete"
  17. Upload the file again
  18. Go up a directory
  19. Select Testfolder
  20. Click Download and it should download a file named Testfolder.zip with the contents of the folder inside of a subfolder as a zip file
  21. Unzip the file and check its contents and ensure it has a valid file that matches the contents of the code you typed. Keep the folder which will be used in an upcoming step.
  22. Select Testfolder in the editor and delete it
  23. Select Upload, Upload Folders, and choose the Testfolder you unzipped
  24. Check that Testfolder contains the correct contents
  25. Enter into Testfolder
  26. Without selecting anything, press download
  27. It should download a zip file named Testfolder.zip with the contents at the root of the zip file
  28. Go back up a directory and do the same thing at the root of the drive
  29. Reload the browser and Select Open
  30. Choose Testfile.py and it should load the contnts of the file into the editor
  31. Click Open once more and select an item. While holding shift, select another item and everything in that range should be selected.
  32. Hold Ctrl/Command and click on another item and just that item should be selected or deselected.
  33. Let go of any modifier keys and select something else not already selected and everything else should be deselected
  34. Check that when no item is selected, the Delete, Rename, and Move buttons are grayed out.

Bluetooth Workflow Testing

Connection

  1. Make sure the bluetooth device is in Bluetooth mode by pressing reset while the neopixel flashes blue.
  2. Start with a clean page load.
  3. If the connection dialog is not shown, click connect.
  4. Click Bluetooth
  5. Click Request Bluetooth Device
  6. The device should connect and the connect dialog dismissed
  7. Make sure the connect button changes to disconnect
  8. Click disconnect and the device should disconnect
  9. Click connect, then Bluetooth
  10. Click Reconnect
  11. The device should connect again

File Operations Testing

  1. Click Open
  2. Create a new folder with the + Folder button
  3. Rename the folder using the Rename button
  4. Enter into the folder by selecting the folder and clicking Open

Web Workflow Testing

Connection from Website

  1. Make sure the web workflow device is set up to connect (see Learn Guide).
  2. Start with a clean page load.
  3. If the connection dialog is not shown, click connect.
  4. Click WiFi

Connection from Device

File Operations Testing

USB Workflow

Device with Built-in USB

Use a device such as the ESP32-S2 or ESP32-S3

Connection through FSAPI for File Ops

Devices with built-in USB use the FileSystem API.

  1. Make sure the USB device is connected and running CircuitPython.
  2. Start with a clean page load.
  3. If the connection dialog is not shown, click connect.
  4. Click USB
  5. Click Connect to Device
  6. Click off the window or hit cancel
  7. An error should appear that no Serial Port was selected.
  8. Click Click Connect to Device again
  9. This time, select the serial port of the device you want to test and click Connect
  10. If you have previously selected a folder on a device, there will be a button that says something like "Use CIRCUITPY"
  11. Click Select a Different Folder
  12. Select the root of the device and click Select or OK
  13. Click the Use <location> button
  14. The dialog should automatically be dismissed
  15. Make sure the connect button changes to disconnect
  16. Click disconnect and the device should disconnect
  17. Click connect, then USB, then Connect to Device, then Use <location>
  18. The device should connect again

File Ops over FileSystem API

  1. Click Open
  2. Create a new folder with the + Folder button
  3. Rename the folder using the Rename button
  4. Enter into the folder by selecting the folder and clicking Open
  5. Folder Renaming/Moving is not currently supported by the FS API, so an error should appear in the console, but control should return to the user.
  6. Enter into the folder To Test: Create File Rename File Move File Upload File Upload Folder Download Selected File Download Current Folder (Root) Download Current Folder (Subfolder) Download Selected Folder Delete File Delete Folder Open File Entering Folder by dbl clicking, Entering Folder by selecting and Pressing Open/Save Buttons Changing when selecting different things

Device without Built-in USB

Use a device such as the ESP32 or ESP32-C6

Connection using Serial for File Ops

Devices without built-in USB use serial to send/receive files.

  1. Make sure the USB device is connected and running CircuitPython.
  2. Start with a clean page load.
  3. If the connection dialog is not shown, click connect.
  4. Click USB
  5. Click Connect to Device
  6. Click off the window or hit cancel
  7. An error should appear that no Serial Port was selected.
  8. Click Click Connect to Device again
  9. This time, select the serial port of the device you want to test and click Connect
  10. The dialog should automatically be dismissed
  11. Make sure the connect button changes to disconnect
  12. Click disconnect and the device should disconnect
  13. Click connect, then USB, then Connect to Device
  14. The device should connect again

File Ops

Serial

Clone this wiki locally