How QA Automation Accelerates the AI-based Web Scraping Platform Development

1,496

Building software that can automatically collect business data from websites presents unique challenges.  

The Agiliway development team set out to create a lead generation platform powered by artificial intelligence. And what was discovered is that traditional testing methods weren’t enough. And the solution? A testing approach that works alongside developers as they write code. 

In the article, we share our experience in the adoption of a QA automation framework that allows developers to analyze bugs early on and fix them right away. 

Why Standard Testing May Fall Short 

Most software projects follow a familiar pattern: developers write code, then testers check if it works properly. This approach becomes problematic when building AI systems that need to analyze company profiles, scrape data from multiple sources, and identify potential business leads. 

The complexity multiplies when your platform must process information from websites, social media, industry databases, and professional networks while staying within legal boundaries. Traditional testing simply can’t keep up with the rapid changes these systems create. 

A Different Approach to Quality Control 

Agiliway’s team took a different path. Instead of separating development and testing into separate phases, they were merged into a single workflow. Using Windsurf IDE, developers could write code while an AI assistant simultaneously created appropriate tests. 

This setup meant that every piece of code came with its own quality checks from day one. The AI assistant understood the entire project, so it could suggest relevant tests that matched what the developers were actually building. 

This resulted in immediate feedback: developers caught problems while writing code rather than weeks later during formal testing phases. 

Making Browser Testing Actually Work 

Testing user interfaces has always been tricky, especially for platforms with filtering mechanisms, data visualizations, and real-time updates. The team chose Playwright because it includes its own browser, eliminating the usual headaches of connecting external testing tools. 

More importantly, Playwright integrated directly with Windsurf’s MCP server. This connection allowed the system to automatically create and run interface tests without manual setup. When developers added new features like Magic Mode that automatically fill search filters, corresponding tests appeared automatically. 

Tests That Understand Context 

Before creating any test, the system pulls information from project requirements stored in Jira and documentation in Confluence using the Atlassian MCP server. It combines this background knowledge with an analysis of the actual code and user interface. 

The outcome? Tests that validate not just technical functionality, but whether the software actually meets business needs. Instead of generic tests, the system creates scenarios that check whether users can successfully identify companies likely to need specific services based on ICP-based scoring. 

This contextual understanding means tests stay relevant as requirements change, rather than becoming outdated artifacts that nobody trusts. 

Keeping Everything Synchronized 

Managing tests across different tools usually creates chaos. The MCP TestRail connector solves this by maintaining a central library of both manual and automated test cases. When the automated system creates new tests, they slot into the existing TestRail repository rather than creating duplicates. 

This synchronization becomes crucial as projects grow. Teams can see test coverage for features they requested, while developers know their automated tests complement rather than replace manual testing efforts. 

When Tests Fail 

Failed tests don’t just report problems; they also take action. The system automatically creates detailed bug reports in Jira, complete with screenshots and enough information for developers to understand what happened. 

This automation eliminates the usual back-and-forth between testers and developers. Instead of vague problem reports, developers receive specific information about what failed, under what conditions, and how to reproduce the issue. 

The system can even assign bugs to the right team members automatically, speeding up the entire resolution process. 

Building a Solid Technical Ground 

The platform’s architecture supports the elaborate testing approach through careful technology choices. The backend uses Python with Flask for stable services that automated tests can reliably interact with. PostgreSQL handles data storage consistently, while RabbitMQ manages message queuing for asynchronous operations. 

Docker creates identical testing environments that match production conditions. The AI capabilities rely on LangChain components, including Core, OpenAI, and Community modules. External data collection happens through Apify and RapidAPI, with Laminar providing additional orchestration. 

The frontend, built with Next.js using App Router, offers predictable patterns for automated testing. React Query manages data efficiently, while TypeScript provides strong typing that helps automated tests interact reliably with interface elements. The user interface uses Tailwind CSS and shadcn/ui-based components, creating consistent elements that tests can validate effectively. 

Results from Integrated Testing 

The implementation delivered measurable improvements. The integrated approach reduced manual testing effort significantly while catching problems before they reached users. Early defect detection through continuous testing prevented numerous issues from appearing in production. 

The automated bug reporting significantly cut resolution times. It eliminates the investigation phase that typically follows problem discovery. Developers could start fixing issues immediately instead of spending time figuring out what went wrong. 

Learning and Improving Over Time 

As the lead generation platform evolved, the testing framework adapted with it. New features automatically received appropriate quality checks without manual intervention. The system learns from test execution patterns, gradually improving the accuracy and relevance of generated test scenarios. 

This continuous improvement means quality assurance gets better over time rather than becoming a burden that slows down development. 

QA Automation That Works 

The Cascade feature in Windsurf ties together code, tests, documentation, and task tracking into a connected toolchain. This integration ensures that tests remain consistent with current requirements while facilitating the entire QA process. 

Backend systems built with Python and Flask provide reliable APIs for automated testing. Frontend components using Next.js, React Query, and TypeScript create predictable patterns that tests can consistently validate. Docker ensures that testing environments accurately mirror production conditions. 

The AI components, powered by LangChain and integrated with various APIs through Apify and RapidAPI, allow thorough and advanced test generation that understands both technical requirements and business logic. 

This project demonstrates that quality assurance can evolve. Instead of slowing down development to ensure quality, integrated testing actually accelerates delivery while improving reliability. 

The approach works particularly well for AI-powered systems that scrape posts according to given criteria, search for executive communications, and rank results using sophisticated scoring algorithms. Traditional testing approaches struggle with these dynamic requirements. 

Project Insights and Best Practices 

Organizations building complex data-driven systems can apply similar principles regardless of their specific technological choices. The key insights revolve around integration rather than separation, context rather than isolation, and adaptation rather than rigid processes

The project proves that sophisticated testing doesn’t require sacrificing development velocity. Instead, smart integration of testing and development processes creates better software faster than traditional approaches allow. 

If you want to learn more about the solution or need a consultation regarding your opportunities for growing your business, book a call with our experts.