Simplest way to run the same suite of tests on multiple devices #1466
Unanswered
tadeas-vintrlik
asked this question in
Q&A
Replies: 1 comment
-
The method I used in the past was to use templating in the environment config and then call pytest multiple times. For your config that would mean:
And then call it like:
Of course in this for-loop the acquire/release should be also done to not block all the places all the time. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was wondering anyone might have stumbled upon a similar problem.
Infrastructure and setup
Let's say I have 5 devices connected via serial to raspberry pi running the exporter which expoerts these 5 devices as separate places.
Test
For simplicity sake let's suppose I want to run a trivial test to see if all of the serial ports are working by using a simple kind of hello world test like this:
My current solution is a setup little like this:
Configuration files for devices
RemotePlace
Shell script to run all the tests
--lg-env
Questions
My question is: Is there a simpler way to do this?
Is there some way to specify the environment for all places in a single yaml?
Is there a way acquire the devices automatically and unlock them within the tests?
Ideally I would like to run a simple
pytest --lg-env shared.yaml tests/test_shared.yaml
without duplication in neither the environment nor the tests code, but if that isn't possible what is presently the simplest way possible? Or is my approach good enough?Thank you for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions