Stubbing

JDBC stubbing with Redis and Specmatic contract testing.

Break the Chains of Database Dependencies: Leveraging Specmatic for JDBC Stubbing

With Specmatic JDBC stub, you can easily test APIs without the need for a complex database setup. By switching out the real database with a Specmatic JDBC stub, we can set expectations for the stub to respond to specific queries. These expectations can be recorded based on actual interactions. Once the expectations are set, we no longer need the database for our tests!

Break the Chains of Database Dependencies: Leveraging Specmatic for JDBC Stubbing Read More »

Redis stubing - specmatic contact development with contract testing.

Redis Stubbing with Specmatic Contract Testing

Instead of using an actual instance of Redis, we’ll stub it out and have the contract test set expectations so that the Redis stub knows what data to return for any query sent to it by the application. Now, when we run the contract tests and the service object does a look up in Redis, it’s actually hitting the Redis stub.

Redis Stubbing with Specmatic Contract Testing Read More »