Test Framework Errors
Jest, pytest, JUnit, Cypress and Playwright: fixtures, snapshots and timeouts.
Understanding Testing errors
Test errors divide into infrastructure problems (the framework cannot find or load your tests, fixtures or modules) and flakiness, which is the more expensive category. End-to-end timeouts are almost always a race between the test and the application, and the durable fix is to wait for a condition (an element, a network response, a state change) rather than for a duration.
How to debug Testing errors
- Run a single failing test in isolation. If it passes alone but fails in the suite, you have shared state or test ordering dependence.
- For Cypress and Playwright timeouts, use the trace viewer or video to see what the page actually showed. The element usually exists but is covered, detached, or not yet interactive.
- Replace fixed waits with condition-based waits.
waitForSelectorand auto-retrying assertions eliminate an entire class of flakiness. - For collection and module-resolution errors, check the framework's rootDir/testPaths configuration and the presence of
__init__.pyorconftest.pywhere the framework expects it. - Review snapshot diffs rather than updating them reflexively. A changed snapshot is sometimes a real regression.
Tools worth reaching for
playwright show-tracepytest -x -vv --tb=longjest --runInBandcypress opentest retry analytics
All 18 Testing errors
- Cypress: Cypress detected a cross origin error NewThe test navigated to a different origin. Cypress runs in the same browser context as the application, so it can only…
- Cypress: Timed out retrying - Expected to find elementCypress could not find the specified element within the default timeout. The element may not exist, may have a…
- Jest: Cannot find moduleJest cannot resolve an import during test execution. Usually caused by missing moduleNameMapper config, untransformed…
- Jest: Exceeded timeout of 5000 ms for a test NewThe test returned a promise that never settled within the limit. A slow network call is the obvious cause, but the…
- Jest: Snapshot does not match stored snapshotThe component output has changed since the snapshot was last recorded. This may be an intentional change or an…
- Jest: SyntaxError: Cannot use import statement outside a module NewJest ran a file containing ES module syntax through a CommonJS pipeline. Either the transform does not cover that…
- Jest: You are trying to import a file after the Jest environment has been torn down NewAsynchronous work outlived the test that started it. When Jest tears down the environment, a still-pending promise…
- Jest: Your test suite must contain at least one test. NewA file matched the test pattern but declared no test. Helper files living beside the tests are the usual reason…
- JUnit: No runnable methodsJUnit found no test methods in the class. Methods may be missing the @Test annotation or the wrong JUnit version…
- Playwright: browserType.launch (executable doesn't exist) NewThe Playwright npm package is installed but the browser binaries are not. They are downloaded by a separate step…
- Playwright: strict mode violation (locator resolved to multiple elements) NewPlaywright locators are strict by design: if a selector matches more than one element it refuses to act rather than…
- Playwright: Timeout exceeded waiting for elementPlaywright's auto-waiting timed out because the element did not become actionable (visible, enabled, stable) within…
- pytest: async def functions are not natively supported Newpytest collects an async test, has no event loop to run it in, and skips the body, so the test reports as passed or…
- pytest: Collection errorpytest failed to collect tests, usually due to an import error in a test file or conftest.py. The module cannot be…
- pytest: fixture 'X' not foundA test function requests a fixture that is not defined or not accessible. The fixture may be in a different…
- Testing Library: Unable to find an element with the text NewThe query ran before the element existed, or the text is split across elements. getBy fails immediately without…
- Vitest: No test suite found in file NewVitest loaded the file but it registered no test() or describe() calls. Usually the suite is inside a conditional, the…
- Vitest: ReferenceError: document is not defined NewVitest runs in Node by default, where there is no DOM. The component test needs a browser like environment declared…
Other categories
- AI 35Rate limits, context windows, GPU memory and model-serving failures.
- Ansible 18Unreachable hosts, become passwords, undefined variables and Jinja2 failures.
- API 20Auth headers, payload limits, versioning, idempotency and webhook signatures.
- Apple 20Command line tools, dyld, Homebrew permissions, notarisation and Keychain.
- Auth 20OIDC, SAML, Auth0, Okta, Keycloak, passkeys and MFA failures.
- BigData 17Spark, Kafka, Airflow, Snowflake, Flink and Databricks failures.
- C# 18NuGet restore, null references, EF Core migrations, async deadlocks and Blazor…
- C++ 20Segfaults, linker errors, memory corruption and template deduction failures.
- Caching 20Cache stampedes, stale content, Varnish and CloudFront failures.
- CI/CD 18GitHub Actions, GitLab CI, Jenkins, CircleCI: permissions, runners and…
- Client 21CORS, mixed content, module resolution, memory limits and framework runtime…
- Cloud 25IAM permissions, quotas, service limits and credential failures.
- Dart 20Null safety, pub version solving and build toolchain problems.
- Database 41Connections, deadlocks, constraints, replication and memory limits.
- DNS 20NXDOMAIN, SERVFAIL, timeouts, propagation and delegation problems.
- Docker 27Daemon connectivity, disk space, image pulls, ports and architecture mismatches.
- Elixir 18GenServer timeouts, supervision failures and Mix compilation problems.
- Email 20Delivery failures, relay denial, authentication, SPF, DKIM and DMARC.
- Frontend 23Hydration mismatches, bundler resolution, layout shift and font loading.
- Git 20Merge conflicts, rejected pushes, detached HEAD, LFS and repository corruption.
- Go 19Nil map assignment, concurrent map access, context cancellation and deadlocks.
- GraphQL 19Validation, depth limits, N+1 queries and fragment problems.
- gRPC 17Status codes, deadlines, message limits, TLS and HTTP/2 transport failures.
- HTTP 494xx client errors, 5xx server errors, redirects, headers and protocol problems.
- ICMP 23Destination unreachable, time exceeded, fragmentation needed and redirects.
- Ingress 20404 default backend, missing TLS secrets, IngressClass and path matching.
- Java 19Class loading, dependency resolution, connection pools and JVM version…
- JavaScript 42npm resolution, async pitfalls, hydration, memory limits and runtime type…
- Kubernetes 34CrashLoopBackOff, ImagePullBackOff, OOMKilled, RBAC, scheduling and storage.
- Logging 18Log4j, Logback, Fluentd, Logstash and CloudWatch ingestion problems.
- MessageQueue 20Kafka, RabbitMQ, SQS, NATS and Celery: lag, rebalancing and poison messages.
- Mobile 20Gradle, CocoaPods, Xcode signing, Metro bundler and toolchain mismatches.
- Monitoring 18Prometheus scrapes, Grafana data sources, OpenTelemetry exporters and agent…
- Network 35Refused connections, timeouts, resets, MTU problems and port exhaustion.
- Performance 19GC pauses, thread pool starvation and event loop blocking.
- PHP 20Memory limits, execution timeouts, autoloading, Composer and PDO connections.
- Proxy 20nginx, Envoy, HAProxy, Traefik, Caddy and Cloudflare upstream failures.
- Python 35Imports, virtual environments, encoding, concurrency and dependency conflicts.
- Regex 17Catastrophic backtracking, back references, escaping and engine differences.
- Ruby 20Bundler, migrations, native extensions, encoding and asset compilation.
- Rust 19Borrow checker, ownership moves, trait bounds and lifetime mismatches.
- Scala 17Dependency resolution, binary compatibility and type inference failures.
- Security 25JWT validation, CSRF, OAuth grants, SELinux, SSH host keys and CSP.
- Serverless 20Lambda timeouts, package size limits, VPC networking and cold starts.
- Shell 19Command not found, permissions, quoting, expansion and Makefile syntax.
- Storage 19S3 permissions, NFS mounts, quotas, signed URLs and volume attachment.
- Svelte 20Store subscriptions, load functions and server/client boundaries.
- System 26Disk space, systemd units, file descriptors, OOM killer and scheduled jobs.
- Terraform 18State locks, provider auth, drift, dependency cycles and plan-time unknowns.
- TLS 24Untrusted authorities, expiry, hostname mismatch, chains and cipher negotiation.
- TypeScript 19Assignability, missing declarations, strict null checks and generic constraints.
- Virtualization 20VirtualBox, VMware, Hyper-V, WSL, KVM and hypervisor conflicts.
- Web3 17Gas estimation, nonce management and reverted transactions.
- WebAssembly 17Compile errors, memory bounds and host binding mismatches.
- WebServer 20nginx, Apache, IIS and Caddy: binding, permissions, rewrites and TLS.
- Windows 20Installer failures, missing runtimes, update errors and permission problems.