Testing a Custom Driver without being Wired #6237
AlessandroLodi
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following an email exchange, I am posting here the back-and-forth I had with @jenshnielsen. I thank him for both enforcing the correct contribution behavior (writing here instead of personal communications) and for the answer he provided.
Question
I'm currently working on developing a custom driver for a Keithley 6517A electrometer using QCoDeS. As the instrument is not always physically available for testing, I'm looking for a way to test my driver implementation without connecting to the actual hardware.
I've been trying to use the DummyInstrument class for this purpose but without success. I'm therefore wondering if there's a recommended way to pass a custom-made driver written with QCoDeS to a DummyInstrument (or another class) for testing purposes.
My current approach involves something like this:
Answer
There are no great solutions but for simple tests you may want to consider pyvisa-sim.
This enables you to write a yaml file that defines simple request response patterns. We have a bunch of drivers in qcodes that have tests written that way that you may want to consult.
Beta Was this translation helpful? Give feedback.
All reactions