Fast 'end-to-end' testing with GraphQL

End-to-end testing has always been painful, but GraphQL can help. The GraphQL-first paradigm allows a new way of testing that gives us the confidence of true end-to-end tests without needing both client and server running, and without heavy end-to-end testing tools.

sneakers Photo by Noah Silliman

This is a talk I gave at the 2018 GraphQL Summit in San Francisco.

The promise of GraphQL in testing

What if we could use GraphQL to tie together client and server tests to give us an “end-to-end” test that was fast and reliable? The same strengths that give us GraphQL-first development can grant us full-stack testing superpowers. You will see a way to test that is:

  • fast: like unit tests
  • cohesive: client and server tests can be proven via GraphQL to implement a full end-to-end process
  • independent: client and server tests can be run separately
  • end-to-end: able to run from client input through the back-end back to rendered component trees

This talk discusses an approach to mapping from stakeholder requirements to new features using a test-driven, GraphQL-first approach.

Let's stay connected. Join our monthly newsletter to receive updates on events, training, and helpful articles from our team.