Taming Salesforce Authentication: Playwright Automation for a Deeply Integrated Sales Productivity Platform
Cirrus Insight bridges Gmail, Outlook, and Salesforce CRM for over 50,000 customer-facing teams at Walmart, Tableau, TripAdvisor, and Samsung. Automating a platform this deeply entangled with authentication-resistant third-party systems required architecture, not just scripting.
The productivity layer that lives inside your inbox.
Cirrus Insight is an AI-powered sales productivity platform that operates inside Gmail, Outlook, and Microsoft Teams — bridging email inboxes directly with Salesforce CRM. It enables sales teams to log emails, track opens, schedule meetings, sync calendars, and access Salesforce data without leaving their inbox environment. The platform serves over 50,000 customer-facing teams worldwide, with clients including Walmart, Tableau, TripAdvisor, and Samsung. It is deeply integrated with three major platforms — each with distinct OAuth flows, security policies, and automation-resistance characteristics — making it one of the most technically complex automation targets in the QE portfolio. Onboarded in November 2025, the engagement was focused entirely on automation engineering: assessing the existing Playwright framework, solving foundational authentication problems, and building a reliable, fast, maintainable automation suite across all three integrated platforms.
Salesforce locks your test account after repeated login attempts. Gmail has bot-detection. Outlook has its own OAuth flow. Solving all three — architecturally — was the only path to reliable automation.
At a glance.
Diagnose, architect, deliver.
The engagement moved through three tightly sequenced phases — a diagnostic audit to understand where the existing framework was failing, an architectural rebuild that solved authentication at the session level, and a coverage expansion phase that delivered structured production regression and 350+ automated tests.
Three platforms. Three authentication walls. One test suite.
Automating quality engineering for Cirrus Insight meant testing a product deeply entangled with Salesforce, Gmail, and Outlook — platforms with strict, automation-resistant security policies. The existing Playwright framework was failing in multiple compounding ways before a single architectural decision had been made.
Salesforce Auto-Lock
Salesforce accounts lock automatically after repeated login attempts. The existing framework re-authenticated on every test file execution, triggering account lock-outs that halted entire test runs. Each lock-out required manual intervention before testing could resume.
Multi-Platform Authentication Complexity
The test suite had to maintain concurrent authenticated sessions across Salesforce, Gmail, and Outlook simultaneously — each with different OAuth flows, token lifetimes, and bot-detection mechanisms. Solving one authentication problem often created failures in another.
6-Hour Full-Suite Execution Time
The initial full Playwright suite ran sequentially and took over 6 hours to complete. At this runtime, the suite was effectively unusable as a development feedback mechanism — by the time it finished, multiple new changes had already been committed.
Widespread Test Flakiness
Login-related failures and inconsistent browser extension loading caused widespread test flakiness across the suite. Tests that passed one run would fail the next — not due to code changes, but due to authentication state inconsistency — making CI results untrustworthy.
Architecture first. Coverage second.
The engagement addressed Cirrus Insight's automation challenges by solving authentication at the architectural level before expanding test coverage — transforming a fragile, slow framework into a fast, reliable foundation for 350+ tests across three integrated platforms.
Shared Session Storage Architecture
Designed and implemented a shared session storage solution that establishes authentication tokens once per test run and shares them across all Playwright test files. This eliminated the root cause of Salesforce account lock-outs — sequential per-file re-authentication — without requiring any changes to the Salesforce account configuration.
Project-Level Cookie Architecture & Framework Fixes
Resolved native Salesforce login bugs through project-level cookie management. Five framework-level fixes were identified, implemented, and merged to the development branch — improving baseline framework stability for all future test development.
Parallelised Test Execution
Restructured the Playwright test suite to execute across multiple parallel workers. Full suite execution time dropped from over 6 hours to under 2 hours — a 66% reduction — without any change to the scope or coverage of the tests being executed.
2FA & Multi-Platform OAuth Automation
Implemented Salesforce 2FA automation and fully automated the OAuth flows for both Gmail and Outlook (OWA). All three platform authentication flows now run without manual intervention — supporting both local and CI execution contexts reliably.
Cursor AI-Assisted Development
Cursor AI used throughout the engagement for test script generation, code review, ESLint compliance checking, and refactoring. The AI-assisted workflow accelerated development velocity while maintaining code quality standards across the growing test suite.
Production Regression & Smoke Suites
Structured manual production regression cycle established for every weekly release — providing consistent pre-release coverage regardless of automation state. A dedicated Playwright smoke test suite was built and maintained as the fast-path validation for every deployment.
The numbers.
Automated Test Cases
Execution Time Reduced
Full Suite Runtime
Flaky Test Rate
What changed.
Automated Test Cases Delivered
Covering Salesforce, Gmail, and Outlook integration flows — fully maintained and ESLint-compliant.
Execution Time Reduced
Full suite runtime dropped from 6+ hours to under 2 hours through parallelisation — no change in coverage scope.
Full Suite Runtime
Down from 6+ hours sequential execution — now viable as a CI feedback mechanism within a standard development cycle.
Flaky Test Rate
Authentication-related flakiness eliminated at the architectural level — suite reliability consistent across runs.
Framework Fixes Merged
Foundational fixes to the Playwright framework merged to development branch — improving baseline stability for all future test authoring.
Platforms Fully Automated
Salesforce (with 2FA), Gmail (OAuth), and Outlook OWA — all running without manual authentication intervention in CI and local contexts.
The stack.
The Cirrus Insight engagement demonstrates that automation for deeply integrated SaaS products requires architectural thinking, not just script writing. The Salesforce authentication problem couldn't be solved by writing better tests — it required redesigning how authentication state was managed across the entire framework. By solving that problem at the session level, parallelising execution, and fully automating three distinct OAuth flows, the team transformed an unstable, 6-hour suite into a fast, reliable automation foundation — and delivered 350+ tests to build on it.