{"id":25049474,"url":"https://github.com/dipjyotimetia/friday","last_synced_at":"2025-04-14T05:35:21.065Z","repository":{"id":271079071,"uuid":"911051782","full_name":"dipjyotimetia/friday","owner":"dipjyotimetia","description":"[WIP]  AI testing agent","archived":false,"fork":false,"pushed_at":"2025-04-12T23:42:07.000Z","size":4916,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:24:44.876Z","etag":null,"topics":["genai","generative-ai","largelanguagemodel","llm","python","testcase-generator","testing-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dipjyotimetia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-02T06:12:30.000Z","updated_at":"2025-04-12T23:42:04.000Z","dependencies_parsed_at":"2025-01-27T09:24:26.174Z","dependency_job_id":"527e8eda-a11e-4564-b807-31fcc2d6c0f3","html_url":"https://github.com/dipjyotimetia/friday","commit_stats":null,"previous_names":["dipjyotimetia/friday"],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipjyotimetia%2Ffriday","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipjyotimetia%2Ffriday/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipjyotimetia%2Ffriday/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipjyotimetia%2Ffriday/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dipjyotimetia","download_url":"https://codeload.github.com/dipjyotimetia/friday/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650618,"owners_count":21139665,"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":["genai","generative-ai","largelanguagemodel","llm","python","testcase-generator","testing-tool"],"created_at":"2025-02-06T08:19:24.346Z","updated_at":"2025-04-14T05:35:21.048Z","avatar_url":"https://github.com/dipjyotimetia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FRIDAY - AI Test Agent\n\nAn AI-powered test agent that uses Generative AI and LangChain to automatically create test cases from Jira/GitHub issues and execute API tests, for a streamlined testing experience.\n\n- **Web Application**: React-based UI running on port 3000 for visual interaction\n- **CLI Application**: Command-line tool for quick test case generation and web crawling\n- **REST API**: FastAPI service running on port 8080 for system integration\n\n[![License](https://img.shields.io/badge/license-MIT-orange.svg)](https://opensource.org/licenses/MIT)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/friday.png\" alt=\"Friday Logo\" width=\"700\"\u003e\n\u003c/p\u003e\n\n## ✨ Key Features\n\n-   **AI-Powered Test Case Generation:** Leverage Google Gemini, OpenAI or mistral to generate test cases.\n-   **Requirement Extraction:** Automatically extract requirements from Jira tickets or GitHub issues.\n-   **Contextual Integration:** Incorporate relevant context from Confluence pages.\n-   **LangChain Processing:** Utilize LangChain for advanced prompt engineering.\n-   **Vectorized Storage:** Store and search documents efficiently using ChromaDB vectorization.\n-   **Flexible Export:** Export test cases in JSON or Markdown format.\n-   **Web Crawling:** Enhance context by creating embeddings using a web crawler.\n-   **API Testing:** Execute API tests using OpenAPI specifications.\n\n## ⚙️ Setup\n\n### Prerequisites\n\n-   Python 3.12+\n-   Gemini enabled or OpenAI API key \n-   Jira/GitHub and Confluence access credentials\n\n### Installation\n\n1.  **Install via Homebrew:**\n\n    ```bash\n    brew tap dipjyotimetia/friday\n    brew install friday\n    ```\n\n2.  **Run setup:**\n\n    ```bash\n    friday setup\n    ```\n\n## ⚡️ Usage\n\n### CLI Application\n\n```bash\n# From Jira\nfriday generate --jira-key PROJ-123 --confluence-id 12345 -o test_cases.md\n\n# From GitHub\nfriday generate --gh-issue 456 --gh-repo owner/repo --confluence-id 12345 -o test_cases.md\n\n# Crawl single domain\nfriday crawl https://example.com --provider openai --persist-dir ./my_data/chroma --max-pages 5\n\n# Crawl multiple domains\nfriday crawl https://example.com --provider openai --persist-dir ./my_data/chroma --max-pages 10 --same-domain false\n\nfriday --help          # Show all commands\nfriday version         # Display version\nfriday generate --help # Show generation options\nfriday crawl --help    # Show crawling options\n```\n\n### REST API\n\n```bash\nuvicorn friday.api.app:app --reload --port 8080\n\n# Generate test cases\ncurl -X POST http://localhost:8080/api/v1/generate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jira_key\": \"PROJ-123\",\n    \"confluence_id\": \"12345\",\n    \"output\": \"test_cases.md\"\n  }'\n\n# Run API tests\ncurl -X POST \"http://localhost:8000/api/v1/testapi\" \\\n  -H \"Content-Type: multipart/form-data\" \\\n  -F \"base_url=https://petstore.swagger.io/v2/pet\" \\\n  -F \"spec_upload=@./docs/specs/petstore.yaml\" \\\n  -F \"output=report.md\"\n```\n\n### Web Application\n\n```bash\ncd friday/app\nnpm install\nnpm start\n\nOpen http://localhost:3000 in your browser\n\n* Generate test cases from Jira/GitHub issues\n* Execute API tests with OpenAPI specifications\n* Crawl websites for additional context\n* View real-time test execution logs\n```\n\n## 🛠️ Development\n\n1.  **Clone and setup:**\n\n    ```bash\n    git clone https://github.com/dipjyotimetia/friday.git\n    cd friday\n    chmod +x prerequisites.sh\n    ./prerequisites.sh\n    ```\n\n2.  **Configure environment:**\n\n    ```bash\n    cp .env.example .env\n    # Add your credentials to .env\n    ```\n\n3.  **Run Tests:**\n\n    ```bash\n    poetry run pytest tests/ -v\n    ```\n\n4.  **Format Code:**\n\n    ```bash\n    poetry run ruff format\n    ```\n\n5.  **Deploy to Google Cloud:**\n\n    ```bash\n    chmod +x deploy.sh\n    PROJECT_ID=\"your-project\" REGION=\"us-west1\" ./deploy.sh\n    ```\n\n## 🐳 Development Container Setup\n\nThis project uses Visual Studio Code's Development Containers feature, providing a consistent development environment via Docker.\n\n### Prerequisites\n\n1.  [Visual Studio Code](https://code.visualstudio.com/)\n2.  [Docker Desktop](https://www.docker.com/products/docker-desktop)\n3.  [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)\n\n### Features\n\n-   Python 3.12 with Poetry package management\n-   Node.js 22 with npm\n-   Docker-in-Docker support\n-   Pre-configured VS Code extensions:\n    -   Python and Pylance\n    -   ESLint\n    -   Prettier\n    -   Docker\n    -   Ruff (Python linter)\n\n### Environment Variables\n\nRequired environment variables (set these before opening the dev container):\n\n```sh\nGOOGLE_CLOUD_PROJECT\nGOOGLE_CLOUD_REGION\nGITHUB_ACCESS_TOKEN\nGITHUB_USERNAME\nJIRA_URL\nJIRA_USERNAME\nJIRA_API_TOKEN\nCONFLUENCE_URL\nCONFLUENCE_USERNAME\nCONFLUENCE_API_TOKEN\nOPENAI_API_KEY\nGOOGLE_API_KEY\n```\n\n### Services\n\nThe development environment includes three services:\n\n-   `workspace`: Main development container\n-   `api`: FastAPI backend service (port 8080)\n-   app: Frontend application (port 3000)\n\n### Getting Started\n\n1.  Clone the repository\n2.  Copy .env.example to .env and fill in your credentials\n3.  Open in VS Code\n4.  Click \"Reopen in Container\" when prompted\n5.  The container will build and install all dependencies automatically\n\n## 🗺️ Sequence Diagram\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand Sequence diagram\u003c/summary\u003e\n\n```mermaid\n%%{init: {\n    'theme': 'base',\n    'themeVariables': {\n        'primaryColor': '#1a1a1a',\n        'primaryTextColor': '#fff',\n        'primaryBorderColor': '#4285f4',\n        'lineColor': '#4285f4',\n        'secondaryColor': '#2d2d2d',\n        'tertiaryColor': '#2d2d2d',\n        'actorBkg': '#4285f4',\n        'actorTextColor': '#fff',\n        'actorLineColor': '#4285f4',\n        'signalColor': '#6c757d',\n        'signalTextColor': '#fff',\n        'labelBoxBkgColor': '#2d2d2d',\n        'labelBoxBorderColor': '#4285f4',\n        'labelTextColor': '#fff',\n        'loopTextColor': '#fff',\n        'noteBorderColor': '#43a047',\n        'noteBkgColor': '#43a047',\n        'noteTextColor': '#fff',\n        'activationBorderColor': '#4285f4',\n        'activationBkgColor': '#2d2d2d',\n        'sequenceNumberColor': '#fff'\n    }\n}}%%\n\nsequenceDiagram\n    box rgba(66, 133, 244, 0.1) External Components\n    participant User\n    end\n    \n    box rgba(66, 133, 244, 0.1) Core System\n    participant Main\n    participant IssueConnector\n    participant JiraConnector\n    participant GitHubConnector\n    participant ConfluenceConnector\n    participant TestCaseGenerator\n    participant PromptBuilder\n    end\n\n    Note over User,PromptBuilder: Test Case Generation Flow\n\n    User-\u003e\u003e+Main: Run main.py with issue-key/number\u003cbr/\u003eand confluence-id\n    \n    alt Jira Issue\n        rect rgba(67, 160, 71, 0.1)\n            Main-\u003e\u003e+IssueConnector: Get issue details\n            IssueConnector-\u003e\u003e+JiraConnector: Fetch Jira issue\n            JiraConnector--\u003e\u003e-IssueConnector: Return issue details\n            IssueConnector--\u003e\u003e-Main: Return issue details\n            Main-\u003e\u003e+IssueConnector: Extract acceptance criteria\n            IssueConnector-\u003e\u003eJiraConnector: Extract from Jira\n            JiraConnector--\u003e\u003eIssueConnector: Return criteria\n            IssueConnector--\u003e\u003e-Main: Return acceptance criteria\n        end\n    else GitHub Issue\n        rect rgba(67, 160, 71, 0.1)\n            Main-\u003e\u003e+IssueConnector: Get issue details\n            IssueConnector-\u003e\u003e+GitHubConnector: Fetch GitHub issue\n            GitHubConnector--\u003e\u003e-IssueConnector: Return issue details\n            IssueConnector--\u003e\u003e-Main: Return issue details\n            Main-\u003e\u003e+IssueConnector: Extract acceptance criteria\n            IssueConnector-\u003e\u003eGitHubConnector: Extract from GitHub\n            GitHubConnector--\u003e\u003eIssueConnector: Return criteria\n            IssueConnector--\u003e\u003e-Main: Return acceptance criteria\n        end\n    end\n    \n    rect rgba(255, 152, 0, 0.1)\n        Main-\u003e\u003e+ConfluenceConnector: Fetch Confluence\u003cbr/\u003epage content\n        ConfluenceConnector--\u003e\u003e-Main: Return page content\n    end\n    \n    rect rgba(66, 133, 244, 0.1)\n        Main-\u003e\u003e+PromptBuilder: Build prompt with details\n        PromptBuilder--\u003e\u003e-Main: Return prompt\n        Main-\u003e\u003e+TestCaseGenerator: Generate test cases\n        TestCaseGenerator--\u003e\u003e-Main: Return test cases\n    end\n    \n    Main-\u003e\u003e-User: Save test cases to\u003cbr/\u003eoutput file\n\n    Note over User,PromptBuilder: Process Complete\n```\n\n\u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipjyotimetia%2Ffriday","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipjyotimetia%2Ffriday","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipjyotimetia%2Ffriday/lists"}