¿Cómo especificar qué escenario de lechuga ejecutar?
Al usar el marco de prueba de la lechuga Python, corrí con frecuencia en este caso, un escenario falló y luego quiero acercarme a este escenario para arreglar este escenario.
¿Podemos especificar qué escenario de lechuga se ejecutará en el archivo de características?
Puede utilizar tags para las pruebas deseadas. Por ejemplo:
Scenario: Set off time in free time slot Given I click first free time slot And I choose menu item "Off" And I enter time that is in free interval When I click button "Ok" Then I see offtime time slot with title that matches with saved interval @wip Scenario: Set free time on off time Given I click last off time slot And I choose menu item "Set working" And I enter time that is in last off interval When I click button "Ok" Then I see freetime time slot with title that matches with saved interval
Entonces cuando corras lechuga solo usa
./manage.py cosecha -t wip
Ejecutará solo los escenarios marcados con la etiqueta @wip , en mi caso, wip es para Work in Progress
Si es sin django y solo lechuga entonces use
lechuga
En la documentación especificada por JohnWang tenemos documentaciones como esta para lograr:
lettuce xxx.feature -s 1,2,3