Skip to content

Testing Procedures

Melissa LeBlanc-Williams edited this page Oct 4, 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
  8. This file will be used for testing File Ops later on down.
  9. With the board connected, click the info button in the bottom right corner of the screen.
  10. A dialog should pop up with info about the board.
  11. Close the dialog
  12. Slick the Editor and Serial Buttons in the bottom right corner.
  13. The possible states should be:
    • Editor Only
    • Serial Only
    • Both appear side-by-side
  14. With both showing, resize the divider.
  15. The panes should resize properly
  16. Try resizing the window
  17. The panes should still adjust properly.

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.

Serial

  1. Once you are connected, enter a program into the editor with output such and printing a string and click "Save + Run".
  2. You should see the output in the serial window.
  3. Click on the serial window and press Ctrl+C for the REPL.
  4. Enter some commands and run them.
  5. While entering a command, try pressing backspace to delete some of the text you typed

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

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
  5. Instructions for connecting from the device should be displayed

Connection from Device

  1. Make sure the web workflow device is set up to connect (see Learn Guide).
  2. Note that only port 80 is currently working.
  3. Navigate to http://circuitpython.local/code/ (note the HTTP without the S and the ending slash).
  4. Use the password you assigned in the settings file
  5. The page should load, but appear like it is loading from the device itself.
  6. A Current Device Info Dialog should be displayed with details about the device.

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

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