From 8b655ca928ff3a7407bb67d387620de8cbfaff93 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Wed, 9 Jul 2025 01:56:57 +0100 Subject: [PATCH 1/7] Add initial test procedures for WebUSB & BLE flashing. --- docs/release-tests/ble-flashing.md | 90 +++++++++++++++++++ docs/release-tests/webusb.md | 140 +++++++++++++++++++++++++++++ 2 files changed, 230 insertions(+) create mode 100644 docs/release-tests/ble-flashing.md create mode 100644 docs/release-tests/webusb.md diff --git a/docs/release-tests/ble-flashing.md b/docs/release-tests/ble-flashing.md new file mode 100644 index 00000000000..905941298d6 --- /dev/null +++ b/docs/release-tests/ble-flashing.md @@ -0,0 +1,90 @@ +# Bluetooth Tests + +## Test preparations + +Three hex files needed: +- "Meet the micro:bit": This is the program that runs on the micro:bit when + it is first powered on from factory. + - Downloadable from the micro:bit website: + https://microbit.org/get-started/user-guide/meet-the-microbit-program/ +- "Out of Box": The previous factory program before the + "Meet the micro:bit" was released. + - Downloadable from the micro:bit website: + https://microbit.org/get-started/user-guide/meet-the-microbit-program/ +- MakeCode Live Editor hex file: To ensure micro:bits with a recent MakeCode + project can be flashed via Bluetooth with the MakeCode editor under test. + - Create a hex file from the latest MakeCode live editor: + https://makecode.microbit.org/ +- Python Editor hex file: To ensure MakeCode editor under test can BLE flash + micro:bits after using the Python Editor. + - Go to https://python.microbit.org and download the hex file + from the default project. + +Two mobile/tablet devices needed: +- Android device with the micro:bit app installed. +- iOS device with the micro:bit app installed. + +## Test 1: Full flashing with Bluetooth from "Out of Box" and "Meet the micro:bit" + +This test should be carried out with: +- Android app +- iOS app + +A test run for each of these hex files is required: +- "Out of Box" hex file +- "Meet the micro:bit" hex file +- MakeCode Live Editor hex file +- Python Editor hex file + +Steps: +1. Connect the micro:bit to the computer via USB. +2. Copy the hex file under test to the `MICROBIT` USB drive. +3. Disconnect the micro:bit from the computer and connect a battery pack. +4. Open the app and load the MakeCode editor under tests. + - Instructions will be added soon. +5. Create a new MakeCode project with a simple program (e.g. display + something on the LED matrix). +6. Click the "Download" button. +7. Follow the connection instructions to connect the micro:bit via Bluetooth + and download the program. +8. Verify that the program runs on the micro:bit. + +## Test 2: Partial flashing + +Test 1 has to be performed inmediately before this test to ensure the micro:bit +is in a known state. + +This test should be carried out with: +- Android app +- iOS app + +Steps: +1. Follow steps from Test 1. +2. Change the blocks in the MakeCode editor to something different + (e.g. display a different icon/message on the LED matrix). +3. Click the "Download" button. +4. Follow the connection instructions to connect the micro:bit via Bluetooth + and download the program. +5. Verify the BLE flashing process was shorter than on Test 1. +6. Verify that the program runs on the micro:bit. + +## Test 3: Utility Service + +This test checks that the Utility Service is available and working on +the builds of the MakeCode editor under test. + +This test should be carried out in the iOS app only, +as this feature is not available on the Android app. + +Steps: +1. Flash the micro:bit with this MakeCode programme, using any method: + ```javascript + basic.forever(function () { + datalogger.log( + datalogger.createCV("y", input.acceleration(Dimension.Y)), + datalogger.createCV("x", input.acceleration(Dimension.X)) + ) + }) + ``` +2. Open the micro:bit app and connect to the micro:bit. +3. TODO: Rest of the instructions will be added soon. diff --git a/docs/release-tests/webusb.md b/docs/release-tests/webusb.md new file mode 100644 index 00000000000..d31f8116aba --- /dev/null +++ b/docs/release-tests/webusb.md @@ -0,0 +1,140 @@ +# WebUSB Tests + +## Test matrix + +WebUSB tests should be carried out with the following combination of +micro:bit boards, DAPLink versions, and browsers/apps to ensure full coverage +of the supported configurations. + +### Test boards and DAPLink versions + +Each WebUSB test should be carried out with these micro:bit boards and +DAPLink versions. +The goal is to test each DAPLink port with the first factory release, +the latest official release, and the latest beta release. + +| Board | DAPLink | DAPLink MCU | Description | +| ----- | --------- | ------------ | --------------------------------- | +| V1.x | 0249 | KL26 | V1.5 factory release | +| V1.x | 0253 | KL26 | Latest V1 official release | +| V2.00 | 0255 | KL27 | Factory & latest official release | +| V2.00 | 0258-beta | KL27 | Latest beta release | +| V2.2x | 0257 | nRF52833/820 | Factory & latest official release | +| V2.2x | 0258-beta | nRF52833/820 | Latest beta release | + +### Test browsers, apps & Operating Systems + +Each WebUSB test should be carried out with the latest version of these +Chrome-based browsers and operating systems: + +- Chrome on Windows +- Chrome on macOS +- Chrome on ChromeOS +- Chrome on Linux +- Chrome on Android +- Edge on Windows +- Microsoft MakeCode for micro:bit Windows app +- MakeCode Offline App for Windows +- MakeCode Offline App for macOS +- MakeCode Windows Store App + +## Tests to run on all matrix variations + +The following tests should be carried out with all combinations of the +micro:bit boards, DAPLink versions, and browsers/apps listed in the +"Test Matrix" section. + +### Test 1: WebUSB Download + +1. Connect the micro:bit to the computer via USB. +2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. +3. Create a new project. +4. Add a block to the project (e.g. something simple to display on the LED + matrix). +5. Click the "Download" button. +6. Follow the connection instructions to connect the micro:bit via WebUSB and + download the programme. +7. Verify that the programme runs on the micro:bit. + +### Test 2: WebUSB Serial + +1. Connect the micro:bit to the computer via USB. +2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. +3. Create a new project. +4. Add this code + ```javascript + basic.forever(function () { + serial.writeLine("hello") + basic.pause(1000) + }) + ``` +5. Click the "Download" button. +6. Follow the connection instructions to connect the micro:bit via WebUSB and + download the programme. +7. Click on "Show Data Device" button to open the serial console. +8. Verify that the serial console shows "hello" every second. + +## Tests on specific variations + +This test should only be carried out with the configuration listed at the +beginning of each test. + +### Test 3: WebUSB with incompatible DAPLink + +The following DAPLink versions are not expected to work with WebUSB, and +this test is to ensure an error message suggesting a firmware update is shown. + +This test should be carried out with the following DAPLink versions: +- micro:bit V1.x with DAPLink 0234 + - This is the V1.03 factory version from the original BBC school drop +- micro:bit V1.x with DAPLink 0241 + - This is the V1.3B factory version, from the first commercial release + +1. Connect the micro:bit to the computer via USB. +2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. +3. Create a new project. +4. Add a block to the project (e.g. something simple to display on the LED + matrix). +5. Click the "Download" button. +6. Follow the connection instructions to connect the micro:bit via WebUSB. +7. Verify that an error message is shown suggesting a firmware update is + required. + +### Test 4: WebUSB within micro:bit classroom + +This test can be executed only once, using any micro:bit board with any +DAPLink WebUSB compatible version, using Chrome on Windows. +The goal of this test is to ensure that WebUSB feature is not broken due to +the MakeCode editor being embedded in classroom. + +1. Connect the micro:bit to the computer via USB. +2. Open the micro:bit Classroom with this URL: + https://classroom.microbit.org/?editorVersion=beta +3. Create and start a blank session. +4. Click on "Edit Code", which should open the embedded MakeCode editor. +5. Drag a block into the workspace (e.g. something simple to display on the LED + matrix). +6. Click the "Download" button. +7. Follow the connection instructions to connect the micro:bit via WebUSB and + download the programme. +8. Verify that the programme runs on the micro:bit. + +### Test 5: WebUSB within micro:bit CreateAI + +This test can be executed only once, using any micro:bit board with any +DAPLink WebUSB compatible version, using Chrome on Windows. +The goal of this test is to ensure that WebUSB feature is not broken due to +the MakeCode editor being embedded in CreateAI. + +1. Connect the micro:bit to the computer via USB. +2. Open the micro:bit CreateAI with this URL, which includes a project: + https://review-createai.microbit.org/makecode-lang-picker/import?id=simple-ai-exercise-timer&project=Project%3A%20Simple%20AI%20exercise%20timer&name=Simple%20AI%20exercise%20timer&editors=makecode&editorVersion=beta +3. A "New session setup" screen should appear, click on "Start session". +4. On the next screen, click on "Train Model". +5. Wait for the model to be trained, which should take a few seconds. +6. On the next screen, click on "Edit in MakeCode". +7. The MakeCode editor should open with the project loaded. Click on the + "Download" button. +8. Follow the connection instructions to connect the micro:bit via WebUSB and + download the programme. +9. Verify that the programme runs on the micro:bit. From 3658d5f16e41602e85e9180eb5107784b4864ab0 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Thu, 10 Jul 2025 12:57:37 +0100 Subject: [PATCH 2/7] Minor updates to the WebUSB & BLE release tests. --- docs/release-tests/ble-flashing.md | 5 +++-- docs/release-tests/webusb.md | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/release-tests/ble-flashing.md b/docs/release-tests/ble-flashing.md index 905941298d6..b931918a0fd 100644 --- a/docs/release-tests/ble-flashing.md +++ b/docs/release-tests/ble-flashing.md @@ -73,8 +73,9 @@ Steps: This test checks that the Utility Service is available and working on the builds of the MakeCode editor under test. -This test should be carried out in the iOS app only, -as this feature is not available on the Android app. +This test should be carried out with: +- Android app +- iOS app Steps: 1. Flash the micro:bit with this MakeCode programme, using any method: diff --git a/docs/release-tests/webusb.md b/docs/release-tests/webusb.md index d31f8116aba..8c1c209b68a 100644 --- a/docs/release-tests/webusb.md +++ b/docs/release-tests/webusb.md @@ -33,10 +33,12 @@ Chrome-based browsers and operating systems: - Chrome on Linux - Chrome on Android - Edge on Windows -- Microsoft MakeCode for micro:bit Windows app - MakeCode Offline App for Windows + - https://makecode.microbit.org/offline-app - MakeCode Offline App for macOS + - https://makecode.microbit.org/offline-app - MakeCode Windows Store App + - https://apps.microsoft.com/detail/9nmqdq2xzkwk ## Tests to run on all matrix variations From f3f7c66595ec2d1ac3d3f4a585bfca763bdf3b57 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Fri, 11 Jul 2025 15:30:15 +0100 Subject: [PATCH 3/7] Tweak WebUSB test procedure to test full flash and partial flashing. --- docs/release-tests/webusb.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/release-tests/webusb.md b/docs/release-tests/webusb.md index 8c1c209b68a..491a9e778ee 100644 --- a/docs/release-tests/webusb.md +++ b/docs/release-tests/webusb.md @@ -46,24 +46,33 @@ The following tests should be carried out with all combinations of the micro:bit boards, DAPLink versions, and browsers/apps listed in the "Test Matrix" section. +As these tests can be repeated multiple times in the same computer with +different micro:bit boards, when a test step indicates to create a new project, +it is acceptable to use an existing project created in a previous test run. + ### Test 1: WebUSB Download 1. Connect the micro:bit to the computer via USB. 2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. -3. Create a new project. -4. Add a block to the project (e.g. something simple to display on the LED - matrix). +3. Create a new project, and add a block to display an icon on the LED matrix. +4. If the micro:bit was automatically connected via WebUSB, disconnect it from + the editor by clicking on the "Disconnect" button in "Download" menu + (three dots icon at the right of the "Download" button). 5. Click the "Download" button. 6. Follow the connection instructions to connect the micro:bit via WebUSB and download the programme. 7. Verify that the programme runs on the micro:bit. +8. Change the code to display a different icon on the LED matrix. +9. Click the "Download" button again. +10. No connection instructions should be show this time and the programme + should be downloaded directly to the micro:bit in a shorter amount of time. +11. Verify the new programme runs on the micro:bit with the new icon. ### Test 2: WebUSB Serial 1. Connect the micro:bit to the computer via USB. 2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. -3. Create a new project. -4. Add this code +3. Create a new project and add this code ```javascript basic.forever(function () { serial.writeLine("hello") From c021cc6b81831ed8b71532f2bedc496ced7bc378 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Fri, 11 Jul 2025 17:55:50 +0100 Subject: [PATCH 4/7] Add instructions to the WebUSB and BLE release tests to load specific MakeCode URLs. --- docs/release-tests/ble-flashing.md | 13 ++++++--- docs/release-tests/webusb.md | 42 +++++++++++++----------------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/docs/release-tests/ble-flashing.md b/docs/release-tests/ble-flashing.md index b931918a0fd..1dc5e3825b2 100644 --- a/docs/release-tests/ble-flashing.md +++ b/docs/release-tests/ble-flashing.md @@ -22,7 +22,11 @@ Three hex files needed: Two mobile/tablet devices needed: - Android device with the micro:bit app installed. + - To load a different MakeCode URL long touch the micro:bit logo in the + app main screen and a modal will appear with the option change - iOS device with the micro:bit app installed. + - To load a different MakeCode URL long press the MakeCode back chevron + to choose beta. ## Test 1: Full flashing with Bluetooth from "Out of Box" and "Meet the micro:bit" @@ -60,7 +64,7 @@ This test should be carried out with: Steps: 1. Follow steps from Test 1. -2. Change the blocks in the MakeCode editor to something different +2. Change the blocks in the MakeCode editor to do something different (e.g. display a different icon/message on the LED matrix). 3. Click the "Download" button. 4. Follow the connection instructions to connect the micro:bit via Bluetooth @@ -87,5 +91,8 @@ Steps: ) }) ``` -2. Open the micro:bit app and connect to the micro:bit. -3. TODO: Rest of the instructions will be added soon. +2. Open the micro:bit app, go to "My Programs". +3. Tap on the "Fetch MY_DATA (V2 only)" button and follow the instructions + to connect the micro:bit via Bluetooth. +4. Verify that the data a table of Time, X and Y acceleration values + is shown in the app. diff --git a/docs/release-tests/webusb.md b/docs/release-tests/webusb.md index 491a9e778ee..f9b685292fa 100644 --- a/docs/release-tests/webusb.md +++ b/docs/release-tests/webusb.md @@ -22,7 +22,7 @@ the latest official release, and the latest beta release. | V2.2x | 0257 | nRF52833/820 | Factory & latest official release | | V2.2x | 0258-beta | nRF52833/820 | Latest beta release | -### Test browsers, apps & Operating Systems +### Test browsers, apps & operating systems Each WebUSB test should be carried out with the latest version of these Chrome-based browsers and operating systems: @@ -35,22 +35,25 @@ Chrome-based browsers and operating systems: - Edge on Windows - MakeCode Offline App for Windows - https://makecode.microbit.org/offline-app + - This app needs to be packaged with the version of MakeCode under test. - MakeCode Offline App for macOS - https://makecode.microbit.org/offline-app + - This app needs to be packaged with the version of MakeCode under test. - MakeCode Windows Store App - https://apps.microsoft.com/detail/9nmqdq2xzkwk + - To load MakeCode beta, type `/@beta` in the extension search box. ## Tests to run on all matrix variations The following tests should be carried out with all combinations of the micro:bit boards, DAPLink versions, and browsers/apps listed in the -"Test Matrix" section. +"Test matrix" section. -As these tests can be repeated multiple times in the same computer with +As these tests can be repeated multiple times in the same browser/app with different micro:bit boards, when a test step indicates to create a new project, it is acceptable to use an existing project created in a previous test run. -### Test 1: WebUSB Download +### Test 1: WebUSB full flash, partial flash, and serial 1. Connect the micro:bit to the computer via USB. 2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. @@ -62,35 +65,26 @@ it is acceptable to use an existing project created in a previous test run. 6. Follow the connection instructions to connect the micro:bit via WebUSB and download the programme. 7. Verify that the programme runs on the micro:bit. -8. Change the code to display a different icon on the LED matrix. -9. Click the "Download" button again. -10. No connection instructions should be show this time and the programme - should be downloaded directly to the micro:bit in a shorter amount of time. -11. Verify the new programme runs on the micro:bit with the new icon. - -### Test 2: WebUSB Serial - -1. Connect the micro:bit to the computer via USB. -2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. -3. Create a new project and add this code +8. Change the code to this one: ```javascript basic.forever(function () { serial.writeLine("hello") basic.pause(1000) }) ``` -5. Click the "Download" button. -6. Follow the connection instructions to connect the micro:bit via WebUSB and - download the programme. -7. Click on "Show Data Device" button to open the serial console. -8. Verify that the serial console shows "hello" every second. +9. Click the "Download" button again. +10. No connection instructions should be shown this time and the programme + should be downloaded directly to the micro:bit in a shorter amount of time. +11. A "Show Data Device" button should appear, click it to open the serial + console. +12. Verify that the serial console shows "hello" every second. ## Tests on specific variations -This test should only be carried out with the configuration listed at the +These tests should only be carried out with the configuration listed at the beginning of each test. -### Test 3: WebUSB with incompatible DAPLink +### Test 2: WebUSB with incompatible DAPLink The following DAPLink versions are not expected to work with WebUSB, and this test is to ensure an error message suggesting a firmware update is shown. @@ -111,7 +105,7 @@ This test should be carried out with the following DAPLink versions: 7. Verify that an error message is shown suggesting a firmware update is required. -### Test 4: WebUSB within micro:bit classroom +### Test 3: WebUSB within micro:bit Classroom This test can be executed only once, using any micro:bit board with any DAPLink WebUSB compatible version, using Chrome on Windows. @@ -130,7 +124,7 @@ the MakeCode editor being embedded in classroom. download the programme. 8. Verify that the programme runs on the micro:bit. -### Test 5: WebUSB within micro:bit CreateAI +### Test 4: WebUSB within micro:bit CreateAI This test can be executed only once, using any micro:bit board with any DAPLink WebUSB compatible version, using Chrome on Windows. From 64578e52a42a0ec5cf5b23da4c07a3801729b556 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Fri, 18 Jul 2025 14:32:25 +0100 Subject: [PATCH 5/7] BLE & WebUSB test updates based on review comments. --- docs/release-tests/ble-flashing.md | 72 +++++++++++++++--------------- docs/release-tests/webusb.md | 28 +++++++----- 2 files changed, 53 insertions(+), 47 deletions(-) diff --git a/docs/release-tests/ble-flashing.md b/docs/release-tests/ble-flashing.md index 1dc5e3825b2..85a5855be62 100644 --- a/docs/release-tests/ble-flashing.md +++ b/docs/release-tests/ble-flashing.md @@ -2,12 +2,12 @@ ## Test preparations -Three hex files needed: -- "Meet the micro:bit": This is the program that runs on the micro:bit when +Four hex files needed: +- "Meet the micro:bit": This is the programme that runs on the micro:bit when it is first powered on from factory. - Downloadable from the micro:bit website: https://microbit.org/get-started/user-guide/meet-the-microbit-program/ -- "Out of Box": The previous factory program before the +- "Out of Box": The previous factory programme before the "Meet the micro:bit" was released. - Downloadable from the micro:bit website: https://microbit.org/get-started/user-guide/meet-the-microbit-program/ @@ -22,18 +22,29 @@ Three hex files needed: Two mobile/tablet devices needed: - Android device with the micro:bit app installed. - - To load a different MakeCode URL long touch the micro:bit logo in the - app main screen and a modal will appear with the option change + - To load a different MakeCode URL, long touch the micro:bit logo in the + app main screen and a modal will appear with the option to change - iOS device with the micro:bit app installed. - - To load a different MakeCode URL long press the MakeCode back chevron + - To load a different MakeCode URL, long press the MakeCode back chevron to choose beta. -## Test 1: Full flashing with Bluetooth from "Out of Box" and "Meet the micro:bit" +Two micro:bits needed: +- micro:bit V1 +- micro:bit V2 + +The micro:bits can be powered via USB for these tests, as that avoids any +possible issues or errors due to low batteries. + +## Test 1: Full & partial flashing with Bluetooth This test should be carried out with: - Android app - iOS app +And the following micro:bit versions: +- micro:bit V1 +- micro:bit V2 + A test run for each of these hex files is required: - "Out of Box" hex file - "Meet the micro:bit" hex file @@ -43,36 +54,23 @@ A test run for each of these hex files is required: Steps: 1. Connect the micro:bit to the computer via USB. 2. Copy the hex file under test to the `MICROBIT` USB drive. -3. Disconnect the micro:bit from the computer and connect a battery pack. -4. Open the app and load the MakeCode editor under tests. - - Instructions will be added soon. -5. Create a new MakeCode project with a simple program (e.g. display +3. Open the app and load the MakeCode editor under test. + - From the front page, select "Create Code" +4. Create a new MakeCode project with a simple programme (e.g. display something on the LED matrix). -6. Click the "Download" button. -7. Follow the connection instructions to connect the micro:bit via Bluetooth - and download the program. -8. Verify that the program runs on the micro:bit. - -## Test 2: Partial flashing - -Test 1 has to be performed inmediately before this test to ensure the micro:bit -is in a known state. - -This test should be carried out with: -- Android app -- iOS app - -Steps: -1. Follow steps from Test 1. -2. Change the blocks in the MakeCode editor to do something different + - If a programme has already been created from a previous test run, + it can be reused. +5. Tap the "Download" button and follow the instructions to connect the + micro:bit via Bluetooth and flash the programme. +6. Verify the programme is running on the micro:bit. +7. Change the blocks in the MakeCode editor to do something different (e.g. display a different icon/message on the LED matrix). -3. Click the "Download" button. -4. Follow the connection instructions to connect the micro:bit via Bluetooth - and download the program. -5. Verify the BLE flashing process was shorter than on Test 1. -6. Verify that the program runs on the micro:bit. +8. Tap the "Download" button and follow the instructions to flash the programme. +9. Confirm the BLE flashing process was shorter than the initial download from + step 5. +10. Verify that the new programme is running on the micro:bit. -## Test 3: Utility Service +## Test 2: Utility Service This test checks that the Utility Service is available and working on the builds of the MakeCode editor under test. @@ -81,6 +79,9 @@ This test should be carried out with: - Android app - iOS app +And the following micro:bit versions: +- micro:bit V2 only + Steps: 1. Flash the micro:bit with this MakeCode programme, using any method: ```javascript @@ -89,10 +90,11 @@ Steps: datalogger.createCV("y", input.acceleration(Dimension.Y)), datalogger.createCV("x", input.acceleration(Dimension.X)) ) + basic.pause(100) }) ``` 2. Open the micro:bit app, go to "My Programs". 3. Tap on the "Fetch MY_DATA (V2 only)" button and follow the instructions to connect the micro:bit via Bluetooth. -4. Verify that the data a table of Time, X and Y acceleration values +4. Verify that the data as a table of Time, X and Y acceleration values is shown in the app. diff --git a/docs/release-tests/webusb.md b/docs/release-tests/webusb.md index f9b685292fa..35f43d24e81 100644 --- a/docs/release-tests/webusb.md +++ b/docs/release-tests/webusb.md @@ -56,28 +56,32 @@ it is acceptable to use an existing project created in a previous test run. ### Test 1: WebUSB full flash, partial flash, and serial 1. Connect the micro:bit to the computer via USB. -2. Open the micro:bit MakeCode editor under test in a Chrome-based browser. -3. Create a new project, and add a block to display an icon on the LED matrix. -4. If the micro:bit was automatically connected via WebUSB, disconnect it from +2. Flash a hex file that has not been generated by the MakeCode editor under + test. + - For example, the "Meet the micro:bit" hex file from: + https://microbit.org/get-started/user-guide/meet-the-microbit-program/ +3. Open the micro:bit MakeCode editor under test in a Chrome-based browser. +4. Create a new project, and add a block to display an icon on the LED matrix. +5. If the micro:bit was automatically connected via WebUSB, disconnect it from the editor by clicking on the "Disconnect" button in "Download" menu (three dots icon at the right of the "Download" button). -5. Click the "Download" button. -6. Follow the connection instructions to connect the micro:bit via WebUSB and +6. Click the "Download" button. +7. Follow the connection instructions to connect the micro:bit via WebUSB and download the programme. -7. Verify that the programme runs on the micro:bit. -8. Change the code to this one: +8. Verify that the programme runs on the micro:bit. +9. Change the code to this one: ```javascript basic.forever(function () { serial.writeLine("hello") - basic.pause(1000) + basic.pause(100) }) ``` -9. Click the "Download" button again. -10. No connection instructions should be shown this time and the programme +10. Click the "Download" button again. +11. No connection instructions should be shown this time and the programme should be downloaded directly to the micro:bit in a shorter amount of time. -11. A "Show Data Device" button should appear, click it to open the serial +12. A "Show Data Device" button should appear, click it to open the serial console. -12. Verify that the serial console shows "hello" every second. +13. Verify that the serial console shows "hello" every second. ## Tests on specific variations From 2cc37fc72023fdfb2d172632fa53e69971f18811 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Wed, 23 Jul 2025 18:12:15 +0100 Subject: [PATCH 6/7] Improvements to the BLE app testing from PR review. --- docs/release-tests/ble-flashing.md | 31 ++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/release-tests/ble-flashing.md b/docs/release-tests/ble-flashing.md index 85a5855be62..acd7ea4a885 100644 --- a/docs/release-tests/ble-flashing.md +++ b/docs/release-tests/ble-flashing.md @@ -15,15 +15,17 @@ Four hex files needed: project can be flashed via Bluetooth with the MakeCode editor under test. - Create a hex file from the latest MakeCode live editor: https://makecode.microbit.org/ -- Python Editor hex file: To ensure MakeCode editor under test can BLE flash - micro:bits after using the Python Editor. +- Python Editor hex file: To ensure the MakeCode editor under test can + BLE flash micro:bits after using the Python Editor. - Go to https://python.microbit.org and download the hex file - from the default project. + with the default project. + - This hex file can only be tested with micro:bit V2 +- MakeCode Under Test hex file: To ensure it can be flashed over. Two mobile/tablet devices needed: - Android device with the micro:bit app installed. - - To load a different MakeCode URL, long touch the micro:bit logo in the - app main screen and a modal will appear with the option to change + - To load a custom MakeCode URL long touch the micro:bit logo in the app + main screen. A modal will appear with the option change the MakeCode URL. - iOS device with the micro:bit app installed. - To load a different MakeCode URL, long press the MakeCode back chevron to choose beta. @@ -49,12 +51,13 @@ A test run for each of these hex files is required: - "Out of Box" hex file - "Meet the micro:bit" hex file - MakeCode Live Editor hex file -- Python Editor hex file +- Python Editor hex file (micro:bit V2 only) +- MakeCode Under Test hex file Steps: 1. Connect the micro:bit to the computer via USB. 2. Copy the hex file under test to the `MICROBIT` USB drive. -3. Open the app and load the MakeCode editor under test. +3. Open the micro:bit app and load the MakeCode editor under test. - From the front page, select "Create Code" 4. Create a new MakeCode project with a simple programme (e.g. display something on the LED matrix). @@ -83,7 +86,10 @@ And the following micro:bit versions: - micro:bit V2 only Steps: -1. Flash the micro:bit with this MakeCode programme, using any method: +1. Flash the micro:bit with this programme usin the MakeCode Under Test. + This project needs the datalogger extension to be added. + Ensure this project does not have the Bluetooth extension. + The board can be flashed using any method. ```javascript basic.forever(function () { datalogger.log( @@ -98,3 +104,12 @@ Steps: to connect the micro:bit via Bluetooth. 4. Verify that the data as a table of Time, X and Y acceleration values is shown in the app. +5. Add the Bluetooth extension to the project and flash the micro:bit again. +6. Back to the app main menu, tap on the "Pair" button to pair the micro:bit. + - A WebUSB flash would have deleted the previous pair. +7. Press the reset button on the micro:bit to ensure the programme is running. +8. Back to the app main menu, go to "My Programs" and tap on the + "Fetch MY_DATA (V2 only)" button. +9. In the "Fecth MY_DATA" screen, select "During Logging" at the top and + tap the "Fetch" button. +10. Verify data is displayed and the fetch has not failed. From 1ccc5080e75889a5df41445977125538faebaf08 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Thu, 7 Aug 2025 00:02:32 +0100 Subject: [PATCH 7/7] More improvements to the BLE app testing from PR review. --- docs/release-tests/ble-flashing.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/release-tests/ble-flashing.md b/docs/release-tests/ble-flashing.md index acd7ea4a885..2eb1ea91a5b 100644 --- a/docs/release-tests/ble-flashing.md +++ b/docs/release-tests/ble-flashing.md @@ -26,9 +26,11 @@ Two mobile/tablet devices needed: - Android device with the micro:bit app installed. - To load a custom MakeCode URL long touch the micro:bit logo in the app main screen. A modal will appear with the option change the MakeCode URL. + - This URL setting will be reset every time the app is quit - iOS device with the micro:bit app installed. - - To load a different MakeCode URL, long press the MakeCode back chevron - to choose beta. + - To load a different MakeCode version, long press the MakeCode back + chevron to choose beta. + - The iOS app can only choose between beta and live. Two micro:bits needed: - micro:bit V1 @@ -57,21 +59,24 @@ A test run for each of these hex files is required: Steps: 1. Connect the micro:bit to the computer via USB. 2. Copy the hex file under test to the `MICROBIT` USB drive. -3. Open the micro:bit app and load the MakeCode editor under test. +3. Remove the previous micro:bit pairing from the iOS or Android device. +4. Open the micro:bit app and load the MakeCode editor under test. - From the front page, select "Create Code" -4. Create a new MakeCode project with a simple programme (e.g. display + - Click on the cog, and the "About" menu entry, check the MakeCode version + in this modal +5. Create a new MakeCode project with a simple programme (e.g. display something on the LED matrix). - If a programme has already been created from a previous test run, it can be reused. -5. Tap the "Download" button and follow the instructions to connect the - micro:bit via Bluetooth and flash the programme. -6. Verify the programme is running on the micro:bit. -7. Change the blocks in the MakeCode editor to do something different +6. Tap the "Download" button and use "My pattern is different" to force pairing, + then follow the instruction to flash the programme. +7. Verify the programme is running on the micro:bit. +8. Change the blocks in the MakeCode editor to do something different (e.g. display a different icon/message on the LED matrix). -8. Tap the "Download" button and follow the instructions to flash the programme. -9. Confirm the BLE flashing process was shorter than the initial download from +9. Tap the "Download" button and follow the instructions to flash the programme. +10. Confirm the BLE flashing process was shorter than the initial download from step 5. -10. Verify that the new programme is running on the micro:bit. +11. Verify that the new programme is running on the micro:bit. ## Test 2: Utility Service