Random Test Order - Allows you to run your tests in a random order

  • Tags: /
  • Latest: 0.3
  • Last Updated: 14 May 2014
  • Grails version: 1.3.7 > *
  • Authors: Jarred Olson (Twitter: @JarredOlson)
0 vote
Dependency:
compile ":random-test-order:0.3"

 Documentation

Summary

Allows you to run your unit, integration, and functional tests in a random order. This is helpful when trying to identify tests that rely on data or setup from another test.

grails random-test-order [test type] [rerun]

test type (+) -unit -integration -functional rerun (+) -rerun

examples: grails random-test-order -unit //will run all unit tests in a random order grails random-test-order -unit -rerun //will rerun all unit tests in the previous random order

When you execute the script you will see output like the following:

About to execute the following test app script… grails test-app -unit UnitBTests UnitCTests UnitATests

This will allow you to copy/paste the outputted command in order to re-run your tests in the same order that they previously occurred on another machine.

Installation

grails install-plugin random-test-order

Description

Allows you to run your unit, integration, and functional tests in a random order. This is helpful when trying to identify tests that rely on data or setup from another test.

If you have any questions or issues please contact me via twitter: @JarredOlson

grails random-test-order [test type] [rerun]
  • test type
    • -unit //Any file that ends with Test.groovy or Tests.groovy under the /test/unit folder
    • -integration //Any file that ends with Test.groovy or Tests.groovy under the /test/integration folder
    • -functional //Any file that ends with Test.groovy or Tests.groovy under the /test folder excluding /test/unit and /test/integration
  • rerun
    • -rerun //Reruns the previous random order of tests
examples:
  1. grails random-test-order -unit //will run all unit tests in a random order
  2. grails random-test-order -unit -rerun //will rerun all unit tests in the previous random order
When you execute the script you will see output like the following:

About to execute the following test app script…
grails test-app -unit UnitBTests UnitCTests UnitATests

This will allow you to copy/paste the outputted command in order to re-run your tests in the same order that they previously occurred on another machine.