You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Martin Stein <ms...@gmail.com> on 2013/07/30 14:16:52 UTC

How to test URL/filter chain configuration

Hi all,

After integrating Shiro with our web application project, we now need to
write unit/integration tests for our setup. Specifically, how can I test my
URL filter chain configuration?

To be more precise:
a) How can I test that a given URL actually triggers a particual filter
chain (that was configured in the [url] section of shiro.ini)?
(I need this to make sure that the URL rules I've written are correct.)

b) How can I test that the chain actually performs as it should? I need to
make sure that my own, custom written authenticating-filter in combination
with the next filter in the chain - the Shiro roles[admin] filter - do what
they should.

I've already read the section about testing (
http://shiro.apache.org/testing.html) but it is not clear how to do this.
Of course, I can setup Arquillian and write full-blown tests of the
complete stack, but I'd prefer to test this internally with Shiro.

Thanks and Regards,
Martin