Python Forum
Testing with Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Testing with Python (/thread-2717.html)



Testing with Python - harrington40 - Apr-05-2017

Hell all. I have few questions about developing an automating test for the real-time measuring device.
 The goal is to write a couple of test cases to test the system measurement and other parameters from two input sensors.

 The following are True: Linux OS... 
 I have researched the following Pytest, unittest ect. What could be a good python framework?

 Any suggestion will be okay to help steer me in the right direction ....


RE: Testing with Python - Larz60+ - Apr-05-2017

Here's something to look at: https://www.slideshare.net/YuvarajaRavi/automated-hardware-testing-using-python


RE: Testing with Python - j.crater - Apr-05-2017

When it comes to testing with Python, Robot Framework is a good tool to know:
http://robotframework.org/

Although in your particular case, it might prove to have too much overhead. And depending on how you interact with sensors (what protocol?) it might require you to write extra Python code for interfacing hardware.


RE: Testing with Python - harrington40 - Apr-08-2017

Thanks for the all the suggestions. However Question applied to a real time device testing.
example: a Barcode scanner, how do you test a bar code scanner using python?


RE: Testing with Python - Larz60+ - Apr-08-2017

If a serial device, I would test the connection first with putty.
Now you will know exactly what protocol is needed in the software.

Once you know that's working properly move on to code.
Try something simple, like sending a command to switch to code128 or 3 of 9
and see if you can read the return code (also try this with putty so you know what to expect for a return code).


RE: Testing with Python - harrington40 - Apr-16-2017

Thanks... This is the way to go.