Testing GraphQL APIs using Purescript
If you develop a GraphQL API, this course will help you develop high-quality, automated contract tests for your API
Max 25 attendees
api-automation, automation, developer-tools, exploratory-testing, models, test-cases, test-design, testing-tools, test-strategies, unit-testing
By the end of this course, you'll be able to:
- Initialize, build, and run a PureScript starter project using spago
- Run a PureScript language server that binds to VSCode for quick debugging
- Write a quicksort algorithm in PureScript
- Define a typeclass and an instance
- Use several monads, including Maybe, List, Reader, Writer and Effect
- Write a property-based test using QuickCheck
- Create an arbitrary value for a custom data record in QuickCheck
- Create an use an email generator in QuickCheck
- Change the random generation of data in QuickCheck
- Build test reports from QuickCheck
- Understand the main components of the June 2018 GraphQL stadard
- Validate a GraphQL spec, query, mutation and subscription using purescript-graphql-validator
- Generate a simple GraphQL query using Quickcheck and purescript-graphql-parser
- Generate a GraphQL query for a real GraphQL API (SWAPI) using Quickcheck and purescript-graphql-parser
- Deploy PureScript-based tests and a system under test (SWAPI) to GitHub Workflows
- Run PureScript-based tests in GitHub Workflows
The course will be broken up like this:
- Day 1. Morning 1: Introduction to PureScript
- Day 1. Morning 2: Introduction to QuickCheck
- Day 1. Afternoon 1: Introduction to the June 2018 GraphQL spec.
- Day 1. Afternoon 2: Validating GraphQL queries and responses using purescript-graphql-validator.
- Day 2. Morning 1: Generating GraphQL from a spec using QuickCheck (part 1).
- Day 2. Morning 2: Generating GraphQL from a spec using QuickCheck (part 2).
- Day 2. Afternoon 1: Testing a GraphQL server locally.
- Day 2. Afternoon 2: Testing a GraphQL server in a CI/CD pipeline.
By the end of the course, you will be able to set up a CI/CD pipeline with automatic acceptance tests for your resolvers.
The course is BYOGQLS (Bring-your-own-graphql-server), although if you don't have one, you can fork the Meeshkan Bank. Also, for CI/CD, we will be using GitHub Actions, although those following along can use their CI/CD of choice and I'll try to adapt.
Meet the Instructor
I'm the founder of Meeshkan, a smöl company that helps devs and QA engineers test GraphQL and REST APIs.