ThinkTest AI is an intelligent WordPress plugin testing platform that automatically generates comprehensive test suites using advanced AI models. The platform supports both file uploads and GitHub repository integration for seamless testing workflows.
- AI-Powered Test Generation: Automatically generate comprehensive test suites for WordPress plugins using advanced AI models
- Advanced AI Providers: Support for OpenAI GPT-5 and Anthropic Claude 3.5 Sonnet for superior test generation
- Framework Flexibility: Generate tests for both PHPUnit and Pest testing frameworks
- Plugin Analysis: Deep analysis of WordPress plugin structure and functionality
- User Management: Secure user authentication and role-based access control
- Test Coverage: Comprehensive test coverage analysis and reporting
- Repository URL Validation: Intelligent validation of GitHub repository URLs with security checks
- Branch Selection: Dynamic branch selection with commit information
- Automatic Plugin Detection: Smart detection of WordPress plugin structure in repositories
- Public & Private Repository Support: Access both public and private repositories with proper authentication
- Rate Limiting: Built-in rate limiting to prevent API abuse
- Security Measures: Comprehensive security validation and sanitization
- Real-time Processing: Live repository processing with progress feedback
- URL Validation: Comprehensive validation of GitHub URLs with security pattern detection
- Rate Limiting: Per-user rate limiting for GitHub API requests
- Content Sanitization: Automatic sanitization of repository content
- Size Limits: Repository and file count limits to prevent abuse
- Error Handling: Robust error handling with user-friendly messages
- PHP 8.2 or higher
- Laravel 11.x
- Node.js 18+ and npm
- MySQL/PostgreSQL database
- GitHub API token (optional, for private repositories)
-
Clone the repository
git clone https://github.com/your-username/thinktest-ai.git cd thinktest-ai -
Install PHP dependencies
composer install
-
Install Node.js dependencies
npm install
-
Environment Configuration
cp .env.example .env php artisan key:generate
-
Configure Environment Variables Edit
.envfile with your settings:# Database Configuration DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=thinktest-ai DB_USERNAME=your_username DB_PASSWORD=your_password # AI Provider Configuration # OpenAI GPT-5 (uses GPT-4 Turbo until GPT-5 is available) OPENAI_API_KEY=your_openai_api_key # Anthropic Claude 3.5 Sonnet ANTHROPIC_API_KEY=your_anthropic_api_key # GitHub Integration GITHUB_API_TOKEN=your_github_token GITHUB_CLIENT_ID=your_github_client_id GITHUB_CLIENT_SECRET=your_github_client_secret
-
Database Setup
php artisan migrate --seed
-
Build Assets
npm run build
-
Start Development Server
php artisan serve npm run dev
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate a new token with the following scopes:
repo(for private repositories)public_repo(for public repositories)
- Add the token to your
.envfile asGITHUB_API_TOKEN
For enhanced private repository access:
- Create a GitHub OAuth App in your GitHub settings
- Set the authorization callback URL to:
http://your-domain.com/auth/github/callback - Add the client ID and secret to your
.envfile
- Navigate to the ThinkTest AI dashboard
- Select "Upload File" as your source
- Upload a WordPress plugin file (.php) or ZIP archive
- Choose your AI provider and testing framework
- Click "Analyze & Generate Tests"
- Navigate to the ThinkTest AI dashboard
- Select "GitHub Repository" as your source
- Enter a GitHub repository URL (e.g.,
https://github.com/owner/repo) - Select the branch you want to analyze
- Choose your AI provider and testing framework
- Click "Process Repository & Analyze"
- Single WordPress plugin files
- WordPress plugin directories
- Monorepo structures with multiple plugins
- ZIP archives containing plugin files
Configure GitHub integration in config/thinktest_ai.php:
'github' => [
'enabled' => true,
'max_repository_size' => 52428800, // 50MB
'max_files_per_repo' => 1000,
'rate_limit_requests_per_hour' => 100,
'rate_limit_requests_per_minute' => 10,
'supported_file_extensions' => ['.php', '.js', '.css', '.json'],
'ignored_directories' => ['node_modules', 'vendor', '.git'],
],Run the test suite:
php artisan testRun specific test groups:
php artisan test --filter=GitHubIntegrationTest- Per-user rate limiting for GitHub API requests
- Configurable limits for hourly and per-minute requests
- Automatic retry-after headers for rate limit responses
- Comprehensive URL validation with security pattern detection
- Repository size and file count limits
- Content sanitization to remove malicious code
- Validation of GitHub usernames and repository names
- User-friendly error messages for common scenarios
- Detailed logging for debugging and security monitoring
- Graceful handling of GitHub API failures
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Contact the development team
- Check the documentation for common solutions
- Added comprehensive GitHub repository integration
- Implemented branch selection and repository validation
- Added security measures and rate limiting
- Enhanced error handling and user feedback
- Added comprehensive test coverage
- AI-powered test generation
- Multiple AI provider support
- File upload functionality
- User authentication and management