简体   繁体   English

单位测试玉

[英]Unit testing Jade

What techniques and design strategies have people used to aid in unit testing Jade applications? 人们用什么技术和设计策略来帮助Jade应用程序进行单元测试? In particular, how do people typically go about testing Behaviours - which are tightly coupled to the Agent instance and the Jade environment? 特别是,人们通常如何测试行为 - 它们与Agent实例和Jade环境紧密耦合? I'm aware of the JadeMX project, but this appears to be geared more towards system testing - in particular the message exchange between collaborating agents. 我知道JadeMX项目,但这似乎更倾向于系统测试 - 特别是协作代理之间的消息交换。

Thanks. 谢谢。

JADE has a tendency to overuse inheritance, which, as you rightly point out, results (among other things) in highly coupled, difficult-to-test Behaviours. JADE倾向于过度使用继承,正如你正确指出的那样,在高度耦合,难以测试的行为中产生(等等)结果。

In work, we wrote an adaptive layer that sits between our Agents/Behaviours and the JADE ones, and allows us to test our behaviours in isolation. 在工作中,我们编写了一个位于我们的代理/行为和JADE之间的自适应层,并允许我们单独测试我们的行为。 We plan to release this as OSS, but there are a few administerial hoops to jump through first. 我们计划将此作为OSS发布,但是有一些管理层可以首先跳过。

At home, I've started work on jade-oo , a backwards-compatible refactoring of JADE that uses unit-testable POJOs for Behavioural logic. 在家里,我开始研究jade-oo ,这是JADE的向后兼容重构,它使用单元可测试的POJO进行行为逻辑。 It's still pretty much in the alpha stage, but so far I've been able to produce Behaviours with much less boilerplate code, and much more testable logic. 它仍然处于alpha阶段,但到目前为止,我已经能够以更少的样板代码和更多可测试的逻辑生成行为。

Update: I've added examples and documentation to the jade-oo site. 更新:我已经在jade-oo网站上添加了示例和文档。 Please do take a look and let me know what you think. 请看看,让我知道你的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM