Metadata-Version: 2.4
Name: vassureai
Version: 0.1.1
Summary: AI-powered test automation framework for PDF-based test specifications
Author-email: Sukumar Kutagulla <sukumar@vassure.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://github.com/your-organization/vassureai
Project-URL: Documentation, https://vassureai.readthedocs.io/
Project-URL: Repository, https://github.com/your-organization/vassureai.git
Project-URL: Changelog, https://github.com/your-organization/vassureai/blob/main/CHANGELOG.md
Keywords: testing,automation,ai,pdf,browser
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: annotated-types==0.7.0
Requires-Dist: anthropic==0.50.0
Requires-Dist: anyio==4.9.0
Requires-Dist: backoff==2.2.1
Requires-Dist: beautifulsoup4==4.13.4
Requires-Dist: black==24.1.0
Requires-Dist: boto3==1.38.8
Requires-Dist: botocore==1.38.8
Requires-Dist: Brotli==1.1.0
Requires-Dist: browser-use==0.1.41
Requires-Dist: cachetools==5.5.2
Requires-Dist: certifi==2025.4.26
Requires-Dist: cffi==1.17.1
Requires-Dist: charset-normalizer==3.4.2
Requires-Dist: click==8.1.8
Requires-Dist: colorama==0.4.6
Requires-Dist: coverage==7.8.0
Requires-Dist: cssselect2==0.8.0
Requires-Dist: defusedxml==0.7.1
Requires-Dist: distro==1.9.0
Requires-Dist: execnet==2.1.1
Requires-Dist: faiss-cpu==1.11.0
Requires-Dist: filelock==3.18.0
Requires-Dist: filetype==1.2.0
Requires-Dist: flake8==7.0.0
Requires-Dist: fonttools==4.57.0
Requires-Dist: freetype-py==2.3.0
Requires-Dist: fsspec==2025.3.2
Requires-Dist: google-ai-generativelanguage==0.6.18
Requires-Dist: google-api-core==2.24.2
Requires-Dist: google-auth==2.39.0
Requires-Dist: googleapis-common-protos==1.70.0
Requires-Dist: greenlet==3.2.1
Requires-Dist: grpcio==1.71.0
Requires-Dist: grpcio-status==1.71.0
Requires-Dist: h11==0.16.0
Requires-Dist: h2==4.2.0
Requires-Dist: hpack==4.1.0
Requires-Dist: httpcore==1.0.9
Requires-Dist: httpx==0.28.1
Requires-Dist: huggingface-hub==0.30.2
Requires-Dist: hyperframe==6.1.0
Requires-Dist: idna==3.10
Requires-Dist: iniconfig==2.1.0
Requires-Dist: Jinja2==3.1.0
Requires-Dist: jiter==0.9.0
Requires-Dist: jmespath==1.0.1
Requires-Dist: joblib==1.5.0
Requires-Dist: jsonpatch==1.33
Requires-Dist: jsonpointer==3.0.0
Requires-Dist: langchain==0.3.22
Requires-Dist: langchain-anthropic==0.3.3
Requires-Dist: langchain-aws==0.2.19
Requires-Dist: langchain-core==0.3.49
Requires-Dist: langchain-deepseek==0.1.3
Requires-Dist: langchain-google-genai==2.1.2
Requires-Dist: langchain-ollama==0.3.0
Requires-Dist: langchain-openai==0.3.11
Requires-Dist: langchain-text-splitters==0.3.7
Requires-Dist: langsmith==0.3.42
Requires-Dist: Markdown==3.3
Requires-Dist: markdownify==1.1.0
Requires-Dist: MarkupSafe==3.0.2
Requires-Dist: mccabe==0.7.0
Requires-Dist: mem0ai==0.1.88
Requires-Dist: monotonic==1.6
Requires-Dist: mpmath==1.3.0
Requires-Dist: mypy==1.8.0
Requires-Dist: mypy_extensions==1.1.0
Requires-Dist: networkx==3.4.2
Requires-Dist: numpy==1.26.4
Requires-Dist: ollama==0.4.8
Requires-Dist: openai==1.77.0
Requires-Dist: orjson==3.10.18
Requires-Dist: packaging==24.2
Requires-Dist: pathspec==0.12.1
Requires-Dist: Pillow==10.0.0
Requires-Dist: platformdirs==4.3.7
Requires-Dist: playwright==1.52.0
Requires-Dist: plotly==5.18.0
Requires-Dist: pluggy==1.5.0
Requires-Dist: portalocker==2.10.1
Requires-Dist: posthog==3.25.0
Requires-Dist: proto-plus==1.26.1
Requires-Dist: protobuf==5.29.4
Requires-Dist: psutil==7.0.0
Requires-Dist: psycopg2-binary==2.9.10
Requires-Dist: pyasn1==0.6.1
Requires-Dist: pyasn1_modules==0.4.2
Requires-Dist: pycairo==1.28.0
Requires-Dist: pycodestyle==2.11.1
Requires-Dist: pycparser==2.22
Requires-Dist: pydantic==2.10.4
Requires-Dist: pydantic_core==2.27.2
Requires-Dist: pydyf==0.11.0
Requires-Dist: pyee==13.0.0
Requires-Dist: pyflakes==3.2.0
Requires-Dist: PyPDF2==3.0.0
Requires-Dist: pyperclip==1.9.0
Requires-Dist: pyphen==0.17.2
Requires-Dist: pytest==8.3.5
Requires-Dist: pytest-asyncio==0.26.0
Requires-Dist: pytest-cov==4.1.0
Requires-Dist: pytest-html==4.1.1
Requires-Dist: pytest-metadata==3.1.1
Requires-Dist: pytest-timeout==2.3.1
Requires-Dist: pytest-xdist==3.6.1
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: python-dotenv==1.0.1
Requires-Dist: pytz==2024.2
Requires-Dist: pywin32==310
Requires-Dist: PyYAML==6.0.2
Requires-Dist: qdrant-client==1.14.2
Requires-Dist: regex==2024.11.6
Requires-Dist: reportlab==4.0.0
Requires-Dist: requests==2.32.3
Requires-Dist: requests-toolbelt==1.0.0
Requires-Dist: rlPyCairo==0.3.0
Requires-Dist: rsa==4.9.1
Requires-Dist: s3transfer==0.12.0
Requires-Dist: safetensors==0.5.3
Requires-Dist: scikit-learn==1.6.1
Requires-Dist: scipy==1.15.2
Requires-Dist: screeninfo==0.8.1
Requires-Dist: sentence-transformers==4.1.0
Requires-Dist: six==1.17.0
Requires-Dist: sniffio==1.3.1
Requires-Dist: soupsieve==2.7
Requires-Dist: SQLAlchemy==2.0.40
Requires-Dist: sympy==1.14.0
Requires-Dist: tenacity==9.1.2
Requires-Dist: threadpoolctl==3.6.0
Requires-Dist: tiktoken==0.9.0
Requires-Dist: tinycss2==1.4.0
Requires-Dist: tinyhtml5==2.0.0
Requires-Dist: tokenizers==0.21.1
Requires-Dist: torch==2.7.0
Requires-Dist: tqdm==4.67.1
Requires-Dist: transformers==4.51.3
Requires-Dist: typing_extensions==4.13.2
Requires-Dist: urllib3==2.4.0
Requires-Dist: watchdog==3.0.0
Requires-Dist: weasyprint==65.1
Requires-Dist: webencodings==0.5.1
Requires-Dist: zopfli==0.2.3.post1
Requires-Dist: zstandard==0.23.0
Provides-Extra: dev
Requires-Dist: pytest==8.3.5; extra == "dev"
Requires-Dist: pytest-cov==4.1.0; extra == "dev"
Requires-Dist: black==24.1.0; extra == "dev"
Requires-Dist: isort==5.12.0; extra == "dev"
Requires-Dist: mypy==1.8.0; extra == "dev"
Requires-Dist: pylint==3.0.0; extra == "dev"

# VAssureAI Framework

VAssureAI is an intelligent test automation framework that transforms PDF-based test specifications into executable, AI-powered browser tests. It supports real-time test generation, versioning, and detailed reporting with screenshots, videos, and metrics.

---

## 1. Setup (Step-by-Step)
1. **Install the package:**
   ```bash
   pip install vassureai
   ```
2. **Initialize the framework:**
   ```bash
   vassure init
   ```
   - This creates all required folders and copies sample files (including README.html).
3. **Install dependencies (if not auto-installed):**
   ```bash
   pip install -r requirements.txt
   ```
4. **Configure environment:**
   - Copy `.env.example` to `.env` and set your API keys and config values.
5. **(Optional) Install PDF watcher as a service:**
   - Windows: `install_pdf_watcher.bat`
   - Linux: `./linux/install_service.sh`

---

## 2. How to Use (Developer Guide)
1. **Add PDF test specs:** Place your PDF files in the `input_pdfs/` folder.
2. **Auto-generate tests:** The watcher or CLI will process PDFs and generate test scripts in `tests/`.
3. **Run tests:**
   - **All tests:**
     ```bash
     python start_framework.py
     ```
   - **Specific test:**
     ```bash
     python start_framework.py --test <test_name>
     ```
   - **Parallel execution:**
     ```bash
     python start_framework.py --parallel --workers 4
     ```
   - **Switch AI provider:**
     ```bash
     python start_framework.py --provider openai
     ```
   - **Run via CLI:**
     ```bash
     python -m vassureai.cli.main run
     ```
   - **Watch PDFs via CLI:**
     ```bash
     python -m vassureai.cli.main watch
     ```
   - **Re-initialize project:**
     ```bash
     python -m vassureai.cli.main init
     ```
4. **View results:** Open HTML reports in the `reports/` folder, review logs and metrics.

---

## 3. High-Level Architecture
```mermaid
graph TD
    A[PDF Test Specs Parsing] -->|Auto-detect| B[PDF Watcher Parsing]
    B -->|Process| C[Test Generator Generation]
    C -->|Create| D[Test Scripts Generation]
    D -->|Execute| E[Test Runner Execution]
    E -->|Generate| F[Reports Logs Reporting]
    E -->|Collect| G[Metrics Reporting]
    E -->|Record| H[Screenshots Videos Reporting]
    F --> I[CI CD Pipeline Planned]
```
**Legend:**
- Parsing: PDF Test Specs, PDF Watcher
- Generation: Test Generator, Test Scripts
- Execution: Test Runner
- Reporting: Reports/Logs, Metrics, Screenshots/Videos
- CI/CD: CI CD Pipeline (Planned)

---

## 4. Workflow: From PDF to Results
```mermaid
graph LR
    A[PDF Ingestion] --> B[PDF Watcher]
    B --> C[PDF Parsing/AI Extraction]
    C --> D[Test Script Generation]
    D --> E[Test Registry Update]
    E --> F[Test Execution Engine]
    F --> G[AI-Driven Browser Automation]
    G --> H[Step-by-Step Execution]
    H --> I[Capture Screenshots/Videos]
    I --> J[Metrics & Logging]
    J --> K[HTML Report Generation]
    K --> L[User Review]
```
**Workflow Stages:**
- **PDF Ingestion:** Place a PDF in `input_pdfs/`.
- **PDF Watcher:** Detects new/changed PDFs (cross-platform).
- **PDF Parsing/AI Extraction:** Extracts test cases using direct parsing or LLMs.
- **Test Script Generation:** Generates/updates Python test scripts in `tests/`.
- **Test Registry Update:** Updates `test_registry.json` for traceability.
- **Test Execution Engine:** Runs tests using Playwright and browser-use.
- **AI-Driven Browser Automation:** AI agent executes test steps in the browser.
- **Step-by-Step Execution:** Each test step is executed, with verification and error handling.
- **Capture Screenshots/Videos:** Screenshots and video are captured at key steps and on errors.
- **Metrics & Logging:** All results, metrics, and logs are collected for reporting and analysis.
- **HTML Report Generation:** Interactive HTML reports are generated in `reports/`.
- **User Review:** Review results, screenshots, videos, and error analysis.

---

## 5. Key Components
- **PDFTestProcessor:** Extracts test cases from PDFs, uses LLMs if direct extraction fails.
- **TestScriptGenerator:** Generates/updates test scripts using Jinja2 templates.
- **BaseTest:** All tests inherit from this; manages execution, error handling, screenshots, and metrics.
- **AI Model Integration:** Supports Gemini, OpenAI, Anthropic via LangChain.
- **Browser Automation:** Uses Playwright and browser-use for intelligent, AI-driven browser control.
- **Metrics & Reporting:** Collects step-by-step results, screenshots, videos, and generates interactive HTML reports.

---

## 6. Troubleshooting & FAQs
- **PDF not detected:** Ensure file is in `input_pdfs/`, check permissions, restart watcher.
- **Test generation fails:** Check PDF format, verify API keys, review `logs/pdf_watcher.log`.
- **Test execution errors:** Ensure browser is installed, check network, review prerequisites.
- **Reports not generated:** Check `reports/` directory, review logs for errors.
- **How do I add a new test?** Place a new PDF in `input_pdfs/`.
- **How do I update a test?** Replace the PDF with a new version; the system auto-updates the script.
- **How do I run tests in parallel?** Use the CLI or batch script and select parallel execution.
- **Where are screenshots/videos?** In `reports/screenshots/` and `videos/`.
- **How do I switch AI providers?** Set the provider in `.env` (e.g., `DEFAULT_PROVIDER=openai`).

---

*For advanced usage and technical details, see `technicalguide.html`.*

<div align="right"><sub><sup>Author: Sukumar Kutagulla (Read-only) &nbsp; Designation: Test Automation Architect (Read-only)</sup></sub></div>
