Springboot SAPI for getting credit card balances.
- It runs on port 3001
./run-locally
./tests
Go via the pipeline by pushing to master.
- Pipeline file is
.travis.yml
. - Environment variables are injected by travis.
- Clones the PAPI from GitHub
- Builds the contract test executable using gradle
- Deploys itself to the PCF staging environment
- Executes the contract tests against the version of itself deployed to staging, to verify that the contract is fulfilled
- In the case of multiple consumers, this will need to be done for each of them.
- In the case of the PAPI having multiple providers, it will need to either specify different executables, or allow the single executable to have its execution configured by an input parameter, so that each producer can run the appropriate tests against itself.
-
Send a request like
/failureRatePc/100
to set the failure rate. In this case, the failure rate is set to 100%. This will make every request return 500 INTERNAL SERVER ERROR.- Note that this number must be an integer between 1 and 100.
-
Send a request like
/perRequestDelayRangeMs?min=100&max=200
to set the per-request random delay range. In this case, there will be a delay for each request between 100ms and 200ms.- Note that both the min and max values must be integers, don't give it negative integers because that would be silly. It would also be silly to give a max value that is less than the min value.
- Send a request
/reset
and the currently configured behaviour policy for the SAPI will be reset. This means that no failures will be artificially induced and there will be no artificial delay on responses.
-
Specify failure rate
-
Specify delay for every request, randomly selected within a range
-
Delay based on load
-
Go offline for random durations
-
Random restarts
-
Random delay on start
-
SAPI starts with a random, non-proper subset of the other problems