(Quick Reference)

test-app

Purpose

Runs all Grails unit and integration tests and generates reports. The command returns appropriate response codes for embedding with continuous integration servers.

Examples

Pruebas de aplicación

Proposito

Ejecuta todas las unidades Grails, pruebas de integración y generación de informes. El comando devuelve códigos de respuesta adecuados para incorporar al servidor de integración continua.

grails test-app
grails test-app Foo
grails test-app Foo Bar

Description

Usage:

Descripción

Uso:

grails [environment]* test-app [names]*

Fired Events:

  • StatusFinal - When the test cycle completes

Executes the Grails unit and integration tests located in the test/unit and test/integration directories. By default all tests are executed, but you can specify the names of the tests (without the "Tests" or other test type suffix) as argument to the command:

  • StatusFinal - Cuando se completa el ciclo de pruebas.

Ejecuta las pruebas de unidad e integración de Grails localizadas en los directorios test/unit y test/integration. Por defecto todas las pruebas son ejecutadas, pero usted puede especificar el nombre de las pruebas (sin el "Test" o otro sufijo de tipo Test) como argumento al comando:

grails test-app Foo
grails test-app Foo Bar

The first example will execute a test called FooTests.groovy whilst the second will execute FooTests.groovy and BarTests.groovy if they exist.
El primer ejemplo ejecutará una prueba llamada FooTests.groovy mientras el segundo ejecutará FooTests.groovy y BarTests.groovy si existen.

Tests can also use the suffix of Test instead of Tests.
Las pruebas pueden usar el sufijo Test en vez de Tests.

You can also choose to only run the unit or integration tests:
También puede optar por ejecutar sólo las pruebas de unidad e integración:

grails test-app unit:
grails test-app integration:

If you only wish to re-run failed tests use the -rerun flag
Si desea volver a ejecutar las pruebas fallidas, utilice el flag -rerun

grails test-app -rerun

See the Testing section for examples on how to combine the different options to target tests.
Ver la sección Testing para ejemplos de como combinar las diferentes opciones para las pruebas de destino.