# Testing Apollo Client Applications

DevFeed: [Testing Apollo Client Applications](<https://devfeed.tech/articles/testing-apollo-client-applications-23430.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/introduction-to-testing>)

Author: Khalil Stemmler

Published: 2021-04-22T17:54:59Z

Content type: article

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [Integration testing](<https://devfeed.tech/topics/integration-testing.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>), [Application Development](<https://devfeed.tech/topics/application-development.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [errors](<https://devfeed.tech/tags/errors.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [integration](<https://devfeed.tech/tags/integration.md>), [mock](<https://devfeed.tech/tags/mock.md>), [presentation](<https://devfeed.tech/tags/presentation.md>), [query](<https://devfeed.tech/tags/query.md>), [react](<https://devfeed.tech/tags/react.md>), [react-component](<https://devfeed.tech/tags/react-component.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

The excerpt recommends unit tests for Apollo Client React components that check their presentation during data fetching, after a successful query, and after a failure. Unit tests are described as fast and inexpensive because they focus on small pieces of code and avoid real network requests. Apollo's component can wrap the component under test and supply mock GraphQL responses to exercise those states. The excerpt identifies unit, integration, and end-to-end testing as the article's three approaches, but does not provide their comparisons or details beyond unit testing.

## Source excerpt

Testing is likely one of the most important (yet challenging) aspects of developing high-quality software that can safely withstand change. Tests give you confidence that your code works and will continue to work -- even as you add new features over time. This article will discuss three different approaches to testing Apollo Client applications: unit, integration, and end-to-end tests. We'll discuss what they test, their tradeoffs, and where they belong within a comprehensive testing strategy.