docs/develop/contribute/more-info/getting-started/test-guideline.md
At Mattermost, we write tests because we want to be confident that our product works as expected for our users. As developers, we write tests as a gift to our future selves or to be confident that changes won't cause regressions or unintended behaviors. We value contributors who write tests as much as any others, and we want the process to be integrated in our core development workflow rather than being an afterthought or follow-up action.
This page stresses the importance of tests, including for every pull request being submitted. It is the foundation of our test guidelines, and serves as a reference on why we do not merge code without tests. This is not to meet higher code coverage but rather to write effective and well-planned use cases depending on the changes being made. But of course, there's always an exception. If, for some reason, it isn't possible to write a test, let the reviewers know by writing a description to start a discussion and to fully understand the situation you are facing.
Not all test types are required in a single pull request. Only write whichever test types are most effective and appropriate.
For writing and running unit tests in general, see the Server workflow page. If you have written a new endpoint or changed an endpoint for the Mattermost REST API, check out the REST API page.
For writing and running unit tests in general, see the Unit tests page. For writing and running E2E tests in general, see the End-to-End testing section, and the End-to-End cheatsheets section.
For writing and running E2E (and unit) tests for Redux components, see the Redux Unit and E2E Testing page.
For writing and running E2E tests for both Android and iOS systems, take a look at the Mobile End-to-End (E2E) Tests page.
For writing and running unit and E2E tests for the desktop app, check out the Unit and End-to-End (E2E) Tests in the desktop app page.
If you're looking to improve your development skills or improve your familiarity with the Mattermost code base, issues for E2E tests that are marked Help Wanted are a great place to start.
Help Wanted label and either the Area/E2E Tests label or something related to E2E in the issue title.
If you'd like to see an example of an ideal E2E test contribution, please view these issues and their associated PRs: