plotly / plotly/plotly.js

make parameterized testing easier

Aperta
#6,844 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature P2 testing
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con l’implementazione dei test parametrizzati in test/jasmine/tests/pikul_test.js#L28-L143 ed esamina il modulo jasmine-parameterized collegato. Confronta la sua interfaccia e il suo stato di manutenzione con la configurazione Jasmine e ES5+Promises del repository. Poiché l’issue non ha criteri di accettazione concreti, sarebbe necessario stabilire prima un approccio proposto e una definizione di completamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
testing
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.