...

/

Preparing for End-to-End Tests

Preparing for End-to-End Tests

In this lesson, we'll discuss what end-to-end testing is all about and write some end-to-end tests for multi-git.

We will continue to use Ginkgo and Gomega as our testing framework, but we will invoke multi-git as a command-line program and will not test at the Go-program level. Along the way, you will discover a bug and fix it. This demonstrates nicely that your multiple layers of tests are useful. Let’s get into it.

What is end-to-end testing?

End-to-end testing is arguably the most important kind of testing. If I can write just one kind of test, I would always choose end-to-end testing. An end-to-end test is a test that runs against the full-fledged system “from the outside”. This means the system is tested just like it is being used by users or other systems.

Within end-to-end tests, there are different flavors:

  • Functional/acceptance testing
  • Performance/stress/load testing
  • Regression testing

Functional/acceptance tests verify that the system behaves as it is accepted to behave. If you want to be comprehensive, you may want to test more than just the results of queries that are returned to callers, but also verify internal state, persistent stores, and logs.

It is very important to test how the system behaves under various failure modes and not just test the happy ...