GenAI For Tester
  • Introduction
  • Session 1: Introduction to Generative AI in Testing
    • 1. Overview of Generative AI
    • 2. Popular AI Models and Their Usage
    • 3. Setting Up AI Tools for Testing
    • 4. Prompt Engineering for Software Testing
      • Prompt Managerment
  • Session 2: AI-Assisted Test Case Generation
    • Exam #1: eCommerce Domain - Checkout Flow
    • Exam #2: Mobile App - User Login and Authentication
    • Exam #3: API Testing - User Registration Endpoint
  • Session 3: Advanced AI in Test Automation
    • 🐍 Python 3.12 Setup Guide
    • Chrome AI Asistant
    • Setup Github Copilot in VS Code
    • Playwright MCP Server
    • SQLite MCP to interact with your DB
    • Browser-use Browser AI Agent
    • Postman PostBot AI for API Testing
    • Self Healing Elements with AgentQL and Playwright
  • n8n flexible AI workflow automation for technical teams
    • Setup n8n with docker
  • Build small thing with LLM
    • Create chatbot with gemini model
    • Create R.A.G with germini
    • Create AI Agent tool for query DB
  • Get selenium locator with llm and java
  • Group 1
    • Setup Local DB
Powered by GitBook
On this page
  1. Session 2: AI-Assisted Test Case Generation

Exam #3: API Testing - User Registration Endpoint

Prompt:

Generate API test cases for the user registration endpoint (POST /api/register) with the following requirements: Users must provide a valid email, password, and username. The password should be hashed, and the response should return a success message or an appropriate error message. Consider functional, negative, boundary, and security test cases.

Example Output:

• Verify that sending a valid email, password, and username returns a 201 Created response.

• Verify that sending an already registered email returns a 409 Conflict error.

• Verify that missing any required field results in a 400 Bad Request response.

• Verify that the password is not returned in the response.

• Verify that SQL injection attempts in the username field are blocked.

• Verify that sending an excessively long username (e.g., 300 characters) is handled properly.

• Verify that API rate-limiting prevents spam registrations.

• Verify that the system does not expose sensitive error details.

PreviousExam #2: Mobile App - User Login and AuthenticationNext🐍 Python 3.12 Setup Guide

Last updated 3 months ago