You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Fredrik Espedal <fr...@evry.com> on 2018/08/15 08:34:19 UTC

Testing filters

Hello,

I am currently working on this issue, implementing http-signature:
https://issues.apache.org/jira/browse/CXF-7753

I have created a JAX-RS filter, and I'm wondering, what is the best way to test a filter to make sure it's working properly? I have searched through the CXF repository for examples, but haven't been able to
locate a unit test or other tests that uses filters. Should I just make a separate project and test the filter that way?

Best regards
Fredrik Espedal
Systemutvikler, 2L33 Security Systems
Fredrik.Espedal@evry.com
M +47 476 64 717
[cid:image002.png@01CDEE4D.C6FB68B0]



Sensitivity: Internal

Re: Testing filters

Posted by Colm O hEigeartaigh <co...@apache.org>.
Typically you would test the filters in the system tests. For example
"systests/rs-security" holds the tests for security filters for JAX-RS
endpoints:

https://github.com/apache/cxf/tree/7d3cf5784f116f8882badde4f5cb4cb3fd5b03b2/systests/rs-security

For example, the JWT filters are tested here:

https://github.com/apache/cxf/tree/7d3cf5784f116f8882badde4f5cb4cb3fd5b03b2/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jose/jwt

With spring configuration here:

https://github.com/apache/cxf/tree/7d3cf5784f116f8882badde4f5cb4cb3fd5b03b2/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/jose/jwt

Colm.

On Wed, Aug 15, 2018 at 9:34 AM, Fredrik Espedal <fr...@evry.com>
wrote:

> Hello,
>
>
>
> I am currently working on this issue, implementing http-signature:
> https://issues.apache.org/jira/browse/CXF-7753
>
> I have created a JAX-RS filter, and I’m wondering, what is the best way to
> test a filter to make sure it’s working properly? I have searched through
> the CXF repository for examples, but haven’t been able to
>
> locate a unit test or other tests that uses filters. Should I just make a
> separate project and test the filter that way?
>
>
>
> Best regards
>
> *Fredrik Espedal*
>
> Systemutvikler, 2L33 Security Systems
>
> Fredrik.Espedal@evry.com
>
> *M *+47 476 64 717
>
> [image: cid:image002.png@01CDEE4D.C6FB68B0]
>
>
>
> Sensitivity: Internal
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com