What language should the tests be written in?

What language should the tests be written in?

It's hard to answer this question without first asking, Who will be writing tests?, but once you've figured that out, here are some things to consider.

If your goal is to get developers to participate in writing, executing, reviewing, or troubleshooting tests, it's usually a good idea to go with the same language they use. If Developer and Tester is a combined role at your organization, this is obvious.

But even if they are separate roles, there are a lot of advantages in using the same language. Using the same language will make it easier to share tools, techniques, and best practices. You can more easily ask each other for advice and help each other out.

So when would you want to use a different language for the tests and code? Well usually the only time we recommend this is if you are writing end-to-end tests that need to cover functionality for various services or teams that are using different languages.

This isn't a decision that should be made without taking into account who is on your team and what skills and experience they have. So be sure to decide who will be writing the tests first.