Reputation: 7149
What techniques and design strategies have people used to aid in unit testing Jade applications? In particular, how do people typically go about testing Behaviours - which are tightly coupled to the Agent instance and the Jade environment? 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.
Thanks.
Upvotes: 3
Views: 1160
Reputation: 144
JADE has a tendency to overuse inheritance, which, as you rightly point out, results (among other things) in highly coupled, difficult-to-test Behaviours.
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. We plan to release this as OSS, but there are a few administerial hoops to jump through first.
At home, I've started work on jade-oo, a backwards-compatible refactoring of JADE that uses unit-testable POJOs for Behavioural logic. 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.
Update: I've added examples and documentation to the jade-oo site. Please do take a look and let me know what you think.
Upvotes: 2