De QA Manual a
Automation Engineer

El roadmap definitivo con ejemplos prácticos,
arquitecturas reales y código production-ready

Guía Técnica 2024 30 min lectura +50 ejemplos

Por Hugo Napa Rojas
Head de QA de WIRBI
+1M tests automatizados/mes

Contexto

El Estado del Testing en 2024

Por qué este es el momento perfecto para automatizar

87%
Empresas con CI/CD
Deploys diarios
3.5x
Más demanda
QA Auto vs Manual
$120k
Salario promedio
Sr. Engineer
2hrs
vs 3 días
Regression test
"El testing manual puro desaparecerá en 5 años. Los QA del futuro son developers especializados en calidad, con skills en IA, cloud y DevOps."
- World Quality Report 2024, Capgemini

🚀 Las 3 tendencias clave:

  1. Shift-Left Testing: QA desde el diseño
  2. AI-Powered Testing: Self-healing tests
  3. Testing as Code: Todo automatizado
Análisis

Manual vs Automatizado

Comparación honesta con código real

Testing Manual

Login Test - Manual

1. Abrir Chrome
2. Navegar a app.com
3. Click en "Login"
4. Escribir email
5. Escribir password
6. Click "Submit"
7. Verificar dashboard
8. Screenshot
9. Documentar

⏱️ 3-5 minutos
🔄 Manual
❌ No CI/CD
Testing Auto

Login Test - Selenium

def test_login(driver):
    page = LoginPage(driver)
    dash = Dashboard(driver)
    
    page.navigate()
    page.login(
        email="test@test.com",
        password="Test123!"
    )
    
    assert dash.is_displayed()
    
⏱️ 5 segundos
🔄  veces
✅ CI/CD ready

ROI: 1 test = 15 horas/mes ahorradas

Fundamentos

Pirámide de Testing

Estrategia de automatización que funciona

E2E/UI (10%)
Selenium, Cypress
Lentos User Journey
Integration (20%)
REST Assured, Postman
Rápidos Confiables
Unit Tests (70%)
JUnit, Jest, PyTest
Instantáneos TDD

🎯 Unit

Cuándo: Lógica

Tiempo: < 1ms

🔗 Integration

Cuándo: APIs

Tiempo: 10-100ms

🌐 E2E

Cuándo: Flujos

Tiempo: 5-30s

Hands-On

Tu Primer Test

De 0 a test funcional en 10 minutos

test_google.py
# pip install selenium pytest

from selenium import webdriver
from selenium.webdriver.common.by import By
import pytest

class TestGoogle:
    
    def setup_method(self):
        self.driver = webdriver.Chrome()
        self.driver.maximize_window()
    
    def teardown_method(self):
        self.driver.quit()
    
    def test_search(self):
        # Navigate
        self.driver.get("https://google.com")
        
        # Search
        search = self.driver.find_element(
            By.NAME, "q"
        )
        search.send_keys("Selenium")
        search.submit()
        
        # Verify
        assert "Selenium" in self.driver.title

# Run: pytest test_google.py -v

✅ Logrado:

  • Setup automático
  • Navegación
  • Interacción
  • Assertions

🚀 Siguiente:

  • Page Objects
  • Data-driven
  • CI/CD
  • Reporting
Best Practice

Page Object Model

La arquitectura que escala

pages/login_page.py
class LoginPage:
    def __init__(self, driver):
        self.driver = driver
        
        # Locators
        self.EMAIL = (By.ID, "email")
        self.PASSWORD = (By.ID, "password")
        self.LOGIN_BTN = (By.ID, "login-btn")
    
    def navigate(self):
        self.driver.get(Config.BASE_URL)
        return self
    
    def enter_email(self, email):
        element = self.driver.find_element(*self.EMAIL)
        element.clear()
        element.send_keys(email)
        return self
    
    def login(self, email, password):
        return (self.enter_email(email)
                   .enter_password(password)
                   .click_login())
tests/test_login.py
def test_valid_login(driver):
    # Arrange
    login_page = LoginPage(driver)
    
    # Act
    dashboard = login_page.navigate().login(
        email="test@test.com",
        password="Test123!"
    )
    
    # Assert
    assert dashboard.is_displayed()
Nivel Avanzado

API Testing

Por qué el 70% de tests deberían ser API

test_user_api.py
import requests
import pytest

class TestUserAPI:
    BASE_URL = "https://api.example.com/v1"
    
    @pytest.fixture
    def auth_headers(self):
        response = requests.post(
            f"{self.BASE_URL}/auth/login",
            json={
                "email": "test@test.com",
                "password": "Test123!"
            }
        )
        token = response.json()['token']
        return {
            'Authorization': f'Bearer {token}'
        }
    
    def test_create_user(self, auth_headers):
        user_data = {
            "name": "John Doe",
            "email": "john@example.com"
        }
        
        response = requests.post(
            f"{self.BASE_URL}/users",
            json=user_data,
            headers=auth_headers
        )
        
        assert response.status_code == 201
        assert 'id' in response.json()

⚡ Ventajas

  • 100x más rápido
  • Sin elementos flaky
  • Fácil paralelizar

🛠️ Herramientas

  • REST Assured
  • Postman
  • Pact
DevOps

CI/CD Pipeline

GitHub Actions en acción

.github/workflows/test.yml
name: Test Automation

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      
      - name: Install dependencies
        run: |
          pip install -r requirements.txt
          playwright install chrome
      
      - name: Run tests
        run: |
          pytest tests/ \
            --browser=chrome \
            --parallel=4 \
            --alluredir=allure-results
      
      - name: Generate Report
        if: always()
        run: |
          allure generate allure-results
      
      - name: Upload results
        uses: actions/upload-artifact@v3
        with:
          name: test-results
          path: allure-report/

Resultado: Tests automáticos en cada commit
9 ejecuciones paralelas en 5 minutos

Stack 2024

Herramientas Modernas

El ecosistema actual de testing

Categoría Herramienta Por qué
🌐 Web Playwright Auto-wait, multi-browser
⚡ JS Cypress Time travel, debugging
📱 Mobile Maestro Más simple que Appium
🤖 Visual Percy AI para cambios visuales
⚡ Perf K6 Tests as code
🔒 Security OWASP ZAP Security automatizado
☁️ Cloud BrowserStack Real devices
🤖 AI Testim.io Self-healing tests

🎯 Recomendación:

Principiante: Cypress o Playwright

Intermedio: + K6 + Percy

Avanzado: + Pact + Stryker

KPIs

Métricas de Impacto

Cómo medir el éxito

85%
Coverage
Code + Branch
<2%
Flaky Tests
Intermitentes
15min
Feedback
Commit → Result
0
Escapes
Bugs en prod
metrics.py
def calculate_roi():
    manual_time = 5  # minutos
    automated_time = 0.1
    executions = 100
    
    time_saved = (manual_time - automated_time) * executions
    hourly_rate = 50  # USD
    
    monthly_savings = (time_saved / 60) * hourly_rate
    return {
        'hours_saved': time_saved / 60,
        'cost_saved': monthly_savings
    }
Tu Roadmap

Roadmap por Perfil

Elige tu camino

👤 QA Manual

  1. Mes 1-2: Python + Git
  2. Mes 3: Selenium
  3. Mes 4: Page Objects
  4. Mes 5: API Testing
  5. Mes 6: CI/CD

💻 Developer

  1. Mes 1: Testing principles
  2. Mes 2: Test frameworks
  3. Mes 3: E2E tools
  4. Mes 4: Performance
  5. Mes 5: Security

🎓 Junior

  1. Mes 1-3: Programación
  2. Mes 4: Testing basics
  3. Mes 5-6: Herramientas
  4. Mes 7-8: Proyecto
  5. Mes 9: Portfolio

🎯 Meta: 6 meses

✓ 100+ tests en producción
✓ Pipeline CI/CD
✓ Portfolio GitHub
✓ Certificación

Portfolio

5 Proyectos GitHub

Demuestra tus skills

1️⃣ E-Commerce

Stack: Playwright + TS

  • Page Objects
  • Data-driven
  • Visual tests
  • GitHub Actions

2️⃣ API Framework

Stack: Python + Pytest

  • CRUD testing
  • Schema validation
  • Performance
  • Mock server

3️⃣ Mobile App

Stack: Appium + Java

  • Android + iOS
  • Gestures
  • Cross-platform
  • Cloud testing

4️⃣ Performance

Stack: K6 + Grafana

  • Load/Stress
  • Custom metrics
  • Dashboard
  • SLAs

5️⃣ Test Dashboard

Stack: React + Node.js

Dashboard con resultados real-time, histórico y métricas

Lecciones

Anti-patterns

Lo que NO debes hacer

❌ MAL
# Sleep hardcoded
time.sleep(10)

# Tests dependientes
def test_1_create():
    global user_id
    user_id = create()

# Assert débil
assert response

# Hardcoded
driver.get("localhost:3000")

# Sin cleanup
create_resource()
# No delete!
✅ BIEN
# Explicit wait
wait.until(EC.element_to_be_clickable)

# Tests independientes
def test_lifecycle():
    user = create()
    try:
        verify(user)
    finally:
        delete(user)

# Assert específico
assert response.status == 200

# Config externa
driver.get(Config.BASE_URL)

# Con fixture
@pytest.fixture
def user():
    u = create()
    yield u
    delete(u)

🚨 Los 5 peores anti-patterns:

  1. Test Data en prod: NUNCA uses prod
  2. Ignorar flaky tests: Son peor que no tener
  3. Over-engineering: Keep it simple
  4. No versionar: Tests = código = Git
  5. Solo happy path: 80% bugs en edge cases
Tendencias

El Futuro del Testing

IA y más allá

🤖 AI Testing

  • Codegen con IA
  • Self-healing
  • Visual AI
  • Predictive

☁️ Cloud-Native

  • Serverless
  • Containers
  • Chaos Eng
  • Observability

🚀 Shift-All

  • Shift-Left
  • Shift-Right
  • Continuous
  • Collaborative
Testing con IA
# Prompt: "Generate test for registration"

class TestRegistration:
    @pytest.mark.parametrize("scenario,data,expected", [
        # IA genera estos casos:
        ("valid", valid_data(), 201),
        ("duplicate", dup_email(), 409),
        ("sql_injection", sql_attack(), 400),
        ("xss", xss_attempt(), 400),
        ("unicode", unicode_data(), 201)
    ])
    def test_scenarios(self, scenario, data, expected):
        response = self.api.register(data)
        assert response.status_code == expected

2026: 50% tests generados por IA
Tu rol: Arquitecto, no escribidor

El momento es ahora
Tu carrera no espera

En 6 meses: Automation Engineer

En 12 meses: Experto
En 24 meses: Líder técnico

Tu próximo paso:

1️⃣ Instala Python y VS Code
2️⃣ Escribe tu primer test
3️⃣ Súbelo a GitHub
4️⃣ Compártelo en LinkedIn
5️⃣ Únete a la comunidad

Hugo Napa Rojas
Head de QA de WIRBI
qa@wirbi.com

Slide 1 / 15