Mesut Durukal - Using Cypress to improve Test Reusability
Reusability is very important in software development, including test automation. Automation is not really automation unless tests are reusable since implementation, execution, analysis and maintenance efforts would be duplicated. Lets see how we can achieve reusability with a very commonly used E2E test automation framework: Cypress. Problem: In my last project, I was supposed to test web apps that we were developing. Those are job seeking websites targeting different job groups, regions or job seekers. Although the target users or jobs are different, most of the scenarios were common. Job seekers are basically going to these sites and querying jobs. A very basic scenario is doing a job search with a keyword in a certain location. This use case, which is applicable to several websites, should be tested on all those apps. The problem is, minimizing duplication. Implementing separate test cases per each site is the trivial option, but this raises duplication and extra costs. Solution: I have implemented a test automation framework based on Cypress in which reusability of tests is maximized. Thanks to several features of Cypress, we can achieve reusability along with maintainability, readability, stability and efficiency. Some key features are: Config variables Hooks Test config Intercepts Dashboard I will share real life examples and explain how I used each of them and what advantage I got from each feature. https://www.jsworldconference.com/newsletter Powered by https://passionatepeople.io #jsworld #jsworldconference #frontendlove #frontenddeveloperlove #javascript #reactjs #angular #react #vuejs #vue #vue3 #typescript #graphql #jamstack #amsterdam #conference #svelte #sveltejs #next #nextjs #staticsite #css #html #nuxt