I am developping a Swing application that needs to communicate with a distant HTTP server. That application can be potentially used behind proxies.
I must then : - detect automatically network proxy (potentially several on the same network) - let the user manually enter a proxy configuration.
I want to write an integration test to validate thoses aspects, without having to install proxies on every CI machines and every developper machine. How I see things :
- integration test (with junit) start an "embedded" proxy (@BeforeClass) and a somewhat dummy http server
- my tests (@Test)
- test that this proxy can be detected automatically and open a connection to my dummy http server and successfully retrieve datas from it
- manually set the proxy and perform the same test as above
I have heard about the "littleProxy" component but didn"t tried it yet.
Can anyone shed some advice / help / guidance regarding the best approach to solve my problem ?