Test API endpoints with automated test generation
Generates comprehensive API tests with edge cases, error scenarios, and security validations for any endpoint.
/plugin marketplace add citadelgrad/scott-cc/plugin install scott-cc@scott-ccclaude-sonnet-4-5api/Generate comprehensive API tests for the specified endpoint.
$ARGUMENTS
Create practical, maintainable tests using modern tools:
JavaScript/TypeScript
Python
Go
Rust
Other Languages
Happy Paths
Error Paths
Edge Cases
JavaScript/TypeScript Example:
describe('API Endpoint', () => {
describe('Success Cases', () => {
it('should handle valid request', () => {})
it('should return correct status code', () => {})
})
describe('Validation', () => {
it('should reject invalid input', () => {})
it('should validate required fields', () => {})
})
describe('Error Handling', () => {
it('should handle server errors', () => {})
it('should return proper error format', () => {})
})
})
Python Example:
class TestAPIEndpoint:
class TestSuccessCases:
def test_valid_request(self):
pass
def test_correct_status_code(self):
pass
class TestValidation:
def test_reject_invalid_input(self):
pass
def test_validate_required_fields(self):
pass
class TestErrorHandling:
def test_handle_server_errors(self):
pass
def test_proper_error_format(self):
pass
Go Example:
func TestAPIEndpoint(t *testing.T) {
t.Run("SuccessCases", func(t *testing.T) {
t.Run("ValidRequest", func(t *testing.T) {})
t.Run("CorrectStatusCode", func(t *testing.T) {})
})
t.Run("Validation", func(t *testing.T) {
t.Run("RejectInvalidInput", func(t *testing.T) {})
})
})
Authentication/Authorization
Data Validation
Rate Limiting
Performance
Integration Points
Generate production-ready tests that can be run immediately with your project's standard test command (npm test, pytest, go test, cargo test, etc.).