java-express
java-express copied to clipboard
testability - expose access to InetSocketAddress of HttpServer
When running tests on CI/CD, I need to start the application under test on random port with Express.listen(0).
Then I'd like to obtain the actual port number to hand it over to RestAssured (or whatever other rest client)
Proposed addition to express.Express class:
public InetSocketAddress getAddress() {
return httpServer.getAddress();
}
This has been addressed in my fork of this project if you want to check it out. https://github.com/masecla22/java-express
You can access it through
Express.getHttpServer().getAddress();
This has been addressed in my fork of this project if you want to check it out. https://github.com/masecla22/java-express
You can access it through
Express.getHttpServer().getAddress();
@masecla22 , I see the Express.getHttpServer() on your master, but it seems unpublished - this method is not existing in com.github.masecla22:java-express:0.2.2. Would you mind publishing?