Custom Filter Chain for TestClasses? Custom Filter Chain for TestClasses? selenium selenium

Custom Filter Chain for TestClasses?


See Reference Spring Boot docs how to register or disable servlet filters. To register one, just implement Filter interface and register it with @Bean annotation.

But, my understanding is that Selenium testing should test application as black box and shouldn't mix testing context with production context. Optionally this testing can happen against production environment.

Personally would include one or two sanity tests into application build itself to make sure it's working end to end. But I wouldn't mix contexts anyway.

Otherwise I would place all the tests into separate project firing requests against PROD or continuous delivery environment.

BTW, I highly recommend looking into Page Object pattern when doing Selenium testing.