UNPKG

veriqa-test-advisor

Version:

AI-powered regression test case advisor CLI tool with integrated Manual QA support

84 lines (69 loc) 1.79 kB
# VeriQA Example Project This example shows how to set up VeriQA in your project. ## Quick Setup 1. **Install VeriQA:** ```bash npm install veriqa-test-advisor --save-dev ``` 2. **Add module tags to your tests:** ```javascript // tests/auth/login.spec.js // @module: auth const { test, expect } = require('@playwright/test'); test('Login with valid credentials @smoke', async ({ page }) => { await page.goto('/login'); await page.fill('#email', 'user@example.com'); await page.fill('#password', 'password123'); await page.click('#login-btn'); await expect(page.locator('text=Welcome')).toBeVisible(); }); ``` 3. **Run VeriQA:** ```bash # Get AI suggestions npx veriqa-test-advisor --ai # Run suggested tests npx veriqa-test-advisor --run --tag smoke ``` ## Project Structure ``` your-project/ ├── tests/ │ ├── auth/ │ │ ├── login.spec.js # @module: auth │ │ └── signup.spec.js # @module: auth │ └── product/ │ ├── search.spec.js # @module: product │ └── filters.spec.js # @module: product ├── .env └── package.json ``` ## Environment Variables (.env) ```env PERPLEXITY_API_KEY=your_api_key_here VERIQA_FRAMEWORK=playwright ``` ## Integration with CI/CD ### GitHub Actions ```yaml name: Smart Tests on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - run: npm ci - run: npx veriqa-test-advisor --run --tag smoke env: PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} ``` ### GitLab CI ```yaml test:smart: script: - npm ci - npx veriqa-test-advisor --ai --verbose - npx veriqa-test-advisor --run --tag regression ```