O'Reilly logo

Drools JBoss Rules 5.X Developer's Guide by Michal Bali

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

Summary

We've learned some principles on how to write rule unit tests, integration tests, and acceptance tests. Unit tests should test each rule in isolation while mocking all other components. Integration tests should test a knowledge base as a whole. The acceptance tests are geared toward more technically skilled business users. With a nice web interface provided by Guvnor, a user can test the rules by setting up input data with expectations. Guvnor then executes these tests and reports results back.

Static analysis of rules was shown as a very easy way of testing rules. Currently it provides only limited value, but as the drools-verifier module evolves, it may be a powerful tool in the future.

We've seen some techniques for rule troubleshooting. ...

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