Skip to content

tests: Add board qualification tests for user pins.#94

Merged
nedseb merged 4 commits intofeature/board-qualification-frameworkfrom
feature/board-pins
Mar 13, 2026
Merged

tests: Add board qualification tests for user pins.#94
nedseb merged 4 commits intofeature/board-qualification-frameworkfrom
feature/board-pins

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Mar 13, 2026

Summary

Closes #88
Depends on #89 (framework extension)

Adds initial board qualification tests for user-accessible pins on the edge connector and crocodile clip pads. These tests verify basic GPIO/ADC functionality of each pin.

Note: Full pin testing requires a physical test bench (jig). Current tests cover basic ADC reads and digital pull-up reads. More comprehensive loopback/continuity tests will be added once the test bench hardware is designed.

Scenario: tests/scenarios/board_pins.yaml

Analog pin tests (ADC read)

Test Pin STM32WB55
P0 analog read P0 PC4
P1 analog read P1 PA5
P2 analog read P2 PC5
P3 analog read P3 PA2
P4 analog read P4 PA4
P10 analog read P10 PA6

Digital pin tests (pull-up read)

Test Pin STM32WB55
P6 digital pull-up P6 PC3
P7 digital pull-up P7 PA9
P8 digital pull-up P8 PA15
P9 digital pull-up P9 PC2
P12 digital pull-up P12 PC6
P16 digital pull-up P16 PE4

How to test

# Mock tests (no regression)
pytest tests/ -k mock

# Collect pin board tests
pytest tests/ -k board_pins --collect-only

# Run on hardware (requires STeaMi board)
pytest tests/ --port /dev/ttyACM0 -k board_pins -s -v

Test results

$ pytest tests/ -k mock -q
41 passed, 95 deselected

$ pytest tests/ -k board_pins --collect-only -q
12 tests collected (6 analog + 6 digital)

$ pytest tests/ -k board_pins -q  # (sans --port)
12 skipped  # correctly skipped without hardware

$ pytest tests/ --port /dev/ttyACM0 -k board_pins -s -v
============================== test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.3.5, pluggy-1.5.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/nedjar/sandbox/micropython-steami-lib
configfile: pytest.ini
plugins: typeguard-4.4.2
collected 115 items / 103 deselected / 12 selected                                                                                                                                                                                                                          

tests/test_scenarios.py::test_scenario[board_pins/Pin P0 (PC4) analog read/hardware] 27158
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P1 (PA5) analog read/hardware] 23989
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P2 (PC5) analog read/hardware] 27062
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P3 (PA2) analog read/hardware] 26166
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P4 (PA4) analog read/hardware] 24373
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P10 (PA6) analog read/hardware] 25974
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P6 (PC3) digital pull-up read/hardware] 1
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P7 (PA9) digital pull-up read/hardware] 1
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P8 (PA15) digital pull-up read/hardware] 1
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P9 (PC2) digital pull-up read/hardware] 1
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P12 (PC6) digital pull-up read/hardware] 1
PASSED
tests/test_scenarios.py::test_scenario[board_pins/Pin P16 (PE4) digital pull-up read/hardware] 1
PASSED

====================== 12 passed, 103 deselected in 3.06s =======================

Hardware test results will be added after board validation on test bench.

Test plan

  • ruff check tests/ — passed
  • pytest tests/ -k mock — 41 passed (no regression)
  • 12 pin board tests correctly collected and skipped without --port
  • Hardware validation on STeaMi board with test bench (pending)

@nedseb nedseb requested a review from Copilot March 13, 2026 09:10
@nedseb nedseb self-assigned this Mar 13, 2026
@nedseb nedseb added enhancement New feature or request test labels Mar 13, 2026
@nedseb nedseb linked an issue Mar 13, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an initial board-level qualification scenario to exercise user-accessible pins on the STeaMi edge connector/croc pads using the new type: board scenario support (from #89).

Changes:

  • Introduces tests/scenarios/board_pins.yaml as a type: board scenario.
  • Adds 6 analog (ADC) smoke tests and 6 digital pull-up read tests for user pins.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/scenarios/board_pins.yaml Outdated
Comment thread tests/scenarios/board_pins.yaml Outdated
@nedseb nedseb force-pushed the feature/board-pins branch from 243d844 to a61baf8 Compare March 13, 2026 09:15
@nedseb
Copy link
Copy Markdown
Contributor Author

nedseb commented Mar 13, 2026

Corrections suite à la review Copilot (f3fbfc9) :

  • Commentaire header reformulé : précise que ce sont des smoke tests (configuration + readback), pas des tests de continuité électrique. Mentionne explicitement que la continuité nécessite un banc d'essai avec des tensions connues.
  • Tests ADC simplifiés : adc.read_u16() suivi de result = True au lieu du tautologique 0 <= raw <= 65535. Le test vérifie que l'ADC peut être configuré et lu sans erreur.

@nedseb nedseb merged commit 4922d57 into feature/board-qualification-framework Mar 13, 2026
@nedseb nedseb deleted the feature/board-pins branch March 13, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: Add board qualification tests for user pins (edge connector).

2 participants