-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] 关于 qiankun 使用 cypress e2e 的 RFC #2939
Comments
RFC 直接回复到 #2681 这个下面吧,方便跟踪。 |
Cypress 相比 Playwright 更适合作为当前的测试框架。在使用成本和生态系统上都有优势。
Cypress 是可以很好的作为我们 E2E 测试框架,如果你觉得没问题,我开始写测试用例了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
背景
在 qiankun 项目中,我们需要一种可靠的方式来进行端到端(e2e)测试。Cypress 是一个流行的 JavaScript 测试框架,它提供了丰富的功能和易用性,非常适合我们的需求。
思路
编写测试用例:使用 Cypress 的命令和断言,我们可以编写针对 qiankun 项目的具体测试用例。这些测试用例可以包括对页面功能、用户交互和 API 调用的测试。
根目录下的 crypess 文件夹编写测试用例相关
持续集成 Github Actions:
cypress clude 中创建项目,会有一个projectId 和 录屏密钥。在 cypress.config.js 配置 projectId,ci.yl 中配置环境变量 CYPRESS_RECORD_KEY(在 github - Code security and analysis - Actions - New repository secret 路径下,新增CYPRESS_RECORD_KEY:录屏密钥)
ci 触发 e2e 通过测试的结果如下
Cypress Cloud 记录的录屏结果如下
跟进
The text was updated successfully, but these errors were encountered: