Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Installation

This guide will walk you through installing RocketQA and setting up your development environment for testing success.

Before installing RocketQA, ensure you have the following requirements:

RocketQA requires Node.js version 20 or higher. Check your current version:

Terminal window
node --version

If you need to install or upgrade Node.js, choose your platform:

Using Node Version Manager (Recommended):

Terminal window
# Install nvm if you don't have it
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Restart your terminal or source your profile
source ~/.bashrc # or ~/.zshrc
# Install and use Node.js 20
nvm install 20
nvm use 20
nvm alias default 20

Using Homebrew:

Terminal window
brew install node@20
brew link --force node@20

Direct Download: Visit nodejs.org and download the LTS version.

Using Node Version Manager (Recommended):

Terminal window
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc
# Install Node.js 20
nvm install 20
nvm use 20
nvm alias default 20

Using NodeSource Repository:

Terminal window
# Add NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# Install Node.js
sudo apt-get install -y nodejs

Using Node Version Manager for Windows:

Terminal window
# Download nvm-windows from GitHub releases page or use Chocolatey
choco install nvm
# Install Node.js 20
nvm install 20.0.0
nvm use 20.0.0

Direct Download: Visit nodejs.org and download the Windows installer.

After installing Node.js, verify everything is working:

Terminal window
node --version # Should show v20.x.x or higher
npm --version # Should show npm version

RocketQA is designed to work without installation - you can use it directly via npx. However, there are multiple ways to use RocketQA depending on your needs.

Section titled “Method 1: NPX (Recommended for Most Users)”

The simplest way to use RocketQA is via npx, which downloads and runs the latest version automatically:

Terminal window
# No installation needed! Just run:
npx rocketqa --help

Advantages:

  • ✅ Always uses the latest version
  • ✅ No disk space used for storage
  • ✅ Perfect for CI/CD environments
  • ✅ Works immediately on any machine with Node.js

Use this method if:

  • You want to try RocketQA quickly
  • You’re using RocketQA in CI/CD pipelines
  • You want automatic updates

Install RocketQA globally for faster repeated use:

Terminal window
# Install globally
npm install -g rocketqa
# Verify installation
rocketqa --version

Advantages:

  • ✅ Faster startup (no download time)
  • ✅ Works offline after installation
  • ✅ Consistent version across sessions

Use this method if:

  • You use RocketQA frequently
  • You work in environments with slow internet
  • You prefer consistent tool versions

Add RocketQA as a dependency in your project:

Terminal window
# Navigate to your project
cd your-project
# Install as dev dependency
npm install --save-dev rocketqa
# Or using yarn
yarn add --dev rocketqa
# Or using pnpm
pnpm add --save-dev rocketqa

Then run using npm scripts or npx:

Terminal window
# Via npx (works with local installation)
npx rocketqa test
# Or add to package.json scripts
# "test:e2e": "rocketqa test"
npm run test:e2e

Advantages:

  • ✅ Version locked for your project
  • ✅ Included in project dependencies
  • ✅ Perfect for team collaboration

Use this method if:

  • You’re integrating RocketQA into an existing project
  • You need version consistency across your team
  • You want RocketQA as part of your project’s toolchain

RocketQA uses Playwright for browser automation. Install browser dependencies:

Use RocketQA’s built-in install command:

Terminal window
# This installs all necessary browsers and dependencies
npx rocketqa install

This command will:

  • Install Chromium, Firefox, and WebKit browsers
  • Download browser dependencies
  • Set up proper permissions
  • Configure system requirements

If you prefer to manage Playwright separately:

Terminal window
# Install Playwright browsers manually
npx playwright install
# Install system dependencies (Linux only)
npx playwright install-deps

Let’s verify that everything is installed correctly:

Terminal window
# Check RocketQA version and help
npx rocketqa --version
npx rocketqa --help

You should see output similar to:

rocketqa 0.0.0
🚀 RocketQA - Simplifies and speeds up writing tests using natural language and running them.
Terminal window
# Create a quick test project
mkdir rocketqa-test && cd rocketqa-test
# Initialize RocketQA project
npx rocketqa init
# Follow the prompts (use default project name)
# Run the example test
npx rocketqa test

If everything is working correctly, you should see:

  • Test execution starting
  • Browser opening (if not in headless mode)
  • Test results in the console
  • HTML report generated in reports/
Terminal window
# List all available testing steps
npx rocketqa steps --format table

This should display a comprehensive list of all available Given, When, and Then steps.

Error: RocketQA requires Node.js 20 or higher

Solution: Follow the Node.js installation steps above to upgrade to version 20+.

Error: Browser downloads fail or time out

Solutions:

Terminal window
# Try with different mirror
PLAYWRIGHT_DOWNLOAD_HOST=https://mirrors.huaweicloud.com npx playwright install
# Or set proxy if behind corporate firewall
HTTPS_PROXY=http://proxy.company.com:8080 npx playwright install
# For Linux, install system dependencies first
sudo npx playwright install-deps

Error: Permission denied when running commands

Solutions:

Terminal window
# macOS/Linux: Fix npm permissions
sudo chown -R $(whoami) ~/.npm
# Or use a Node version manager instead of system Node.js
# Windows: Run PowerShell as Administrator

Error: command not found: rocketqa

Solutions:

  • Use npx rocketqa instead of rocketqa
  • If globally installed, check npm list -g rocketqa
  • Verify your PATH includes npm’s global bin directory

🎉 Success! You’re now ready to create your first RocketQA project. Let’s move on to Create Project!