Node.js (v14 or later)
Git (for initializing and managing repositories)
admin or sudo access for installations
Update package lists:
sudo apt update
Install Node.js and npm:
sudo apt install -y nodejs npm
Verify Node.js and npm installation:
node -v
npm -v
Install qapra globally:
sudo npm install -g qapra
Install Node.js and npm via DNF:
sudo dnf install -y nodejs npm
Verify Node.js and npm installation:
node -v
npm -v
Install qapra globally:
sudo npm install -g qapra
Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add Homebrew to your PATH:
Depending on your system (Apple Silicon or Intel Mac), add Homebrew to your path:
for Apple Silicon Macs (M1/M2/M3):
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
for Intel Macs (default Homebrew location):
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
After running the appropriate command, make sure to reload your .zshrc file:
source ~/.zshrc
Install Node.js using Homebrew:
brew install node
Verify Node.js and npm installation:
node -v
npm -v
Install qapra globally:
npm install -g qapra
Install Node.js and npm from the Node.js website
Download and install the LTS version:
Verify Node.js and npm installation:
Open Command Prompt and run:
node -v
npm -v
Install qapra globally:
npm install -g qapra
Navigate to the root directory of the project you want to test:
cd /path/to/your/git/repo
Initialize qapra and sign up:
Run the following command to start the setup process:
qapra init
This will guide you through:
signing up with your email and password
installing the qapra GitHub App
granting permissions to add the qapra agent as a collaborator on your repo
Commit unstaged changes:
After initializing, it’s important to commit any changes in your working directory, as qapra will generate test code in the next steps.
Start your backend server and database:
Ensure that your local backend server and database are running, as qapra will make changes to the database while generating tests.
Generate backend tests:
Run the following command to generate the test cases:
qapra gentests
This will analyze your codebase and create the necessary tests.
For any issues or questions with installation and using qapra please contact us.