google / openhtf

The open-source hardware testing framework.
Apache License 2.0
530 stars 217 forks source link

How to build a test running multiple test groups concurrently, but showing I/O data of all test groups on the same webpage? #1080

Open daviddengma opened 1 year ago

daviddengma commented 1 year ago

We are building a manufacturing test station, which needs to run test groups over 4 modules at a time. Those 4 test groups share couple of instruments so they will need to take turn on those test cases; but other than that they have their own resources for remaining test cases. All the I/O data, like user input, prompts and logs, test results, of 4 test groups need to be displayed and refreshed on a single webpage. How does openhtf support such a use case? Any suggestions are highly appreciated.

kehrazy commented 1 year ago

well, similar functionality is already in the _MonitorThread class, however:


if __name__ == "__main__":
    executor = htf.Test(
        htf.ConcurrentGroup(
            ...  # < a list of phases, just as a thread
        ),
        htf.ConcurrentThread(
            ...
        )
    )
    executor.execute()

So, the executor has a global threading.Event(). When all of the ConcurrentThreads stop -> kill the runner thread?

This way this API wouldn't break the existing APIs.

Although I wouldn't have any idea how does this mess up the GUI. I would imagine that the GUI would need some reimagination.