cjstehno / ersatz

🤖 A simulated HTTP server for testing client code with configurable responses.
https://cjstehno.github.io/ersatz
Apache License 2.0
47 stars 5 forks source link

External configuration #186

Open cjstehno opened 12 months ago

cjstehno commented 12 months ago

A means of configuration (setting and expectations) that is read from a file rather than using the DSL. This could be overall or an a test or expectation level.

Maybe add a ServerConfig setting for config(File) where locally defined values would override file values. This probably would not be cleared on a reset but considered default configuration.

Then, allow a similar config(File) called in a test method to apply additional config - should this be cleared on a reset call, probably.

The format of this could be tricky - Groovy DSL would be great, but I don't want to bring groovy back in as a main requirement.