Testing/E2E: Guides and Practical Know-how | Page 16 | mironsoft Blog
Testing/E2E
-
Jun 4, 2025
Contract testing with Pact replaces expensive end to end tests across service boundaries with fast, isolated checks. The consumer defines its expectations of an interface as a machine readable contract, which the provider automatically verifies in its own CI pipeline. This catches incompatible API changes between frontend and backend long before they affect customers in production.
-
May 31, 2025
Teams that maintain API tests in a separate tool and E2E tests in Cypress or Playwright double their maintenance effort and lose context between the two worlds. With cy.request() and Playwright's APIRequestContext, test data can be built in milliseconds instead of through forms, auth sessions can be shared between API and browser, and entire test suites can be noticeably accelerated without losing reliability.
-
May 29, 2025
A bug that stubbornly refuses to reproduce locally but occurs regularly in production is one of the most frustrating problems in day-to-day Magento work. With systematic scoping, safe remote debugging and structured logging, even the most stubborn production-only bug becomes tractable.
-
May 28, 2025
Upload endpoints are a common source of errors in REST APIs. Incorrectly documented content types, missing validation and incomplete tests turn them into a black box. This guide shows how to correctly describe Symfony upload endpoints with OpenAPI 3.1, secure them on the server side and test them fully with PHPUnit.
-
May 25, 2025
A database schema changes over years through many small migrations, and without systematic regression tests it stays unclear whether a new change silently breaks an existing application. Schema snapshots, contract tests and automated diff checks make exactly that visible before a deployment causes damage.
-
May 22, 2025
The page object pattern is meant to decouple tests from selectors and DOM structure, but in practice it often balloons into classes with hidden business logic and deep inheritance chains. This article shows what the pattern actually solves, which overengineering traps are common, what a minimal page object looks like, and when a test is better off without the pattern entirely.
-
May 21, 2025
A Bash script that calls curl, ssh or mysqldump cannot be meaningfully tested without touching real network connections or databases on every test run. Mocking external commands solves exactly this problem: the PATH override pattern and targeted function overriding make Bash tests deterministic, fast and independent of real infrastructure.
-
May 17, 2025
A TypeScript type that compiles without errors is not automatically correct. Complex generic and conditional types can silently widen to any, accept an invalid shape they should reject, or narrow incorrectly inside a conditional branch. Tools like tsd, expect-type, and Vitest's expectTypeOf make exactly this behavior testable, purely at compile time, without a single runtime test.
-
May 16, 2025
Shell scripts without tests are a black box in your automation. The Bash Automated Testing System (BATS) brings structured unit tests, fixtures, and mocking to the shell world, and it integrates seamlessly into GitHub Actions, GitLab CI, and Jenkins without any external runtime dependencies.
-
May 15, 2025
A freshly installed PHPStorm without a checklist costs hours: wrong interpreter, too much indexed vendor bulk, no Xdebug, no run configurations. This checklist covers all the critical settings, in the order that matters most for Docker Magento projects.