Tag scoped step definitions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- testing
Direzione di ricerca
La issue non indica file del repository, test o punti di ingresso. Inizia individuando come le definizioni degli step vengono associate a scenari e feature, quindi analizza come i tag potrebbero limitare tali definizioni. Il lavoro è completato quando una formulazione identica dello step può selezionare implementazioni specifiche per tag senza usare una formulazione prolissa, con test che coprano questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🤔 What's the problem you're trying to solve?
Bind step definition to tags (e.g. 'When I press "Save"' multiple definitions for different tags).
Many steps are worded identical, but refer to different operations of the system. Consider a web interface, where multiple ways to display the interface exist, multiple pages, or dialogs, all with a "Save" button. They might need different implementation on how the save action is triggered in the test glue code, but right now you would always need to specify something clumsy like When I press "Save" (on page X), which is not only odd to read but raises questions.
In the glue code you would have multiple implementations, all with slightly different wordings, making it a huge mess to come up with variants on how you write the same action.
Another very common occurrence is the "Then I expect no error to be shown" steps. This is usually easily scopeable with a tag in a feature file talking about whatever way errors are displayed or returned in that particular part of the system. However we find ourselves always having to write the error validations absurdly verbose.
✨ What's your proposed solution?
SpecFLOW (for .NET) has solved this quite elegantly: A step definition can be bound to one or multiple tags. It is then only relevant for Scenarios or features with that specific tag. This way the wording can be sharper and shorter, and the glue logic is more readable.
⛏ Have you considered any alternatives or workarounds?
Right now we have to pre or postfix steps that are worded the same but have to trigger two different actions in the test implementation, and it does actually work against the idea of Cucumber: to make the specification independent from the implementation
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 3.4k
- Fork
- 676
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cucumber/common
-
Upgrade to TypeScript 7Forse di nuovo libera @davidjgoss l’ha presa 124 giorni fa e non c’è nessuna pull request aperta. Apertalanguage: javascript
-
Allowing both DocString and DataTable on a single stepForse di nuovo libera @mpkorstanje l’ha presa 129 giorni fa e non c’è nessuna pull request aperta. Aperta
cucumber/common#2315 · 23 commenti · 1 reazione · 1 assegnatario ·
-
Enable static analysisForse di nuovo libera @mpkorstanje l’ha presa 220 giorni fa e non c’è nessuna pull request aperta. Aperta
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di cucumber/common
Issue simili
-
frontend testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
vendrabuck/HERD#1588 ·
I maintainer di solito rispondono entro 1 giorno
-
`explain <unknown topic>` prints a JSON object and exits 0 instead of an error that lists the topicsApertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Unit tests for tagSpeakerApertagood first issue priority: low testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
mobile
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno