Azure OpenAI Test Case Generator 🎯

A powerful Visual Studio Code extension that revolutionizes your testing workflow by generating intelligent test cases from both Azure DevOps work items and Swagger/OpenAPI specifications using Azure OpenAI.
🌟 What Makes This Extension Special?
Transform your manual testing approach with AI-powered test case generation that understands context, identifies gaps, and creates comprehensive test coverage. Say goodbye to repetitive test case writing and hello to intelligent, automated test generation!
✨ Key Features
🎯 Dual Testing Powerhouse
- Azure DevOps Integration: Deep integration for work item analysis and test case generation
- Swagger API Testing: Comprehensive test case generation from API specifications
- Unified Experience: Single extension, two powerful testing workflows
🔍 Azure DevOps - Smart Test Coverage Analysis
- AI Coverage Assessment: Intelligent analysis of existing test cases with 0-100% coverage scores
- Gap Detection: Automatically identifies missing test scenarios using advanced AI analysis
- Risk Evaluation: Smart risk assessment (Low/Medium/High) based on coverage analysis
- Visual Dashboard: Beautiful, interactive coverage metrics and analytics
- Scenario Mapping: Clear breakdown of covered vs missing test areas
- Robust Fallback: Heuristic-based analysis when AI services are unavailable
🌐 Swagger API - Comprehensive Test Generation
- Universal URL Support: Works with any Swagger/OpenAPI specification URL
- Direct spec URLs (JSON/YAML)
- Swagger Editor links
- Swagger UI pages
- SwaggerHub specifications
- Smart Endpoint Discovery: Automatic extraction of all API endpoints with detailed metadata
- Interactive Selection: Choose specific endpoints for focused test generation
- Comprehensive Test Scenarios:
- ✅ Happy path scenarios with realistic sample data
- ⚠️ Error scenarios with proper validation testing
- 🎯 Edge cases and boundary value testing
- 🔐 Authentication and authorization scenarios
- Professional Output: Clean HTML tables with structured test documentation
- Fallback Analysis: Robust heuristic-based analysis when AI services are unavailable
🤖 AI-Powered Intelligence
- Azure OpenAI Integration: Powered by GPT-4 and GPT-3.5-turbo for intelligent test generation
- Context-Aware Analysis: Understands business logic and generates relevant scenarios
- Smart Gap Detection: AI identifies missing test coverage areas automatically
- Quality-Focused Generation: Produces 6-10 high-quality, focused test cases per endpoint
🎨 Export & Integration
- Multiple Export Formats: Export test cases in CSV and Excel formats
- Professional Formatting: Clean, structured test case documentation
- Easy Integration: Copy test cases to your preferred test management tools
- Azure DevOps Integration: Direct creation of test cases in Azure DevOps
🛡️ Enterprise-Ready Features
- Secure Configuration: Safe storage of credentials and API keys in VS Code settings
- Error Handling: Intelligent error recovery with helpful guidance
- Performance Optimized: Smart caching and efficient API usage
- Cross-Platform: Works on Windows, macOS, and Linux
🚀 Getting Started
⚡ Quick Installation
From VS Code Marketplace:
- Open VS Code → Extensions (
Ctrl+Shift+X
)
- Search for "Azure OpenAI Test Case Generator"
- Click "Install"
Or install via Command Line:
code --install-extension SoftwareTestingJournal.ai-test-case-generator
🔧 Initial Setup
For Azure DevOps Testing:
- Open Command Palette (
Ctrl+Shift+P
)
- Run:
Azure OpenAI Test Case Generator: Configure Settings
- Enter your configuration:
- Azure DevOps URL:
https://dev.azure.com/yourorg
- Project Name: Your project name
- Personal Access Token: Create from Azure DevOps → User Settings → Personal Access Tokens
- Azure OpenAI Endpoint: Your Azure OpenAI service URL
- API Key: Your Azure OpenAI API key
- Model Name:
gpt-4
or gpt-35-turbo
For Swagger API Testing:
- Just configure Azure OpenAI settings (same as above)
- No Azure DevOps configuration needed for Swagger testing!
📖 How to Use
🎯 Azure DevOps Test Case Generation
- Open Command Palette (
Ctrl+Shift+P
)
- Run:
Azure OpenAI Test Case Generator: Generate Test Cases
- Select:
Azure OpenAI Test Case Generator: Azure DevOps Analysis
- Enter Work Item ID (e.g.,
12345
)
- View Coverage Analysis in the interactive dashboard
- Generate Missing Test Cases with one click
- Export Results in CSV or Excel format
🌐 Swagger API Test Case Generation
- Open Command Palette (
Ctrl+Shift+P
)
- Run:
Azure OpenAI Test Case Generator: Generate Test Cases
- Select:
Azure OpenAI Test Case Generator: Swagger API Testing
- Enter Swagger URL (any format supported):
https://api.example.com/swagger.json
https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml
https://app.swaggerhub.com/apis/username/api-name/1.0.0
- Select Endpoints for test generation
- Review Generated Test Cases in beautiful HTML format
- Export as CSV/Excel for your test management tools
📋 Requirements
- VS Code: Version 1.103.0 or higher
- Azure OpenAI Service with a deployed model (GPT-4 or GPT-3.5-turbo recommended)
- Azure DevOps Organization with appropriate permissions (for Azure DevOps mode only)
💡 Example Workflows
🎯 Azure DevOps Example
1. Open Command Palette (Ctrl+Shift+P)
2. Type: "Azure OpenAI Test Case Generator"
3. Select: "Azure OpenAI Test Case Generator: Generate Test Cases"
4. Choose: "Azure OpenAI Test Case Generator: Azure DevOps Analysis"
4. Enter Work Item ID: 12345
5. View coverage analysis dashboard
6. Click "Generate Missing Test Cases"
7. Export as CSV/Excel or create in Azure DevOps
🌐 Swagger API Example
1. Open Command Palette (Ctrl+Shift+P)
2. Type: "Azure OpenAI Test Case Generator"
3. Select: "Azure OpenAI Test Case Generator: Generate Test Cases"
4. Choose: "Azure OpenAI Test Case Generator: Swagger API Testing"
4. Enter URL: https://petstore.swagger.io/v2/swagger.json
5. Select endpoint: POST /pet
6. Review comprehensive test cases
7. Export for your test management tool
🔧 Configuration
Required Settings
Setting |
Description |
Example |
Azure DevOps URL |
Your organization URL |
https://dev.azure.com/myorg |
Project Name |
Azure DevOps project |
MyProject |
Personal Access Token |
Azure DevOps PAT |
your-pat-here |
Azure OpenAI Endpoint |
OpenAI service URL |
https://myopenai.openai.azure.com/ |
API Key |
Azure OpenAI key |
your-api-key |
Model Name |
Deployment name |
gpt-4 |
Note: For Swagger-only usage, you only need Azure OpenAI settings!
🎯 What's Generated?
Test Case Quality
- 6-10 focused test cases per endpoint (quality over quantity)
- Realistic scenarios based on actual API schema
- Professional formatting ready for documentation
Test Coverage Areas
- ✅ Happy Path: Valid requests with sample data
- ⚠️ Error Scenarios: Invalid inputs and proper error handling
- 🎯 Edge Cases: Boundary testing and special conditions
- 🔐 Security: Authentication and authorization testing
🛠️ Available Commands
Main Commands
Azure OpenAI Test Case Generator: Generate Test Cases
- Choose Azure DevOps or Swagger mode
Azure OpenAI Test Case Generator: Configure Settings
- Set up your credentials and endpoints
Additional Commands (Right-click menu)
- Show Diagnostics
- Reset Settings
- Clear Cache
🆘 Troubleshooting
Issue |
Solution |
Authentication failed |
Check your PAT permissions |
Swagger URL error |
Try with direct JSON/YAML spec URL |
Empty test cases |
Verify Azure OpenAI endpoint and key |
Network timeout |
Check firewall/proxy settings |
� What's Next?
Future enhancements planned:
- Enhanced AI models support
- Advanced analytics and reporting
- Team collaboration features
- Integration with more ALM tools
- Custom test case templates
📄 License
This extension is licensed under the MIT License.
🎯 Ready to revolutionize your testing workflow? Install now and start generating intelligent test cases in minutes!
Built with: Visual Studio Code Extension API | Azure OpenAI | JavaScript (ES2022) | Node.js | Azure DevOps REST API | Swagger/OpenAPI