Provide means to obtain current test case name and current section name
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp
- Ambito
- testing-qa
Direzione di ricerca
Inizia esaminando il percorso deprecato Catch::getResultCapture().getCurrentTestName() e l’implementazione proposta di RunContext che utilizza tracker di sezione attivi. Traccia il modo in cui vengono rappresentati i nomi correnti dei test e delle sezioni, quindi definisci un accesso stabile al nome del test e al nome della sezione, con supporto per la gerarchia se fattibile. Il lavoro è completato quando i nomi richiesti sono disponibili senza dipendere da API deprecate e sono coperti da test appropriati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
I propose the following changes:
- Add a feature to get the current test case's name
- Add a feature to get the current section's name
- Optionally: Add a feature to get the current section's hierarchy of names
These changes are useful if additional data for testing is loaded from or written to a filesystem. Directories and filenames could depend on the current section and thereby reduce duplication.
Additional context
In the past sometimes requests for these features were made but none ever reached a stable upstream (or non-deprecated) state. Especially the issue https://github.com/catchorg/Catch2/issues/510 (by @mlogan) contained a request for such features. However, it was resolved since workarounds were available.
Feature to get the current section's hierarchy of names
In the issue https://github.com/catchorg/Catch2/issues/510 @jgm-radez suggested (and @isidore supported) the following approach to obtain the current section's hierarchy of names:
virtual std::vector<std::string> getCurrentSectionNames() const {
std::vector<std::string> retval;
for(std::vector<ITracker*>::const_iterator iter=m_activeSections.begin(); iter!=m_activeSections.end(); ++iter)
retval.push_back((*iter)->nameAndLocation().name);
return retval;
}
(Assumption: implemented in RunContext)
Feature to get the current test case's name
This feature is currently available in Catch2 but it was marked as deprecated in commit 57c346a by @philsquared and I could not find a reason for it. Why was this done?
Catch::getResultCapture().getCurrentTestName();
- Lingua principale
- C++
- Stelle
- 21.6k
- Fork
- 3.4k
- Merge medio
- 3g 12h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 catchorg/Catch2
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 2 giorni
-
catch_discover_tests passes all EXTRA_ARGS as one argumentForse già presa @CyberKun l’ha presa 11 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
catchorg/Catch2#3239 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Not seeing some error messages from fakeit in jetbrains riderForse già presa @Amanpal9 l’ha presa 21 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
catchorg/Catch2#3228 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
catch_discover_tests fails for Emscripten/WASM tests since v3.16.0Forse già presa @nafiurahman00 l’ha presa 8 giorni fa. ApertaExtras
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
catchorg/Catch2#3241 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di catchorg/Catch2
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cp-algorithms/cp-algorithms#1774 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
telefonicaid/fiware-orion#4836 ·
I maintainer di solito rispondono entro 1 giorno
-
nixd exits at startup when its parent process belongs to another userForse già presa @conao3 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nix-community/nixd#930 ·
I maintainer di solito rispondono entro 2 giorni
-
refactor topic-ui topic-weather
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Command-Install Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
microsoft/winget-cli#6718 ·
I maintainer di solito rispondono entro 2 giorni