{"id":28705499,"url":"https://github.com/devmaverickmb/qa_doc","last_synced_at":"2025-07-26T13:37:14.505Z","repository":{"id":292104972,"uuid":"976580876","full_name":"DevMaverickMB/QA_doc","owner":"DevMaverickMB","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-08T06:27:19.000Z","size":11864,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T07:29:03.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevMaverickMB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-02T11:14:36.000Z","updated_at":"2025-05-08T06:27:22.000Z","dependencies_parsed_at":"2025-05-08T07:39:18.321Z","dependency_job_id":null,"html_url":"https://github.com/DevMaverickMB/QA_doc","commit_stats":null,"previous_names":["devmaverickmb/qa_doc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DevMaverickMB/QA_doc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaverickMB%2FQA_doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaverickMB%2FQA_doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaverickMB%2FQA_doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaverickMB%2FQA_doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevMaverickMB","download_url":"https://codeload.github.com/DevMaverickMB/QA_doc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaverickMB%2FQA_doc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259830368,"owners_count":22918282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-14T14:31:05.500Z","updated_at":"2025-06-14T14:32:47.979Z","avatar_url":"https://github.com/DevMaverickMB.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Component Action Documentation Generator\n\nA specialized tool that automatically generates comprehensive component action documentation from codebases, making it easier for QA testers to understand and test applications effectively.\n\n## Features\n\n- **Component Action Documentation**: Create detailed mapping of UI components to their actions, effects, validation rules, and error scenarios\n- **Function Documentation**: Extract and document important functions, including parameters, return values, and dependencies\n- **UI Element Analysis**: Identify and document UI elements and their functionality\n- **Behavior Analysis**: Map out key system behaviors and the abstractions involved\n- **Dependency Tracking**: Document internal and external dependencies and their impact\n- **Visual Representation**: Generate Mermaid diagrams showing the connections between components and workflows\n- **CSV Export**: Extract test case tables from QA documentation to CSV files for easy import into test management tools\n- **Business Logic Extraction**: Extract and document business logic from SQL stored procedures to understand application functionality\n- **Combined Processing**: Process all three functionalities (component action, CSV extraction, business logic) sequentially with a single command\n- **Sequential Execution**: The combined flow processes each step in sequence - first component actions, then CSV extraction, and finally business logic extraction\n- **Error Handling**: Robust error handling with detailed error messages and stack traces in verbose mode\n- **Programmatic API**: Use the tool programmatically in your own Python applications\n\n## Usage\n\nFor component action documentation generation:\n```bash\npython main.py --repo https://github.com/username/repository\n```\n\nFor business logic extraction from stored procedures:\n```bash\npython main.py --repo https://github.com/username/repository --business-logic\n```\n\nFor combined processing of component actions, CSV extraction, and business logic:\n```bash\npython main.py --repo https://github.com/username/repository --combined\n```\n\nFor verbose output with detailed logging (helpful for troubleshooting):\n```bash\npython main.py --repo https://github.com/username/repository --combined --verbose\n```\n\nOr for local directories:\n\n```bash\npython main.py --dir /path/to/local/directory\n```\n\n### Programmatic Usage\n\nThe tool can also be used programmatically through the provided `run_agent.py` script:\n\n```bash\npython run_agent.py --input /path/to/source/code --output /path/to/output/directory\n```\n\nOr imported and used in your own Python code:\n\n```python\nfrom run_agent import run_agent\n\n# Run the agent on a source directory\ntry:\n    results = run_agent(\n        input_dir=\"/path/to/source/code\",\n        output_dir=\"/path/to/output\",\n        include_patterns=[\"*.py\", \"*.sql\", \"*.js\"],\n        exclude_patterns=[\"tests/*\", \"node_modules/*\"],\n        verbose=True  # Set to True for detailed logging\n    )\n\n    # Access the results\n    print(f\"Documentation generated at: {results.get('qa_document_path')}\")\n    print(f\"CSV file generated at: {results.get('csv_path')}\")\n    print(f\"Business logic document: {results.get('business_logic_document')}\")\nexcept Exception as e:\n    print(f\"Error running the agent: {e}\")\n```\n\n### Optional Arguments\n\n```\n--name          Project name (derived from repo/directory if not provided)\n--token         GitHub personal access token (reads from GITHUB_TOKEN env var if not provided)\n--output        Base directory for output (default: qa_docs)\n--max-size      Maximum file size in bytes (default: 100000, about 100KB)\n--include       Include file patterns (e.g., '*.py' '*.js')\n--exclude       Exclude file patterns (e.g., 'tests/*' 'docs/*')\n--csharp-web    Use C# web application specific patterns\n--csv           Extract test case tables to CSV files for easy import into test management tools\n--business-logic Extract business logic from SQL stored procedures\n--combined      Run all processing modes (component action, CSV extraction, and business logic) in one go\n--verbose, -v   Enable verbose output for debugging\n```\n\n## Output\n\nThe tool generates:\n\n1. **QA_Testing_Documentation.md**: Main document containing:\n   - Application overview\n   - System architecture\n   - Technology stack\n   - Component action mapping\n   - User interaction flows\n   - Acceptance criteria\n   - Error handling and edge cases\n   - Integration points\n   - State management\n   - Configuration dependencies\n\n2. **Component_Action_Reference.md**: Comprehensive action reference tables, including:\n   - Component inventory with detailed properties\n   - Trigger/event documentation\n   - Data elements\n   - Validation rules\n   - Error scenarios\n   - Test priority\n   - Expected performance metrics\n\n3. **Project_Business_Logic.md**: (When --business-logic or --combined is used) Business logic documentation including:\n   - Overview of the application's purpose\n   - Core business domains and their relationships\n   - Key business processes implemented in the database\n   - Business rules enforced through stored procedures\n   - Data flow through the application\n   - Business entities and their relationships\n\n4. **test_cases.csv**: (When --csv or --combined is used) CSV file containing extracted test cases for import into test management tools\n\n## Requirements\n\n- Python 3.6+\n- Google Gemini API key or other LLM provider API key (set in .env file)\n\n## Installation\n\n```bash\ngit clone https://github.com/username/repository.git\ncd repository\npip install -r requirements.txt\ncp .env.example .env\n# Edit .env with your API keys\n```\n\n## How It Works\n\nThe tool uses an efficient flow-based architecture:\n\n1. **Repository Analysis**: Fetches and analyzes the codebase structure\n2. **Sequential Processing**: When using combined mode, processes:\n   1. First, component action documentation \n   2. Then, CSV extraction\n   3. Finally, business logic extraction\n3. **LLM-Powered Analysis**: Utilizes LLMs to intelligently extract:\n   - Code abstractions and relationships\n   - Component actions and behaviors\n   - Business logic from stored procedures\n4. **Output Generation**: Creates detailed documentation in markdown format and CSV exports\n\n## Error Handling\n\nThe tool includes robust error handling:\n\n- Input validation to ensure directories exist\n- Exception catching with informative error messages\n- Stack trace output in verbose mode\n- Proper exit codes for CI/CD pipelines\n\n# Agent for QA\n\nAn AI-powered tool for generating QA testing documentation from code.\n\n## Features\n\n- Analyzes codebases to understand components, actions, and data elements\n- Automatically creates QA documentation including test cases and acceptance criteria\n- Exports test cases to CSV format for easy import into test management systems\n- Extracts business logic from stored procedures to understand database-level functionality\n- Customizable to various frameworks and project types\n- Template-driven approach for consistent documentation style\n- Combined mode for processing all documentation types at once\n\n## Installation\n\n1. Clone this repository\n2. Create a virtual environment: `python -m venv env`\n3. Activate the environment:\n   - Windows: `env\\Scripts\\activate`\n   - Mac/Linux: `source env/bin/activate`\n4. Install dependencies: `pip install -r requirements.txt`\n5. Copy `.env.example` to `.env` and set your API keys\n\n## Usage\n\n### Basic Usage\n\n```bash\npython main.py --repo \u003cgithub-repo-url\u003e\n```\n\nor for a local directory:\n\n```bash\npython main.py --dir \u003cpath-to-directory\u003e\n```\n\n### Combined Processing\n\nProcess component actions, CSV extraction, and business logic all at once:\n\n```bash\npython main.py --dir ./my-project --combined\n```\n\n### Verbose Mode\n\nEnable detailed logging for troubleshooting:\n\n```bash\npython main.py --dir ./my-project --combined --verbose\n```\n\n### Additional Options\n\n```bash\npython main.py --dir ./my-project \\\n  --name \"My Project Name\" \\\n  --output ./documentation \\\n  --include \"*.js\" \"*.jsx\" \"*.sql\" \\\n  --exclude \"node_modules/*\" \"tests/*\" \\\n  --max-size 200000 \\\n  --combined \\\n  --verbose\n```\n\n### Using Custom Templates\n\nThe QA documentation generation supports custom templates for consistent formatting:\n\n1. **Default Template**: The system includes a default template at `utils/qa_template.md`\n2. **Custom Template**: You can create your own template with the exact structure you want\n\nTo use a custom template:\n\n1. Create your markdown template file with the desired structure\n2. Place it at `utils/qa_template.md` to replace the default template\n3. Run the documentation generator as usual\n\nThe AI will follow the exact structure, headings, tables, and formatting of your template while filling in content specific to the analyzed code.\n\n## Output\n\nThe documentation is generated in markdown format and saved to the specified output directory (default: `./qa_docs`). \n\nWhen using the combined mode (--combined flag):\n- Component action documentation is generated\n- Test cases are exported to CSV for easy import into test management tools\n- Business logic documentation is generated from SQL stored procedures\n\nThis provides a comprehensive documentation suite covering both frontend and backend aspects of the application. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmaverickmb%2Fqa_doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmaverickmb%2Fqa_doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmaverickmb%2Fqa_doc/lists"}