Skip to content
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

integration test #12

Open
tahnok opened this issue Oct 27, 2024 · 3 comments
Open

integration test #12

tahnok opened this issue Oct 27, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@tahnok
Copy link
Owner

tahnok commented Oct 27, 2024

Idea: add a series of tests that interact with a real ring to verify functionality (like changing python versions, or a new ring)

I think this could be a big pytest file, but it shouldn't be executed by default, you should need to invoke/run it explicitly

Things to check:

  • can get info (firmware / hardware version) and battery
  • can get steps and hr log (shouldn't expect any particular response, NoData or something are both valid)
  • scan works? idk how this would function
  • can get-heart-rate-log-settings, set-heart-rate-log-settings
  • can set-time (this should be safe to do)
  • can send raw command (maybe to verify that battery works?)

Don't need to do all of this in one PR

@tahnok tahnok added the help wanted Extra attention is needed label Oct 27, 2024
@gregpaton08
Copy link

Would you be opposed to using something like Robot for this? I might be able to add a few basic tests.

@tahnok
Copy link
Owner Author

tahnok commented Jan 4, 2025

I'm open to the idea, but my first impression is that it's a bit too heavy for something that could be plain python (or pytest) with lots of asserts

What would be useful from Robot?

@gregpaton08
Copy link

Gotcha. I've found Robot to be useful for testing at the CLI level and interacting with system things. Pytest is great for unit tests, but once you need to test a CLI I've found myself writing a lot of extra, error-prone logic (subprocess and parsing stdout) whereas Robot has that built in. Robot also has a high-level syntax so the purpose of tests is pretty clear.

I guess it also depends on how you envisioned this working. Would you be importing Python modules and calling functions directly? Or would you be running the CLI and checking output (similar to how the end user would operate)? Robot is good for the latter case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants