Test improvements
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
Direzione di ricerca
Read the example tests and README.md mentioned in the draft, then compare them with the tests in erlang_tests/ and libs/estdlib/. The issue proposes broad changes to test helpers, naming, organization, summaries, OTP compatibility, Valgrind, and flaky CI steps, so first identify which part remains relevant. Done means an agreed scope and corresponding test and CI changes; the issue gives no specific files or acceptance criteria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I was working with tests for some time now and I have few observations:
- Tests are split to NIFs and Erlang impl.
- Running tests in BEAM works only from one directory (
-pa .). - There are a lot of files in
erlang_tests/. They're unorganized and few create a series that could be done in one module. - Some older tests use magic values for communicating intent, some new have own helpers that are copied around, some are hard to follow.
It should undergo some cleaning.
I'd propose that:
- tests should depend on set of common helpers. Some superset of macros in etest would be nice. Having both homebrew framework and etest is quite messy.
- we should decide on naming scheme, right now this is the mix of
test_nameandname.- I like prefixed names with category – e.g.
nif_binary_match,gc_tree_ast,bin_mqqt,bif_pow, etc.
- I like prefixed names with category – e.g.
- estdlib should be treated specially and tests from
erlang_testsandlibs/estdlibshould be merged. - atom table shouldn't use atoms defined in
default_atoms.def. They're always out of sync and it doesn't bring any value. TEST_CASE_EXPECTEDshould be removed preferingTEST_CASE.- Test summary should be aggregated at the bottom, in format of "Test executed: {k}, tests skipped: {k}, tests failed: {k}\nFailed:\n{list of test modules}".
- clear designation when tests are available on later versions of BEAM. Would be nice to have macros that compile testing functions conditionally, like
ok = ?RUN_WITH_MIN_OTP(24, binary_match_test_fun). - Run Valgrind with full report (
--leak-check=full). Right now it only gives a report about leaked memory and you need to run it yourself to see what leaked. - Move known flaky tests (tcp, udp, etc) to separate steps or disable them completely until they're fixed. They very often fail CI and it's hard to see at glance if check failed due to flaky tests or changes to the code.
Draft of what it could look like (or any variation on that). Look in example tests and README.md.
Related: #1060
- Lingua principale
- Erlang
- Stelle
- 2.3k
- Fork
- 171
- Merge medio
- 5g 11h
- PR unite (30g)
- 19
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 atomvm/AtomVM
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni
-
unicode:characters_to_list/binary return an uninitialized term for a non-chardata argumentForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
atomvm/AtomVM#2435 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
atomvm/AtomVM#2429 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di atomvm/AtomVM
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmplusplus/charm#4210 ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
redhat-developer/rhdh-plugin-export-overlays#4733 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
melodic-software/claude-code-plugins#14993 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
quality-assurance
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#228 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
keithamus/css-minify-tests#378 ·
I maintainer di solito rispondono entro 1 giorno