金曜日 10:55 a.m.–11:25 a.m.
Room 201 #pyconjp_201Industrial Test Automation with Asyncio
Justus Perlwitz
- 対象レベル:
- 中級
- カテゴリ:
- Industry Uses
- ビデオ:
- https://youtu.be/M_RFmiR4xac
説明
In this talk we'll explore how to use the new Python 3 asyncio library to automate hardware-software integration tests for industrial automation. We will find out how asynchronous coroutines can simplify and speed up distributed tests in real world environments, and what possible difficulties to watch out for.
概要
# Industrial Test Automation with Asyncio
Most internet examples of Asyncio cover writing faster HTTP services. The new `async` and `await` syntax has proven to make complex concurrent tasks easier to write and easier to reason about. Two great examples for libraries that support asyncio are `aiohttp` and `uvloop`. In this talk on the other hand, we will explore a completely different way of leveraging Python's new asynchronous capabilities and find out how to orchestrate complex hardware based software integration tests.
Having used Python and Asyncio in a embedded development project for a big railway signaling manufacturer, I was able to leverage Asyncio to better model tests that involve multiple machines used in typical redundant tests in industrial automation. Not only are test cases easier to set up, since they would otherwise typically involve a lot of multithreaded code, test results are easier to analyze and it is possible to retrieve test results from test hardware much faster.
Overall, the resulting increase in testing speed makes the develop/test feedback loop faster and can produce more reliable and reproducible results during hardware and software certification processes. The cost saving potential for companies is enormous.