Schema testing with k6 (k6 Office Hours #87)

Schema testing with k6 (k6 Office Hours #87)

May 6, 2023

In this k6 Office Hours episode, Developer Advocates Marie Cruz and Paul Balogh discuss what contract testing is, if schema testing is the same as contract testing, and how to do schema validation testing using Grafana k6.


00:00 Introduction and announcements

05:45 What is integration testing?

07:30 The rise of contract testing

08:52 How would we explain contract testing

11:14 How is contract testing different from API testing?

14:11 Initial effort with contract testing

15:44 Benefits of contract testing

21:08 Elements of contract testing (provider, consumer, contract)

23:22 What is schema testing?

25:10 How is contract testing different from schema testing?

26:50 Advantages and disadvantages of schema testing compared to contract testing

30:54 How does k6 perform schema testing?

37:47 k6-chaijs-contract plugin

51:01 Other tools for schema and contract testing (ajv and Pact)

Nicole's KubeCon talk:
Load test types guide:
GrafanaCON 2023:
k6 extensions survey:

k6-chaijs-contract plugin:
JSON Schema validator:
AJV JSON Schema validator:
Pact contract testing:

Contact Paul:

Contact Marie:

Learn more about k6: