prinet

docs/Testing.md

Testing Guide

Uruchamianie testów

Wszystkie testy

make test

Testy kategorii

make test-sql        # Testy bazy danych
make test-zebra      # Testy drukarek
make test-integration # Testy integracyjne

Testy manualne

# Test połączenia RPI → SQL
curl http://localhost:8081/api/sql/test/wapromag

# Test połączenia RPI → ZEBRA
curl http://localhost:8081/api/zebra/test/zebra-1

# Test komendy ZPL
curl -X POST http://localhost:8081/api/zebra/command \
  -H "Content-Type: application/json" \
  -d '{"printerId":"zebra-1","command":"~HI"}'

# Bezpośredni test drukarki
echo "~HI" | nc zebra-printer-1 9100

Struktura testów

test_rpi_sql.py

test_zebra_connectivity.py

test_integration.py

Raporty testów

Raporty generowane w katalogu reports/: