Story
As a Galasa user, I want to be able to configure the host and port of an HTTP Client provisioned by the HTTP Manager via CPS properties, so that I could run the same Galasa test against different endpoints without having to hard code this into the test and recompile every time.
Background
The HTTP Manager currently has a method setURI which allows the user to set the URI for the HTTP Client in the test. However this requires the value to be hardcoded in the test. If a tester wanted to run the same Galasa test that runs HTTP requests but against multiple endpoints, they'd have to change this in the code and recompile each time. This also means that if the same test ran locally, was pushed up to be run in a pipeline, its not possible to run the pipeline's version of the test against a different endpoint either.
A workaround currently is to use @TestProperty to pass the host and port in and construct as below but it makes more sense to allow the HTTP Manager to be configurable.
@TestProperty(prefix = "microservice", suffix = "host", infixes = "endpoint")
String host;
@TestProperty(prefix = "microservice", suffix = "port", infixes = "endpoint")
String host;
...
httpClient.setURI(host+port);
Tasks
Story
As a Galasa user, I want to be able to configure the host and port of an HTTP Client provisioned by the HTTP Manager via CPS properties, so that I could run the same Galasa test against different endpoints without having to hard code this into the test and recompile every time.
Background
The HTTP Manager currently has a method
setURIwhich allows the user to set the URI for the HTTP Client in the test. However this requires the value to be hardcoded in the test. If a tester wanted to run the same Galasa test that runs HTTP requests but against multiple endpoints, they'd have to change this in the code and recompile each time. This also means that if the same test ran locally, was pushed up to be run in a pipeline, its not possible to run the pipeline's version of the test against a different endpoint either.A workaround currently is to use
@TestPropertyto pass the host and port in and construct as below but it makes more sense to allow the HTTP Manager to be configurable.Tasks