Webinar Recap: Scaling Your Testing Strategy

July 31, 2023

By Jessamyn Sweet

In a recent webinar, we shared practical strategies, valuable insights, and actionable tips to help you build a testing strategy that holds up to complexity and change. We were fortunate to be joined by Cypress Ambassadors and testing extraordinaires:

Key Takeaways

Here’s our host and Cypress Senior Technical Solutions Engineer Jenna Beckett with some key takeaways from the session:

Q&A Highlights

Note that we’ve slightly paraphrased our speakers below for brevity.

Q: What approach is best to create a complete data set? Is it before all tests or before each individual test?

A: Marko: We use both approaches where applicable. In general, I prefer creating test data for each individual test because sometimes I want to show  filter output. For example, using Cypress grep tool is good for filtering out specific cases. I only create test data for the tests I'm going to execute, rather than creating data for all cases. So, I lean towards test case creation rather than creating a huge dataset for all tests. But it depends on the project's requirements.

Q: What kind of abstraction models have been effective?
A: Estefania: The effectiveness of abstraction models depends on how you understand and plan the project before running the tests.

Q: How do you organize custom commands in a project?
A: Quantarius: We organize custom commands based on functionality. We group them together, and each function has comments describing its purpose. This way, the tests remain readable while still having the necessary functionality.

Q: What is the best way to use tags to run specific tests or sets of tests?
A: Marko: We use Cypress  grep tool to tag our tests, such as regression, sanity, positive, negative, etc. Tags provide the power to manage test execution by running specific test sets, combining or excluding tags as needed. It's a great way to manage test execution in the project environment.

Q: If unit tests are heavily fixture dependent and written in Cypress, what's the difference between unit and integration tests when both use the same fixtures?
A: Quantarius: The difference lies in the functionality being tested. Unit tests are specific, focused on individual units or pure functions where specific inputs result in expected outputs. Integration tests, on the other hand, test multiple units together to ensure they work well together, simulating real-world scenarios. If you're integrating several units, it becomes an integration test.

Estefania: I completely agree with him. Integration tests help ensure that each component is only used for what it is meant to be used for, and it allows you to speed up your tests between components.

Wrap Up

If you missed the webinar, you can catch the recording on our events page here.

Check out our events page for the recording of this session

Our speakers also documented some resources for you to check out here. If you have further questions about your test strategy or set up, join us on our Community Discord. A member of our team or the 10,000+ developers and Ambassadors are here to help!