当前位置:首页 > 报告详情

Slack 利用人工智能驱动的混合方法实现从 Enzyme 到 React 测试库的大规模迁移.pdf

上传人: 竿*** 编号:981532 2025-11-29 62页 2.78MB

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

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
根据报告的内容,全文主要内容概括如下: 1. **背景**:Slack从Enzyme迁移到React Testing Library (RTL),面临大量测试用例的转换工作。 2. **挑战**:迁移过程中遇到的工作分配、测试用例所有权和作者ship等问题。 3. **解决方案**:采用AST(抽象语法树)转换和LLM(大型语言模型)辅助转换。 4. **核心数据**: - Slack有15k个Enzyme测试用例,转换需花费约10k工程时。 - 使用AST转换成功率为45%,LLM转换成功率为40-60%,AST + LLM组合成功率达到80%。 5. **评估**:AI代码转换节省了22%的开发时间。 6. **关键点**: - AST + LLM组合提高了转换成功率。 - LLM在处理复杂、无结构、规则少的代码时表现良好。 - 该方法可应用于其他项目,如单元测试生成和代码现代化。
"AST+LLM,测试迁移新利器?" "Slack如何用AI加速React测试迁移?" "AI助力,测试框架迁移效率翻倍?"
客服
商务合作
小程序
服务号
折叠