I've read about how HttpClient's LocalTestServer
can be used for automated testing, however I can't seem to find where it's been moved. I tried defining dependency to httpclient
with tests
classifier:
'org.apache.httpcomponents:httpclient:4.5.2:tests'
but there doesn't seem to be a LocalTestServer
class defined in there. Has this been discontinued?
Your test should now extend org.apache.http.localserver.LocalServerTestBase
.
This is available in the httpclient
module with classifier tests
.
Your pom could look like:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
Related issue:
https://issues.apache.org/jira/browse/HTTPCLIENT-1172
Related changeset:
https://github.com/apache/httpclient/commit/2ebd8202849c1f4a17d4320543e315a46cbfdc10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With