arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1705.04669cs.SE
收藏

KompicsTesting -单元测试事件流

KompicsTesting - Unit Testing Event Streams

Ifeanyi W. Ubah, Lars Kroll, Alexandru A. Ormenisan, Seif Haridi

摘要:

在本文中,我们提出了KompicsTesting,一个框架的单元测试组件的Kompics组件模型。Kompics中的组件是事件驱动的实体,它们仅通过消息传递进行异步通信。与Actor模型中的Actor类似,它们在消息传递中不共享其内部状态,与使用共享状态的其他并发模型相比,这使得它们更不容易出错。然而,它们既不能避免简单的逻辑和规范错误,也不能避免诸如源于非确定性的数据字符之类的错误。因此,需要一种工具,能够以类似于用于函数和模块化段代码的xUnit框架的方式,对消息传递组件进行快速和迭代的开发和测试。这些框架以命令式的方式工作,不适合测试消息传递组件,因为这些组件的行为被编码在它们发送和接收的消息流中。在这项工作中,我们提出了一个理论框架,用于描述和验证消息传递组件的行为,独立的模型和框架实现,以类似于使用正则表达式描述字符流的方式。我们展示了如何使用这种方法来执行黑盒和白盒测试的组件,并说明其可行性,通过设计和实现基于这种方法,KompicsTesting的原型。

英文摘要:

In this paper we present KompicsTesting, a framework for unit testing components in the Kompics component model. Components in Kompics are event-driven entities which communicate asynchronously solely by message passing. Similar to actors in the actor model, they do not share their internal state in message-passing, making them less prone to errors, compared to other models of concurrency using shared state. However, they are neither immune to simpler logical and specification errors nor errors such as dataraces that stem from nondeterminism. As a result, there exists a need for tools that enable rapid and iterative development and testing of message passing components in general, in a manner similar to the xUnit frameworks for functions and modular segments code. These frameworks work in an imperative manner, ill suited for testing message-passing components given that the behavior of such components are encoded in the streams of messages that they send and receive. In this work, we present a theoretical framework for describing and verifying the behavior of message-passing components, independent of the model and framework implementation, in a manner similar to describing a stream of characters using regular expressions. We show how this approach can be used to perform both black box and white box testing of components and illustrate its feasibility through the design and implementation a prototype based on this approach, KompicsTesting.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑