plotly / plotly/plotly.js

make parameterized testing easier

Open
#6,844 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P2 testing
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the parameterized-test implementation in test/jasmine/tests/pikul_test.js#L28-L143 and review the linked jasmine-parameterized module. Compare its interface and maintenance status with the repository's Jasmine and ES5+Promises setup. The issue has no concrete acceptance criteria, so a proposed approach and definition of done would need to be established first.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.