At Slack, Quality is a shared responsibility. The Quality Engineering team is focused on creating a culture of testing, increasing test coverage, and helping the company ship high-quality features faster. We encourage all our developers to write and own end-to-end (E2E) tests. In turn, Quality Engineering (QE) is responsible for the frameworks used and provides…
Overview
The article discusses Slack's approach to scaling end-to-end (E2E) user interface tests by creating a reusable automation framework. It highlights the challenges faced with initial implementations and the solutions developed to improve test maintainability and reduce flakiness.
What You'll Learn
How to implement a reusable automation framework for E2E tests using Cypress
Why using a Page Object Model can improve test maintainability
How to reduce test flakiness by implementing best practices in UI testing
Prerequisites & Requirements
- Understanding of end-to-end testing concepts
- Familiarity with Cypress for test automation
Key Questions Answered
What framework did Slack use for end-to-end testing?
What best practices did Slack implement to improve E2E tests?
How did Slack reduce flakiness in their tests?
Key Statistics & Figures
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Key Actionable Insights
1Implement a UI abstraction layer to simplify test writing and maintenance.This approach allows for a centralized definition of UI actions, making tests more readable and easier to manage, especially in complex applications like Slack.
2Utilize custom 'data-qa' attributes for element selection in tests.This practice ensures that selectors remain stable even when underlying class names or IDs change, reducing the likelihood of test failures due to UI updates.
3Limit the creation of new components to only those necessary for tests.By focusing on essential components, you can avoid unnecessary complexity and maintain a cleaner test structure, which aids in both readability and maintainability.