1、Hybrid Approach for Large-Scale Migration from Enzyme to React Testing Librarypowered by AISergii Gorbachov Slack,Vancouver,CanadaStaff EngineerDeveloper Experience DepartmentTable of Contents1.Problem statement2.Current state3.Approaches and solutions4.Evaluation/impact5.Important findingsWhat is E
2、nzyme and RTL?Test utilities that allow testing ReactReact is the JavaScript library used to build UI interfacesWhy is it important?Enzyme supports React 17 or lowerReact 18:migrate to RTL or lose test coveragePerformance,responsiveness,and user experienceSlack15k Enzyme tests to convert10k eng hour
3、s(1 test=30-45 mins)5+years of unit testsWeekly downloads-Nov,2024Enzyme:1.7 million Enzyme-adapter-react-17:500k RTL:10 millionWhat did the present look like?No adaptersNothing open sourceNo previous articles on working automated solutionsIn this talk I will walk you through Slacks approach to this
4、 problem1.Applicable to“complex”conversions2.Innovative approach3.Maybe you still use Enzyme4.Real life successful case for LLMs Why you might be interested?Approaches,solutions and timelines Frontend test frameworks teamResponsibilities Lead the migration of tests owned by 50+teams with 150+develop
5、ers Convert tests Automate and optimize How do you divide work fairly and organize it for 150+developers in 50+teams for the next 9 months?Challenges Feature ownership:Challenges Not granular enough Out of date Missing assignment Disproportionate ownership Test authorship:Challenges Partial authorsh
6、ip Change of teams Large refactoring projectsHow do you divide work fairly and organize it for 150+developers in 50+teams for the next 9 months?Challenges Combined ownership and authorship Divided workload evenly across every individual engineer FE engineers actively writing React:Q3:10 test cases p