claudegoodies
Skill

quarkus-tdd

From affaan-m

Desarrollo guiado por pruebas para Quarkus 3.x LTS usando JUnit 5, Mockito, REST Assured, pruebas Camel y JaCoCo. Usar al agregar funcionalidades, corregir bugs o refactorizar servicios orientados a eventos.

Guides TDD workflow for Quarkus 3.x services with JUnit 5, Mockito, REST Assured, Camel tests, and JaCoCo coverage checks.

Use it when

  • Adding REST endpoints or new features to a Quarkus service
  • Testing Apache Camel routes or RabbitMQ event handlers
  • Writing unit/integration tests targeting 80%+ JaCoCo coverage
  • Validating async logic with CompletableFuture or LogContext propagation

Skip it if

  • Project isn't built on Quarkus 3.x LTS
  • Not using JUnit 5/Mockito/REST Assured/Camel test stack
  • No Apache Camel or RabbitMQ involved, examples are Camel-specific

Facts

Repository
affaan-m/ECC
Status
Actively maintained
Last commit

Source preview

The instructions Claude Code reads when this skill runs.

# Flujo de Trabajo TDD en Quarkus

Orientación TDD para servicios Quarkus 3.x con 80%+ de cobertura (unit + integración). Optimizado para arquitecturas orientadas a eventos con Apache Camel.

## Cuándo Usar

- Nuevas funcionalidades o endpoints REST
- Correcciones de bugs o refactorizaciones
- Agregar lógica de acceso a datos, reglas de seguridad o streams reactivos
- Probar rutas Apache Camel y manejadores de eventos
- Probar servicios orientados a eventos con RabbitMQ
- Probar lógica de flujo condicional
- Validar operaciones asíncronas con CompletableFuture
- Probar propagación de LogContext

## Flujo de Trabajo

1. Escribir pruebas primero (deben fallar)
2. Implementar el código mínimo para que pasen
3. Refactorizar con pruebas en verde
4. Exigir cobertura con JaCoCo (objetivo 80%+)

## Pruebas Unitarias con Organización @Nested

```java
@ExtendWith(MockitoExtension.class)
@DisplayName("Pruebas Unitarias de OrderService")
class OrderServiceTest {

  @Mock
  private OrderRepository orderRepository;

  @Mock
  private EventService eventService;

  @Mock
  private FulfillmentPublisher fulfillmentPublisher;

  @InjectMocks
  private OrderService orderService;

  private CreateOrderCommand validCommand;

  @BeforeEach
  void setUp() {
    validCommand = new CreateOrderCommand(
        "customer-123",
        List.of(new OrderLine("sku-123", 2))
    );
  }

  @Nested
  @DisplayNa
View full source on GitHub →

Other skills