Metadata-Version: 2.4
Name: nextog-cli
Version: 1.0.0
Summary: nextOG CLI - Full QA Testing Automation Tool for Web, Mobile, API & Embedded Systems
Author-email: nextOG Team <dev@nextog.io>
License: MIT
Project-URL: Homepage, https://github.com/WAH-ISHAN/NEXTOG_CLI
Project-URL: Repository, https://github.com/WAH-ISHAN/NEXTOG_CLI.git
Project-URL: Documentation, https://github.com/WAH-ISHAN/NEXTOG_CLI#readme
Project-URL: Bug Tracker, https://github.com/WAH-ISHAN/NEXTOG_CLI/issues
Keywords: testing,qa,automation,cli,web-testing,mobile-testing,api-testing
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: typer[all]>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: playwright>=1.40.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: cryptography>=41.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: fastapi>=0.104.0
Requires-Dist: uvicorn>=0.24.0
Requires-Dist: websockets>=12.0
Requires-Dist: click>=8.1.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: halo>=0.0.31
Requires-Dist: tqdm>=4.66.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pytest>=7.4.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: psutil>=5.9.0
Provides-Extra: mobile
Requires-Dist: Appium-Python-Client>=3.0.0; extra == "mobile"
Provides-Extra: all
Requires-Dist: nextog-cli[mobile]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"

# 🚀 nextOG CLI

**Full QA Testing Automation CLI Tool**

> Web Apps • Mobile Apps • Embedded Systems • Web Systems — All-in-One Testing

![Version](https://img.shields.io/badge/version-1.0.0-blue)
![Python](https://img.shields.io/badge/python-3.9+-green)
![License](https://img.shields.io/badge/license-MIT-yellow)

---

## ✨ Features

- 🌐 **Web Testing** — Playwright-based: responsive, accessibility, cross-browser, performance
- 📱 **Mobile Testing** — Appium-based: Android, iOS, cross-platform
- 🔌 **API Testing** — REST, GraphQL, WebSocket testing with OpenAPI spec support
- 🔧 **Embedded Systems** — MQTT, CoAP, HTTP, Serial protocol testing
- 🛡️ **Security Testing** — SSL, headers, SQL injection, XSS, CORS checks
- 📊 **Live Dashboard** — Real-time testing panel with WebSocket updates
- 📑 **Auto Excel Reports** — Industrial Excel reports auto-generated after EVERY test (10 sheets)
- 🧠 **Auto-Training** — Learns from your usage patterns to optimize testing
- 🔐 **Privacy-First** — ALL data stays local, encrypted, zero external transfer
- 📈 **Coverage Tracking** — Track progress from 0% → 90% automated coverage
- 👥 **User Permissions** — Role-based access: admin, tester, viewer, CI

---

## 🚀 Installation

```bash
# Install from source
cd nextog-cli
pip install -e .

# Install with mobile support
pip install -e ".[mobile]"

# Install Playwright browsers
playwright install

# Verify installation
nextog --version
```

---

## 📖 Quick Start

### Initialize a Project

```bash
# Create a new full-stack testing project
nextog init my-project --template full

# Web-only project
nextog my-web-app --template web

# API-only project
nextog my-api --template api
```

### Run Tests

```bash
# Web testing
nextog test web --url https://example.com --browser chromium --responsive --accessibility

# Mobile testing
nextog test mobile --app ./myapp.apk --platform android

# API testing
nextog test api --spec ./openapi.yaml --base-url https://api.example.com

# Embedded systems
nextog test embedded --target 192.168.1.100 --protocol mqtt

# Run all tests
nextog test all --coverage-target 90
```

### Live Dashboard

```bash
# Start real-time testing dashboard
nextog live --port 8080
```

### View Coverage

```bash
# Show coverage table
nextog coverage

# Generate HTML report
nextog coverage --report --format html

# Generate JSON report
nextog coverage --report --format json
```

### Generate Industrial Excel Reports

```bash
# Reports auto-generate after EVERY test run!
nextog test web --url https://example.com   # → Excel report auto-created
nextog test mobile --app ./app.apk           # → Excel report auto-created
nextog test api --spec ./openapi.yaml        # → Excel report auto-created

# Generate report manually from last test
nextog report

# Generate for specific test type
nextog report --type web
nextog report --type api
nextog report --type mobile
nextog report --type embedded
nextog report --type full

# Custom output path
nextog report --output ./my-report.xlsx
```

**Each Excel Report Contains 10 Industrial Sheets:**
1. 📋 Executive Summary — Key metrics, overall status, risk level, recommendations
2. 📝 Test Details — Every test case with ID, status, expected/actual results
3. 📊 Coverage Analysis — Phase-wise coverage (0% → 90%), element coverage matrix
4. 🔍 Elements & Components — All detected elements with purpose & test status
5. 🐛 Defect Log — All found defects with severity, priority, steps to reproduce
6. ⚡ Performance Metrics — Duration, throughput, response times, benchmarks
7. 📈 Charts & Graphs — Pie charts (pass/fail), Bar charts (coverage by phase)
8. 💡 Recommendations — Action items prioritized by effort & impact
9. 🖥️ Test Environment — System info, OS, RAM, CPU, tool versions
10. ✍️ Sign-Off Sheet — Approval section for QA Lead, Dev Lead, PM, Release Manager

### Detect Elements

```bash
# Detect and explain all elements on a page
nextog elements https://example.com --explain

# Save elements to file
nextog elements https://example.com --output elements.json
```

---

## 👥 User Management

```bash
# Create users with roles
nextog user create john --role admin
nextog user create jane --role tester
nextog user create viewer1 --role viewer

# List users
nextog user list

# Change role
nextog user role john tester
```

### Permission Levels

| Role | Tests | Reports | Users | Config | Data |
|------|-------|---------|-------|--------|------|
| admin | ✅ All | ✅ | ✅ Manage | ✅ | ✅ |
| tester | ✅ Run/Create | ✅ | ❌ | ❌ | ✅ Export |
| viewer | ❌ | ✅ View | ❌ | ❌ | ✅ View |
| ci | ✅ Run | ✅ | ❌ | ❌ | ❌ |

---

## 🧠 Auto-Training

nextOG automatically learns from your testing patterns:

```bash
# Check training status
nextog train --action status

# Start training cycle
nextog train --action start --iterations 100

# Optimize test suite
nextog train --action optimize
```

**What it learns:**
- Which tests fail most often → runs them first (fail-fast)
- Common error patterns → suggests fixes
- User workflows → optimizes test order
- Coverage gaps → suggests new tests

---

## 🔐 Privacy Architecture

**nextOG is 100% privacy-first:**

- ✅ All data stored locally (SQLite + AES encryption)
- ✅ Zero external API calls for user data
- ✅ No telemetry, no analytics, no cloud sync
- ✅ User can export/delete all data anytime
- ✅ Data integrity verification built-in

```bash
# View storage stats
nextog data stats

# Export all data (encrypted)
nextog data export --output backup.json --encrypt

# Purge all data permanently
nextog data purge --yes
```

---

## 📊 Coverage Tracking

Testing progresses through 5 phases:

| Phase | Coverage | Tests |
|-------|----------|-------|
| 🔥 Smoke | 0% - 20% | Basic element detection, page loads |
| ⚡ Functional | 20% - 40% | Forms, navigation, API validation |
| 🔗 Integration | 40% - 60% | Cross-component, edge cases |
| 🛡️ Performance | 60% - 80% | Load, stress, security tests |
| 🎯 Advanced | 80% - 90% | Regression, advanced scenarios |

---

## 📁 Project Structure

```
nextog-cli/
├── nextog/
│   ├── cli.py              # CLI entry point (Typer)
│   ├── core/
│   │   ├── engine.py       # Core testing engine
│   │   ├── runner.py       # Test runner & initializer
│   │   ├── reporter.py     # Coverage reporting
│   │   ├── permissions.py  # RBAC permissions
│   │   └── privacy.py      # Privacy engine
│   ├── engines/
│   │   ├── web/            # Web testing (Playwright)
│   │   ├── mobile/         # Mobile testing (Appium)
│   │   ├── api/            # API testing (httpx)
│   │   ├── embedded/       # Embedded systems (MQTT/CoAP)
│   │   └── system/         # Performance & security
│   ├── training/           # Auto-learning engine
│   ├── data/               # Local database & sync
│   ├── live/               # Live dashboard (FastAPI)
│   ├── config/             # Settings management
│   └── utils/              # Helpers & validators
├── pyproject.toml          # Package configuration
└── README.md
```

---

## 🛠️ Development

```bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Format code
black nextog/
ruff check nextog/

# Type check
mypy nextog/
```

---

## 📄 License

MIT License - See LICENSE file for details.

---

**Built with ❤️ for comprehensive QA automation**
