Method Interceptors page: an IMethodInterceptor receives dependency-constrained methods too
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- documentation
Direzione di ricerca
Modifica src/main/asciidoc/docs/method_interceptors.adoc; inizia confrontando l’attuale spiegazione in due gruppi con il contratto effettivo di IMethodInterceptor descritto nell’issue. Sostituisci questa impostazione con il comportamento consapevole delle dipendenze e indica upstreamDependencies() e downstreamDependencies(); il lavoro è completato quando la pagina non afferma più che vengono passati solo metodi senza vincoli.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Page
src/main/asciidoc/docs/method_interceptors.adoc — "Method Interceptors"
Problem
The page describes a two-group model that TestNG has not implemented for the whole of the 6.x and 7.x line:
Once TestNG has calculated in what order the test methods will be invoked, these methods are split in two groups:
- Methods run sequentially. These are all the test methods that have dependencies or dependents. [...]
- Methods run in no particular order. [...]
In order to give you more control on the methods that belong to the second category, TestNG provides
org.testng.IMethodInterceptorThe list of methods passed in parameters are all the methods that can be run in any order.
An IMethodInterceptor is in fact handed every test method of its <test>, the ones taking part in a dependsOnMethods or dependsOnGroups relation included.
This is the documentation half of testng-team/testng#1263, which reported the same claim in the IMethodInterceptor javadoc.
Why the code is not going to change
TestRunner builds the scheduling graph from what the interceptors return — deliberately, so that an interceptor removing methods cannot make the graph wait forever for a method that will never be invoked (the parallel methods lock-up fix). A method withheld from the interceptor would therefore be a method no implementation could ever drop.
Restoring the documented contract would also take from every filtering interceptor the ability to exclude a dependency-constrained test, silently running tests their author believes excluded, with no replacement API.
So the wording is what is wrong, not the behaviour.
What the javadoc now says
testng-team/testng has corrected IMethodInterceptor and ITestNGMethod to describe the actual contract:
- every test method of the
<test>is passed, dependency-constrained ones included, and why; ITestNGMethod.upstreamDependencies()anddownstreamDependencies()tell a constrained method from a free one, and are now populated before the interceptors run so an implementation can act on them;- where a constrained method runs stays bounded by the graph, so reordering it cannot move it ahead of what it depends upon;
- dropping a method that another retained method depends upon ends the run with a
TestNGExceptionnaming the dependency.
Suggested change
Replace the two-group framing with the above, and point readers at upstreamDependencies() / downstreamDependencies() for the distinction the old text promised TestNG would make for them.
- Lingua principale
- HTML
- Stelle
- 6
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 testng-team/testng-team.github.io
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Duplicates of paramsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 42/100
testng-team/testng-team.github.io#79 · 2 commenti ·
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
testng-team/testng-team.github.io#70 · 6 commenti ·
Tutte le issue di testng-team/testng-team.github.io
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
osrep/Runes2P.jl#279 ·
I maintainer di solito rispondono entro 1 giorno
-
Translation: landing pageApertadocumentation good first issue help wanted
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
Is0cre/MonkeyThrive#6 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Imbad0202/academic-research-skills#1093 ·
I maintainer di solito rispondono entro 1 giorno
-
1.3 documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100