Patent attributes
Techniques are provided for analytically generating micro-service Consumer- Driven Contracts and automated tests. One method comprises obtaining a plurality of usage data records for consumers of a service from a run-time environment; extracting data features from the usage data records; applying a clustering algorithm to the usage data records to assign the usage data records to a given usage pattern cluster of a plurality of usage pattern clusters based on the extracted data features, wherein each of the plurality of usage pattern clusters comprises usage data records; and performing the following steps when the clustering algorithm creates a new usage pattern cluster: creating a new Consumer-Driven Contract that defines consumer expectations of the service, with respect to the new usage pattern associated with the new usage pattern cluster; and generating automated Consumer-Driven Contract tests to test the new Consumer-Driven Contract.