plotly / plotly/plotly.js

make parameterized testing easier

未关闭
#6,844 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature P2 testing
主要语言
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:
image

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。