AI-Powered Test Automation: GenAI Without Security Risks!
By Eduard Dubilyer , CTO of Skipper Soft
đ Introduction
AI-powered test automation is transforming how we design and execute tests. Large Language Models (LLMs) can generate test ideas, automation scripts, and intelligent test coverage suggestions without manual scripting. However, when third parties access your environment, thereâs always a risk of exposure or misuse. But what if you could run these models locally, eliminating the need for cloud-based APIs and enhancing data security?
In this article, weâll explore how to use Ollama to run LLMs locally and leverage Page Assist to generate test ideas and automation test scripts for any web application.
đŹ Why to try Running AI Models Locally for Test Automation:
As a Quality Architect, we always on the lookout for new innovations in test automation. While cloud-based AI tools like ChatGPT and Copilot are helpful, I was curious to explore:
1ď¸âŁ Can AI models generate meaningful test scripts for real applications?
2ď¸âŁ Is it possible to run LLMs locally without relying on cloud-based APIs?
3ď¸âŁ Would this approach be mature enough for enterprise-level automation?
With these questions in mind, I decided to set up Ollamaâan open-source framework for running LLMs locallyâand integrate it with Page Assist, a browser extension that interacts with the AI model.
đ Results & Observations: Is Local AI Ready for Enterprise Testing?
After experimenting with various test scenarios, hereâs what I found:
â What Worked Well?
â Generated automation test ideas based on UI elements
â Produced Selenium & Playwright scripts with locators & assertions in language of my choice.
â Handled negative & boundary case generation better than traditional test case writing
â Worked offlineâeliminating API costs and data privacy concerns
â ď¸ Where It Struggled?
â Generated scripts werenât always production-readyâsome locators were incorrect
â Lacked built-in test execution capabilitiesâneeded integration into existing frameworks
â High resource consumptionârequired at least 16GB RAM for smooth performance
đ Is It Ready for Enterprise Test Automation?
đš For now, itâs an exciting tool but not a complete replacement.
đš AI-generated test cases still need human validation & refinement before execution.
đš Running LLMs locally is resource-intensive, making cloud alternatives more scalable.
đš However, for quick test case ideation, exploratory testing, and automation script generation, itâs incredibly useful.
đŻ Step-by-Step Guide to Running AI Agents Locally
â Step 1: Install Ollama for Local AI Execution
To run LLMs locally, download Ollama, a tool for setting up AI models offline:
1ď¸âŁ Visit Ollamaâs website(https://ollama.com/) and download the software for your OS (Windows, macOS, or Linux).
2ď¸âŁ Install and verify that Ollama runs correctly.
â Step 2: Choose an AI Model for Test Generation
Ollama supports various AI models for different use cases. For test automation, choose a model that excels in code generation:
1ď¸âŁ Open a terminal or command prompt.
2ď¸âŁ Search for available AI models.
3ď¸âŁ Select DeepSeek-R1, optimized for reasoning and code generation.
â Step 3: Set Up the AI Model Locally
Now that you’ve selected your AI model, set it up with a simple command:
>> ollama run deepseek-r1
â Step 4: Install PageAssist Browser Extension
To integrate AI with your web browser and enable test automation, install PageAssist, a Chrome/Firefox extension that connects locally running AI models.
đš Install PageAssist from the Chrome Web Store or Firefox Add-ons
đš This extension allows you to generate test ideas and automation scripts directly from the browser
â Step 5: Open a Website for Test Automation
Once the AI model is running locally and PageAssist is installed:
đš Navigate to the website for which you want to generate test scenarios
đš Ensure the PageAssist extension is enabled
â Step 6: Enable PageAssist Side Panel for Better Visibility
For an enhanced experience:
1ď¸âŁ Click on the PageAssist extension in the browser
2ď¸âŁ Open the side panel to view AI-generated responses in real-time
3ď¸âŁ Select the locally running AI model (DeepSeek-R1):
â Step 7: Configure RAG Settings in PageAssist
To optimize test generation, enable Retrieval-Augmented Generation (RAG):
1ď¸âŁ Click on Settings in PageAssist
2ď¸âŁ Select AI model as an embedding model
3ď¸âŁ This ensures the AI considers context from the web page before generating test scripts
â Step 8: Provide Effective Prompts for Automation Test Ideas & Scripts.
1ď¸âŁ Enter a well-structured prompt in the message field to generate test ideas or automation scripts.
Example 1: Prompt – Generate Selenium Java tests for Login Page. Example 2: Prompt – Analyse the webpage https://www.skipper-soft.com/ and generate UI test cases to validate all UI components, including the logo, navigation menu, links, buttons, images, and interactive elements. Ensure tests verify visibility, functionality, responsiveness, and broken links. Provide Playwright JS test scripts for execution.
2ď¸âŁ The AI model will take some time to analyse and think like a human tester before generating meaningful test cases. You can expand the response to understand its reasoning process.
3ď¸âŁ Once processed, the AI agent will provide detailed test cases and automation scripts.
Output:
đĄ Final Verdict:
AI-assisted test automation is evolving rapidly, offering faster test creation, intelligent suggestions, and enhanced coverage. Running AI models locally not only boosts efficiency but also ensures data privacy and security by keeping sensitive test data(credentials or secret information) within your infrastructure. While promising, enterprise adoption will require better integration, script validation, and optimized resource management. With human oversight and a secure local setup, AI can revolutionize testingâexplore it now to stay ahead! đ