Search code examples
pythoneclipsetestingpydevtest-reporting

Python-PyDev-Eclipse test report framework (with tables, graphs, diagram,...)


I am novice to Python robotframework and so far I understood it is good for writing software "UnitTests", I suppose that test reports are just a simple textual PASS/FAIL reports driven by "assert" function like: SomeObj.assert('No signal on line xyz') with eventualy line of code where assert happens, right ?

In case of testing some HW/devices externaly connected to PC one have complex measurements to perform and accordingly a lot of measurement data produced by the test. Is there any library/plug-in/framework which would provide to Python(in connection to Eclipse+PyDev) such an interface so that the complex reports(diagrams/graphs/tables... etc.) could be also presented ?

Thanks!

best regards, Zoran


Solution

  • Why don't you write "normal" Python code to test an external device?

    E.g. take a look at the following pseudo code:

    1. Ensure connection to measurement equipment is working fine (maybe your devices support a ping)
    2. Bring device under test (DUT) online
    3. Ensure DUT is online and working fine
    4. If needed do some test steps (e.g. send commands to press a button,....)
    5. Execute the measurement, dump those values in a text file, csv, Excel sheet, DB, or ...
    6. Evaluate the results (to set result to failed or passed or ...)

    Onto the results gained in step 5, you can do anything you like. Generate charts with Excel macros, generate html charts from the DB,...

    If you write a test with a structure similar to my pseudo code you'll gain a lot of flexibility.

    Since testing of HW comes in all kind of different flavors:

    • a couple of test cases (tc) vs a set of thousands of tc
    • simple vs complex tc
    • ...

    it's rather impossible to recommend you, if you should write your own framework or should go with an existing one.

    To get a feeling what a 'bigger' framework might offer you, have a look at e.g. EXAM