AI-powered testing agent
Project description
FRIDAY - AI Test Agent
An 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.
- Web Application: React-based UI running on port 3000 for visual interaction
- CLI Application: Command-line tool for quick test case generation and web crawling
- REST API: FastAPI service running on port 8080 for system integration
✨ Key Features
- AI-Powered Test Case Generation: Leverage Google Gemini, OpenAI or mistral to generate test cases.
- Requirement Extraction: Automatically extract requirements from Jira tickets or GitHub issues.
- Contextual Integration: Incorporate relevant context from Confluence pages.
- LangChain Processing: Utilize LangChain for advanced prompt engineering.
- Vectorized Storage: Store and search documents efficiently using ChromaDB vectorization.
- Flexible Export: Export test cases in JSON or Markdown format.
- Web Crawling: Enhance context by creating embeddings using a web crawler.
- API Testing: Execute API tests using OpenAPI specifications.
⚙️ Setup
Prerequisites
- Python 3.12+
- Gemini enabled or OpenAI API key
- Jira/GitHub and Confluence access credentials
Installation
-
Install via Homebrew:
brew tap dipjyotimetia/friday brew install friday
-
Run setup:
friday setup
⚡️ Usage
CLI Application
# From Jira
friday generate --jira-key PROJ-123 --confluence-id 12345 -o test_cases.md
# From GitHub
friday generate --gh-issue 456 --gh-repo owner/repo --confluence-id 12345 -o test_cases.md
# Crawl single domain
friday crawl https://example.com --provider openai --persist-dir ./my_data/chroma --max-pages 5
# Crawl multiple domains
friday crawl https://example.com --provider openai --persist-dir ./my_data/chroma --max-pages 10 --same-domain false
friday --help # Show all commands
friday version # Display version
friday generate --help # Show generation options
friday crawl --help # Show crawling options
REST API
uvicorn friday.api.app:app --reload --port 8080
# Generate test cases
curl -X POST http://localhost:8080/api/v1/generate \
-H "Content-Type: application/json" \
-d '{
"jira_key": "PROJ-123",
"confluence_id": "12345",
"output": "test_cases.md"
}'
# Run API tests
curl -X POST "http://localhost:8000/api/v1/testapi" \
-H "Content-Type: multipart/form-data" \
-F "base_url=https://petstore.swagger.io/v2/pet" \
-F "spec_upload=@./docs/specs/petstore.yaml" \
-F "output=report.md"
Web Application
cd friday/app
npm install
npm start
Open http://localhost:3000 in your browser
* Generate test cases from Jira/GitHub issues
* Execute API tests with OpenAPI specifications
* Crawl websites for additional context
* View real-time test execution logs
🛠️ Development
-
Clone and setup:
git clone https://github.com/dipjyotimetia/friday.git cd friday chmod +x prerequisites.sh ./prerequisites.sh
-
Configure environment:
cp .env.example .env # Add your credentials to .env
-
Run Tests:
poetry run pytest tests/ -v
-
Format Code:
poetry run ruff format
-
Deploy to Google Cloud:
chmod +x deploy.sh PROJECT_ID="your-project" REGION="us-west1" ./deploy.sh
🐳 Development Container Setup
This project uses Visual Studio Code's Development Containers feature, providing a consistent development environment via Docker.
Prerequisites
Features
- Python 3.12 with Poetry package management
- Node.js 22 with npm
- Docker-in-Docker support
- Pre-configured VS Code extensions:
- Python and Pylance
- ESLint
- Prettier
- Docker
- Ruff (Python linter)
Environment Variables
Required environment variables (set these before opening the dev container):
GOOGLE_CLOUD_PROJECT
GOOGLE_CLOUD_REGION
GITHUB_ACCESS_TOKEN
GITHUB_USERNAME
JIRA_URL
JIRA_USERNAME
JIRA_API_TOKEN
CONFLUENCE_URL
CONFLUENCE_USERNAME
CONFLUENCE_API_TOKEN
OPENAI_API_KEY
GOOGLE_API_KEY
Services
The development environment includes three services:
workspace: Main development containerapi: FastAPI backend service (port 8080)- app: Frontend application (port 3000)
Getting Started
- Clone the repository
- Copy .env.example to .env and fill in your credentials
- Open in VS Code
- Click "Reopen in Container" when prompted
- The container will build and install all dependencies automatically
🗺️ Sequence Diagram
Expand Sequence diagram
%%{init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#1a1a1a',
'primaryTextColor': '#fff',
'primaryBorderColor': '#4285f4',
'lineColor': '#4285f4',
'secondaryColor': '#2d2d2d',
'tertiaryColor': '#2d2d2d',
'actorBkg': '#4285f4',
'actorTextColor': '#fff',
'actorLineColor': '#4285f4',
'signalColor': '#6c757d',
'signalTextColor': '#fff',
'labelBoxBkgColor': '#2d2d2d',
'labelBoxBorderColor': '#4285f4',
'labelTextColor': '#fff',
'loopTextColor': '#fff',
'noteBorderColor': '#43a047',
'noteBkgColor': '#43a047',
'noteTextColor': '#fff',
'activationBorderColor': '#4285f4',
'activationBkgColor': '#2d2d2d',
'sequenceNumberColor': '#fff'
}
}}%%
sequenceDiagram
box rgba(66, 133, 244, 0.1) External Components
participant User
end
box rgba(66, 133, 244, 0.1) Core System
participant Main
participant IssueConnector
participant JiraConnector
participant GitHubConnector
participant ConfluenceConnector
participant TestCaseGenerator
participant PromptBuilder
end
Note over User,PromptBuilder: Test Case Generation Flow
User->>+Main: Run main.py with issue-key/number<br/>and confluence-id
alt Jira Issue
rect rgba(67, 160, 71, 0.1)
Main->>+IssueConnector: Get issue details
IssueConnector->>+JiraConnector: Fetch Jira issue
JiraConnector-->>-IssueConnector: Return issue details
IssueConnector-->>-Main: Return issue details
Main->>+IssueConnector: Extract acceptance criteria
IssueConnector->>JiraConnector: Extract from Jira
JiraConnector-->>IssueConnector: Return criteria
IssueConnector-->>-Main: Return acceptance criteria
end
else GitHub Issue
rect rgba(67, 160, 71, 0.1)
Main->>+IssueConnector: Get issue details
IssueConnector->>+GitHubConnector: Fetch GitHub issue
GitHubConnector-->>-IssueConnector: Return issue details
IssueConnector-->>-Main: Return issue details
Main->>+IssueConnector: Extract acceptance criteria
IssueConnector->>GitHubConnector: Extract from GitHub
GitHubConnector-->>IssueConnector: Return criteria
IssueConnector-->>-Main: Return acceptance criteria
end
end
rect rgba(255, 152, 0, 0.1)
Main->>+ConfluenceConnector: Fetch Confluence<br/>page content
ConfluenceConnector-->>-Main: Return page content
end
rect rgba(66, 133, 244, 0.1)
Main->>+PromptBuilder: Build prompt with details
PromptBuilder-->>-Main: Return prompt
Main->>+TestCaseGenerator: Generate test cases
TestCaseGenerator-->>-Main: Return test cases
end
Main->>-User: Save test cases to<br/>output file
Note over User,PromptBuilder: Process Complete
Copyright (c) 2025 Dipjyoti Metia
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file friday_cli-0.1.46.tar.gz.
File metadata
- Download URL: friday_cli-0.1.46.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0a72aad584401e90d8b71042dcc79717687dbc8d57b23a2dba3068a5ebdbf5
|
|
| MD5 |
dbfd14d44ef4f396ecc4865c81da577a
|
|
| BLAKE2b-256 |
4ec76aefa745561e4d3a0584316cd5486a17d384c68d2d728d2b270c6909cb15
|
File details
Details for the file friday_cli-0.1.46-py3-none-any.whl.
File metadata
- Download URL: friday_cli-0.1.46-py3-none-any.whl
- Upload date:
- Size: 37.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f590fa343435b38633e5a330b2038a8671d97bb78075b0440eef5fefcd2fc84
|
|
| MD5 |
afdb947d823efebc6ce7c19009c70a73
|
|
| BLAKE2b-256 |
59e4670e9a5d8dea42aafcce4cd75e270c4dc6a6864dd89c18b3e6dcd86743ef
|