make parameterized testing easier
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
I use parameterization in testing because it finds a lot of corner-case bugs.
Test results look like this:
I test many possible new configurations including extremes, etc, and then also test a range of configurations that shouldn't impact the new feature but might because of code proximity.
It does find bugs
In Jasmine and w/ ES5+Promises it's hard to implement manually because of all the weird scoping rules and promises and lack of ES6 tools like let. You can see my implementation here: https://github.com/plotly/plotly.js/blob/fe6f8d05828a789205448376c2d0f32ef71652a2/test/jasmine/tests/pikul_test.js#L28-L143
The messiness comes from scoping rules and reusing logic and etc. But it works well!
There is a module available on GitHub that has a much nicer interface: https://github.com/paucls/jasmine-parameterized
but not sure about maintenance or other solutions.
Thoughts?
edit: also i'm back after a move, will get back around to this stuff mid/late next week- have to prepare a course
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 test/jasmine/tests/pikul_test.js#L28-L143 中参数化测试的实现开始,并审查链接的 jasmine-parameterized 模块。将其接口和维护状态与仓库的 Jasmine 和 ES5+Promises 设置进行比较。该 issue 没有具体的验收标准,因此需要先确定一个拟议方案和完成定义。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- testing
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100