Shift Testing Left

Why shift testing left?

Most teams using Garden use Kubernetes for production. This means they already have their Dockerfiles, manifests and/or Helm charts.

Garden lets them re-use these resources so that developers can test in remote production-like environments as they code. This means:

  • No more waiting for CI to see if integration tests pass

  • Run and debug any test suite from your laptop as you code

  • Easily write and maintain load tests, integration, and end-to-end tests with fast feedback loops

  • Speed up your delivery cycle by shifting DAST and similar testing methodologies left

If your team is stuck in a commit, push, pray cycle, shifting tests all the way left can help break it.

Check out how Podium use Garden to end-to-end test 130 services, hundreds of times per day.

How does it work?

Testing is a first class primitive in Garden and teams use the Test action to define the tests for their project. These tests are typically run as a Kubernetes Pod in a production-like environment but there are several different options, depending on how the project is set up.

Developers use the garden test command to run all or specific tests from their laptop in a remote Kubernetes cluster as they code. They can also enable live code syncing to ensure a blazing feedback loop as they iterate on tests.

Similarly, tests can be run from a CI pipelines using the same commands.

Garden's smart caching ensures that only the tests belonging to the parts of your system that changed are executed which can dramatically speed up your pipelines.

Key features

  • Visualize your dependency graph, streams logs, and view command history with the Garden dashboard

  • Hot reload your changes for a fast feedback loop while writing and debugging tests with Code Synchronization

  • Never run the same test twice thanks to Garden's smart caching

How can my team shift testing left?

Teams typically adopt Garden in a few phases and shifting tests left is one of the main milestones.

So with that in mind, these are the recommended next steps:

Join our Discord community 🌸 for access to Garden's dedicated Community Engineers and our AI chatbot 🤖 trained on our docs.

Further Reading

Last updated