Schema testing with k6 (k6 Office Hours #87)

Schema testing with k6 (k6 Office Hours #87)

k6
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.

⏰ TIMESTAMPS

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: https://youtu.be/Og4-Z6j_0M0
Load test types guide: https://k6.io/docs/test-types/load-test-types/
GrafanaCON 2023: https://grafana.com/about/events/grafanacon/2023/
k6 extensions survey: https://k6.io/docs/extensions/

k6-chaijs-contract plugin: https://github.com/grafana/k6-jslib-k6chaijs-contracts
JSON Schema validator: https://www.jsonschemavalidator.net/
AJV JSON Schema validator: https://ajv.js.org/
Pact contract testing: https://docs.pact.io/

Contact Paul:
Twitter: https://twitter.com/javaducky
Site: https://javaducky.com/

Contact Marie:
Twitter: https://twitter.com/mcruzdrake
Site: https://www.testingwithmarie.com/

Learn more about k6:
Website: https://k6.io
Repo: https://github.com/grafana/k6