Automated E2E Testing for 1C-Bitrix with Playwright

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Showing 1 of 1All 1626 services
Automated E2E Testing for 1C-Bitrix with Playwright
Simple
~1 day
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1356
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    943
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    693
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    828
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    731
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1073

The Importance of E2E Testing for Bitrix

After every module, template, or API integration update, someone manually checks the cart, checkout, and personal account. The process takes 2–3 hours but still misses regressions: no tester in a single run can cover five browsers, mobile viewports, and social network login. With over 50 Bitrix projects under our belt — in roughly a third of cases the release was delayed precisely because of a regression discovered at the last moment. E2E tests solve this automatically: they run in 15–20 minutes and consistently catch the very cases a human misses. This reduces regression testing time by over 80%.

How We Do It

We set up the test environment, choose the tool, write Page Object Model for key components and integrate the run into your CI/CD. We deliver turnkey — from auditing the current architecture to handing over documentation and training your team.

Step-by-Step Process

  1. Audit: Analyze current Bitrix components, AJAX handling, and critical user flows. (1–2 days)
  2. Design: Align scenario list with your team, decide coverage priorities. (1 day)
  3. Implementation: Write Page Object Model for 5–10 key components and 15–30 test scenarios. (3–5 days)
  4. CI/CD Integration: Set up automated runs on push to main/staging with artifact retention. (1 day)
  5. Handover: Provide documentation and a 2–3 hour workshop for your team. (1 day)

Playwright vs Cypress for Bitrix: A Comparison

Criterion Playwright Cypress
Browser support Chromium, Firefox, WebKit Only Chromium and derivatives
Mobile viewports Device emulation (iPhone, Pixel, etc.) Limited emulation
Multi-tab handling Natively supported Not supported
Network interception Yes (route, waitForResponse) Yes, but more complex
CI/CD integration Simple, built-in reporter Requires additional plugins
Execution speed High (parallel execution) Moderate

Playwright executes tests up to 2x faster than Cypress due to parallel execution and native multi-browser support (Playwright official docs). It supports all browsers in a single run, works headless and headed, and has a powerful locator API that doesn't break when the DOM changes. Built-in mobile device emulation and network interception are exactly what's needed for testing sale.order.ajax with its async nature.

Cypress is good for SPAs, but for multi-page Bitrix sites its limitations (single origin, lack of native multi-tab support) create problems. In our projects we use Playwright 9 out of 10 times.

Test Environment Infrastructure

The test environment must be a separate database with fixed data. No tests on production. We deploy a copy of the site with known characteristics: a catalog of 50–100 products, several payer types, configured delivery and payment methods. Minimum repository structure:

tests/
  e2e/
    fixtures/        # JSON with test data
    pages/           # Page Object Model
    specs/           # scenarios
  playwright.config.ts
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  testDir: './tests/e2e/specs',
  timeout: 30_000,
  retries: process.env.CI ? 2 : 0,
  use: {
    baseURL: process.env.TEST_BASE_URL || 'http://localhost:8000',
    trace: 'on-first-retry',
    screenshot: 'only-on-failure',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'mobile',   use: { ...devices['iPhone 13'] } },
  ],
});

Page Object Model for Bitrix

Standard components like bitrix:sale.order.ajax, bitrix:sale.basket.basket, and bitrix:system.auth.form have stable CSS classes. Page Object isolates locators from tests — if template markup changes in a new version, you edit one file instead of all scenarios.

// tests/e2e/pages/CartPage.ts
import { Page, Locator } from '@playwright/test';

export class CartPage {
  readonly page: Page;
  readonly checkoutButton: Locator;
  readonly totalPrice: Locator;

  constructor(page: Page) {
    this.page           = page;
    this.checkoutButton = page.locator('.basket-checkout-btn');
    this.totalPrice     = page.locator('.basket-coupon-block-total-price-current');
  }

  async goto() {
    await this.page.goto('/personal/cart/');
  }

  async applyPromocode(code: string) {
    await this.page.fill('.basket-coupon-field-input', code);
    await this.page.click('.basket-coupon-apply-btn');
    await this.page.waitForResponse(resp =>
      resp.url().includes('ajax_basket') && resp.status() === 200
    );
  }
}

Key Scenarios

Add to cart and checkout:

// tests/e2e/specs/checkout.spec.ts
import { test, expect } from '@playwright/test';
import { CartPage } from '../pages/CartPage';

test('checkout flow', async ({ page }) => {
  // Add product from catalog page
  await page.goto('/catalog/electronics/headphones/sennheiser-hd-599/');
  await page.click('.catalog-element-offer-set-item:first-child'); // select SKU
  await page.click('.btn-buy');
  await expect(page.locator('.bx-basket-count')).toContainText('1');

  // Go to cart
  const cart = new CartPage(page);
  await cart.goto();
  await expect(cart.totalPrice).toBeVisible();

  // Checkout
  await cart.checkoutButton.click();
  await page.fill('#order-name', 'Ivan Ivanov');
  await page.fill('#order-email', '[email protected]');
  await page.fill('#order-phone', '+79001234567');
  await page.click('#pay-system-1'); // select payment method

  await Promise.all([
    page.waitForURL(/\/order\/success\//),
    page.click('.btn-checkout-submit'),
  ]);

  await expect(page.locator('.sale-order-detail-result')).toBeVisible();
});

Login and personal account:

test('login and account access', async ({ page }) => {
  await page.goto('/personal/login/');
  await page.fill('#USER_LOGIN', '[email protected]');
  await page.fill('#USER_PASSWORD', 'testpassword123');
  await page.click('.login-btn');

  await expect(page).toHaveURL(/\/personal\//);
  await expect(page.locator('.personal-user-name')).toContainText('Ivan');
});

CI/CD Integration

We configure test runs on every push to main/staging. On failure, artifacts (screenshots, traces) are preserved for analysis. Example GitHub Actions config:

GitHub Actions workflow
# .github/workflows/e2e.yml
name: E2E Tests
on:
  push:
    branches: [main, staging]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: npx playwright test
        env:
          TEST_BASE_URL: ${{ secrets.TEST_BASE_URL }}
      - uses: actions/upload-artifact@v4
        if: failure()
        with:
          name: playwright-report
          path: playwright-report/

What's Included in E2E Setup (What We Deliver)

  • Audit of current architecture: which components are used, how asynchronicity is implemented, which scenarios are critical.
  • Test coverage design: align scenario list with your team.
  • Writing Page Object Model for 5–10 key components.
  • Implementing 15–30 test scenarios (cart, checkout, authentication, filtering, promo codes, personal account).
  • Setting up CI/CD run (GitHub Actions / GitLab CI / Jenkins).
  • Documentation for running and maintaining tests.
  • Team training: a 2–3 hour workshop on adding new scenarios.

Setup cost typically ranges from $2,500 to $7,500, depending on the number of scenarios and complexity. For example, a typical project with 20 scenarios costs around $5,000 and saves approximately $2,000 per month in manual testing costs. This investment typically pays for itself within 2–3 months through reduced manual regression costs.

Priority Scenarios for E2E Testing

Scenario Priority Bitrix Components
Add to cart + checkout Critical sale.basket.basket, sale.order.ajax
Login / registration Critical system.auth.form
Search + catalog filter High search.title, catalog.smart.filter
Promo code application High sale.basket.basket.coupon
Personal account (order history) Medium sale.personal.order.list

Test stability is the main goal. We use waitForResponse instead of waitForTimeout, locators by data-testid where standard CSS classes change with template updates. When tests are flaky, the issue is almost always in Bitrix AJAX asynchronicity, not in Playwright.

Our Experience and Guarantees

We are certified 1C-Bitrix partners with over 5 years of experience. During this time we have implemented E2E testing for 20+ projects of varying complexity — from small online stores to corporate portals on Bitrix24. We guarantee test stability: after handover, tests do not fail on empty changes. If questions arise, we provide free consultation for one month after delivery.

Ordering Setup

We assess your project within 1–2 working days. You need to provide access to the repository and test environment. Contact us — we'll tell you which scenarios we'll cover first and how long it will take. For a quick estimate, share your project details.

This complete Playwright setup for Bitrix ensures comprehensive E2E integration and checkout testing for Bitrix sites, covering all critical user paths.

Duplicate Products on Page 3: A Bug That Goes to Production

A real case: an online store with pagination through bitrix:catalog.section duplicates products on page three after every second visit. Cache clearing helps for a day, then the duplicates return. Root cause: a custom sort handler collides with PAGEN_1, and under a specific filter combination CIBlockElement::GetList returns identical IDs. Code review missed it; only testing caught it. We build QA for 1C-Bitrix projects that catches such bugs before they hit production: manual functional, automated E2E, load, and acceptance testing. With over a decade of Bitrix experience, we have a library of typical pitfalls and test scenarios that prevent these issues from the start.

How Does a Standard Bitrix Project Break Without Dedicated Testing?

1C-Bitrix is not a landing page. Behind the frontend lie dozens of modules, external integrations, and non‑obvious dependencies. A discount change in sale.discount breaks a promo code in sale.basket.discount — the discount module is one of the most fragile in the platform. Interchange with 1C via catalog.import.1c or REST fails when property mapping is off, resulting in products without price or stock. Core updates — bitrix:main updated, a custom component uses the deprecated CModule::IncludeModule. Without regression testing, every deployment is Russian roulette. Cross‑browser: sale.order.ajax renders differently in Safari and Chrome; the “Place Order” button can move off‑screen on an iPhone. These are not edge cases — they are daily realities for Bitrix teams.

What Does Functional Testing Cover?

We check every business scenario — not just “works or doesn’t work”, but all boundary cases.

Catalog (catalog.section, catalog.element)

  • Smart filter catalog.smart.filter: all property combinations, reset, result counting. Filters by SKUs break most often.
  • Sorting + pagination — the duplicate bug described above.
  • Comparison via catalog.compare.list — add, remove, display differences.
  • Quick view — modal window, cart from modal.

Cart and Order (sale.basket.basket, sale.order.ajax)

  • Adding from catalog, product page, quick order.
  • Discounts: by quantity, by amount, by coupon, cumulative. Discount intersection — at least eight test combinations.
  • Delivery calculation: handlers sale.delivery.services, cost, time, pickup points on map.
  • Payment: sale.paysystem — processing, handling declines, refunds.
  • Order placement: email via main.mail.event, CRM recording, transmission to 1C via sale.export.1c.

Personal Account (sale.personal.section)

  • Registration, authorization, password recovery — including Cyrillic email edge cases.
  • Order history, repeat order.
  • Subscriptions, bonus program.

Forms and Search

  • form.result.new / iblock.element.add.form — submission, validation, file fields.
  • search.page — relevance, morphology, typo handling via search.title.

Why Is Regression Testing Critical for Bitrix?

After every deployment we verify that nothing previously working is broken.

  • Smoke tests — main page loads, catalog shows products, order completes. 5 minutes, run after every deploy. If smoke fails — roll back immediately.
  • Regression suite — 40–80 test cases covering main scenarios before every release.
  • Visual testing — screenshot comparison (Percy or Playwright). A button shifted 20px, font changed after update — test shows the diff.
  • Module checklists — structured lists for sale, catalog, iblock, search. Each module has its own checklist.

What Happens During Load Testing?

The question is not “will the site handle it” but at how many concurrent users catalog.section starts returning 500 errors.

Scenario Share Target Response What Breaks First
Main page 20% < 1 sec Composite cache if not configured
Catalog with filters 30% < 2 sec MySQL – heavy JOINs on b_iblock_element_property
Product page 25% < 1.5 sec Queries for SKUs
Add to cart 10% < 1 sec Table locks on b_sale_basket
Checkout 5% < 3 sec Delivery handlers (external APIs)
Search 10% < 2 sec b_search_content without indexes

Tools:

  • k6 — JavaScript scripting.
  • Apache JMeter — classic, for complex scenarios with cookie authorization.
  • Yandex.Tank — real‑time visualization, integration with Overload.

Output: peak RPS, response times by percentiles p50/p95/p99, bottlenecks (CPU, RAM, MySQL slow queries on b_iblock_element, file cache). Recommendations: which index to add, which query to rewrite with D7 ORM, where to enable composite cache.

What Deliverables Do You Receive After Testing?

  • Test plan with scope, priorities, and quality criteria.
  • Test case suite — functional, regression, load.
  • Defect report in a tracker (Jira/YouTrack) with severity classification.
  • Auto tests (Playwright/Cypress) — basic smoke suite for CI/CD.
  • Load testing protocol with graphs and recommendations.
  • Acceptance certificate after UAT — confirming readiness for launch.

After delivery, we provide free consultation for a month — answering questions on test improvements and process adaptation. Contact us to receive a full package of documents and auto tests.

Cross‑Browser Testing

We test where buyers actually are. Statistics from your Metrica are more important than general market data.

Minimum set:

  • Chrome (last 2 versions) — main traffic.
  • Safari on iOS — critical for mobile checkout, sale.order.ajax often behaves unpredictably.
  • Yandex.Browser — significant share in Russia, Chromium‑based but with extension quirks.
  • Samsung Internet — mobile Android, often forgotten.

Devices:

  • Desktop: 1920×1080, 1366×768.
  • iPhone: 375×812, 390×844 — checkout must be verified.
  • Android: 360×800, 412×915.

Tools: BrowserStack for real devices, Playwright for automation on Chromium/Firefox/WebKit.

Automation

Playwright — primary choice for E2E on Bitrix:

  • Cross‑browser: Chromium, Firefox, WebKit.
  • Parallel execution, automatic waits.
  • Works well with dynamic forms sale.order.ajax.
  • Supports mobile viewports and geolocation.

Cypress:

  • Runs in browser — more stable for SPA‑like interfaces.
  • Excellent visual runner for debugging.
  • Limitation: only Chromium‑based browsers.

PHPUnit for custom code:

  • Unit tests for custom Bitrix components and modules.
  • Tests business logic without frontend dependency.
  • Integration with CI/CD — GitLab CI, GitHub Actions.

UAT – Acceptance Testing

Final check with the client on a staging environment with real data:

  • Jointly compile a list of critical scenarios — 15–20 key customer paths, not 200 test cases.
  • Staging with a copy of the production database (anonymized personal data).
  • Quick bug tracking — Jira/YouTrack, prioritization by severity.
  • Acceptance protocol — document with results, signatures, and launch readiness.

Order UAT support and we guarantee a release without surprises.

QA Process – Integrated, Not Tacked On

  1. Requirements analysis — QA participates in task discussions, catches ambiguities. “Does the discount apply to the product or the order?” — such a question upfront saves two days of debugging.
  2. Test cases before development — scenarios ready before the first line of code.
  3. Code review — checks for typical Bitrix mistakes: uncleared component cache, direct SQL queries instead of ORM, missing $USER‑>IsAuthorized() check.
  4. Functional → regression → deploy.
  5. Post‑release monitoring — errors in bitrix/error.log, metrics in Metrica, alerts for 500 errors.

We have been working with Bitrix for over 10 years and have tested more than 300 projects of various scales — from small online stores to corporate portals with 1C and Bitrix24 integration.

Timelines

Task Duration
Test plan 2–3 days
Functional testing (medium store) 3–5 days
Basic E2E auto test suite (Playwright) 2–3 weeks
Load testing + report 1–2 weeks
Cross‑browser testing 2–3 days
UAT support 3–5 days
QA process from scratch 3–4 weeks

Testing cost is calculated individually for your project. Get a free consultation — we will assess the scope within one business day and provide a preliminary estimate and test plan. Contact us to discuss your project and schedule a call.