Skip to content

Latest commit

 

History

History
86 lines (65 loc) · 2.23 KB

File metadata and controls

86 lines (65 loc) · 2.23 KB

Testing Guide

This guide provides step-by-step instructions to test the DTO to TypeScript Converter in both Manual (Local) and Docker modes.

1. Manual Testing (Local)

Run the application directly on your machine. This is best for development and quick testing.

Prerequisites

  • Python 3.8+ installed.
  • (Optional) Ollama running locally for AI features.

Steps

  1. Setup Environment:

    # Create virtual environment
    python3 -m venv venv
    
    # Activate it
    source venv/bin/activate  # Linux/Mac
    # venv\Scripts\activate   # Windows
    
    # Install dependencies
    pip install -r requirements.txt
  2. Run Application:

    python app.py

    Output should indicate running on http://127.0.0.1:5000.

  3. Verify:

    • Open browser: http://127.0.0.1:5000
    • Or use curl:
      curl -I http://127.0.0.1:5000
    • Expected Result: HTTP 200 OK.

2. Docker Testing

Run the application in a containerized environment. This ensures consistency across different machines.

Prerequisites

  • Docker and Docker Compose installed.

Steps

  1. Build and Run:

    docker compose up --build

    Wait for "Entered start loop" or similar logs indicating services are up.

  2. Verify:

    • Open browser: http://localhost:5000
    • Or use curl:
      curl -I http://localhost:5000
    • Expected Result: HTTP 200 OK.
  3. Test AI Model (Optional): If you want to test the Ollama integration inside Docker:

    # Pull the model inside the running container
    docker compose exec ollama ollama pull deepseek-coder
  4. Stop: Press Ctrl+C or run:

    docker compose down

Troubleshooting

  • Port Conflicts:

    • If port 5000 is busy, change the mapping in docker-compose.yml (e.g., "5001:5000").
    • If port 11434 (Ollama) is busy, the docker-compose is already configured to use 11435 for the host to avoid conflicts with local Ollama.
  • Connection Refused:

    • Ensure the container is running (docker compose ps).
    • Check logs (docker compose logs).