Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Quick Guide for Writing Tests to Contributing Documentation #1151

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ If you don't have time to contribute, that's fine. There are other easy ways to
- 🎨 [Improving the Design](#-improving-the-design)
- 🚀 [Contributing to CI/CD Pipeline](#-contributing-to-cicd-pipeline)
- 🧪 [Contributing to Testing](#-contributing-to-testing)
- 🔨 [Guidelines for Testing Website Components](#-guidelines-for-testing-website-components)
- ⌨️ [Pull requests](#%EF%B8%8F-pull-requests)
- 🏛 [License](#-license)

Expand Down Expand Up @@ -97,6 +98,47 @@ We value contributions to our testing efforts. Here are ways you can help improv

For more details on our testing setup and how to run tests, please refer to the Testing section in our [INSTALLATION.md](./INSTALLATION.md#testing) file.

### 🔨 Guidelines for Testing Website Components

To ensure consistent and effective testing of website components, follow these guidelines:

1. **Understand the Requirements**:

- Review the functionality and design requirements for the component.

- Refer to the provided resources to understand effective test case design:

- [How to write test cases](https://www.coursera.org/articles/how-to-write-test-cases)

- [Manual test cases](https://www.testrail.com/blog/manual-test-cases/)

- [Effective test cases](https://www.testrail.com/blog/effective-test-cases-templates/)

2. **Write Comprehensive Test Cases**:

- Ensure each test case has a clear objective, preconditions, test steps, and expected results.

- Include positive, negative, and edge case scenarios.

3. **Automate Where Possible**:

- Write automated tests using Cypress for components and E2E flows.

- Ensure test scripts are reusable and modular.

4. **Review and Update**:

- Regularly review test cases to align with changes in component functionality or design.

- Update outdated or redundant test cases to maintain relevance.

5. **Collaborate with the Team**:

- Seek feedback on test cases and scripts from other contributors.

- Discuss edge cases and complex scenarios in the #testing channel in our Slack workspace.

Following these guidelines will help ensure high-quality testing and contribute to a robust and reliable website.

### ⌨️ Pull requests

Expand Down
Loading