JSPM

  • Created
  • Published
  • Downloads 47
  • Score
    100M100P100Q60434F
  • License ISC

AI-powered QA agent using LLM models for automated testing and web interaction

Package Exports

  • qa-agent
  • qa-agent/dist/server.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (qa-agent) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

QA Agent

npm license build

A powerful CLI tool that uses autonomous agents to crawl, analyse, and test the interactive components of any given website or web application. It's designed for developers and QA teams who want an automated assistant to navigate and evaluate webpages for interactivity, functionality, and structural issues. Check out the site at QA Agent for more detailed info and steps


๐Ÿš€ Features

  • Crawl and map internal website pages
  • Detect and log interactive elements (buttons, forms, links)
  • Automated testing of links and UI components
  • Pluggable architecture with support for LLM analysis
  • CLI-first design for easy integration into dev workflows

๐Ÿ“ฆ Installation

You can install the package globally:

npm install -g qa-agent

๐Ÿ› ๏ธ Usage

Run the agent with your desired configuration:

agent-run --goal "Test all interactive elements" --url https://example.com --key <GOOGLE_GENAI_API_KEY>

You can also use a config file instead of passing arguments:

agent-run --config ./agent.json

Example config file (agent.json):

{
  "goal": "Test the login functionality",
  "key": "your-api-key",
  "url": "http://localhost:3000",
  "port": 3001,
  "auto-start": true,
  "detailed": true,
  "headless": true,
  "endpoint": false,
  "data": {
    "additional": "info"
  }
}

โš™๏ธ CLI Arguments

Flag Description Required Default
--goal Goal for the QA agent (what to test/achieve) โœ… -
--url Base URL of the site to test โœ… -
--key Google GenAI API Key โœ… -
--port Local server port โŒ 3001
--config, -c Path to JSON config file โŒ -
--auto-start Automatically start the agent โŒ true
--daemon, -d Run in background (daemon mode) โŒ false
--sessionId Session identifier for multi-run tracking โŒ "1"
--headless Run browser in headless mode โŒ false
--detailed Test every UI element across all pages (more exhaustive, slower) โŒ false
--endpoint Run agent in API endpoint testing mode โŒ false
--autoconnect Automatically open the updates dashboard in the browser โŒ true
--help, -h Show help message โŒ -
optimize-images Optimize images. Lead to more accurate results but takes more time. โŒ false.
cross-platform The agent will test on desktop, mobile and tablet. โŒ false.

๐Ÿ“‘ Logs & Monitoring

QA Agent stores logs in the logs/ directory of your project.

You can inspect logs directly from the CLI:

agent-run logs            # Show main log
agent-run logs --json     # Output logs in JSON format
agent-run mission         # Show mission log (markdown)
agent-run crawl-map       # Show crawl results (markdown)
agent-run navigation-tree # Show navigation tree (markdown)
agent-run logs-dir        # Show logs directory path

Each log may also be session-specific (e.g., crawl_map_1.md).


๐Ÿงญ Subcommands

  • agent-run run โ†’ Start the agent
  • agent-run stop โ†’ Stop all running agents
  • agent-run logs โ†’ View logs
  • agent-run crawl-map โ†’ View crawl map
  • agent-run mission โ†’ View mission log

๐Ÿงช Examples

Run with inline arguments:

agent-run --goal "Analyze UI usability" --url https://myapp.com --key ABC123

Run in daemon mode:

agent-run --goal "Test login" --url http://localhost:3000 --key ABC123 --daemon

Run with config file:

agent-run --config ./agent.json

Run in detailed mode (tests every button, form, and link):

agent-run --goal "Deep test of UI components" --url https://app.com --key ABC123 --detailed

๐Ÿ“ Project Structure

โ”œโ”€โ”€ bin/                # CLI entry point
โ”œโ”€โ”€ dist/               # Compiled agent logic, server, testing modules
โ”œโ”€โ”€ logs/               # Session logs and results
โ”œโ”€โ”€ package.json        # NPM metadata
โ””โ”€โ”€ README.md           # Project documentation

๐Ÿ“„ License

This project is licensed under the Apache License. See the LICENSE file for details.