Testimi & QA

Waits & synchronization

Në shqip: Pritjet në testet e automatizuara

ShpjegimiSQ

Gabimi më i shpeshtë te testet E2E: elementi s'është shfaqur ende kur testi e kërkon. Mos përdor sleep(5) — prit për një kusht („derisa butoni të jetë i dukshëm“). Playwright dhe Cypress presin automatikisht.

EnglishEN

The most common E2E test bug: the element hasn't appeared yet when the test looks for it. Don't use sleep(5) — wait for a condition (“until the button is visible”). Playwright and Cypress wait automatically.

Si ta mendosh

Si të presësh që semafori të bëhet i gjelbër, jo të numërosh 30 sekonda.

Lexoje në anglisht

Like waiting for the light to turn green rather than counting 30 seconds.

Terma të lidhur