O'Reilly logo

Drools JBoss Rules 5.0 Developer's Guide by Michal Bali, Bogdan Brinzarea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Testing

Testing is an important part of the development life cycle. In the earlier chapters, we've learned how to write unit and integration tests. This chapter will provide some additional information about testing and troubleshooting rules. It will focus on how to write good unit tests, integration tests, and acceptance tests. It will look at testing support in Guvnor (the BRMS) including some support for static analysis of rules, and finally some useful advice for rule debugging will be given.

How to write unit tests for rules

By definition a 'unit' in a unit test is the smallest testable part of an application—in our case, a rule. Writing a unit test for every rule is expensive. It effectively doubles the cost of writing a rule. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required