-
Notifications
You must be signed in to change notification settings - Fork 334
Integration tests #1838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Integration tests #1838
Conversation
dlech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, having something like this would be really great. And I already have one of these dongles already.
It would help speed things up if we could split this into multiple pull requests, ideally not changing much more than 500 lines at a time. 2000+ lines is just too much to try to review all at once.
And I wouldn't worry about testing different Python versions as we generally haven't had issues related to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not want to have binary files committed to the source tree. We can replace this with a URL to download it from a trusted source and commit a hash to source to verify that the file at the URL hasn't changed.
| Setup | ||
| 1. install `nrfutil` | ||
| 2. install `nrf5sdk-tools` via `nrfutil install nrf5sdk-tools` | ||
| 3. `pip install west` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a new group in the pyproject.toml file so that it gets installed in the virtual environment instead of globally.
| 1. install `nrfutil` | ||
| 2. install `nrf5sdk-tools` via `nrfutil install nrf5sdk-tools` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need some links on where to get these tools.
This adds integration tests for bleak. It works by emulating a BLE device with
bumblein conjunction with an nRF52840 Dongle.I currently only tested this with a MacBook and the CoreBluetooth backend. But in principle this should also work similar on Linux and Windows. I dont think that it will be possible to get 100% coverage (e.g. permission handling is not automatically testable), but it will catch many cases. I think, that it should also be possible to add
toxto automatically test all supported python versions.I am sharing this as a draft to get high level feedback on whether integration tests are interesting in this way. Then I would continue working on this to test the other platforms as well. I developed this, because I need some way to test my work on an
rubicon-objcbackend (see #1833).