Search code examples
testingjrubygui-testingmarathontesting

How to run few testcases or a testsuite from commandline using marathontesting tool (MarathonITE)?


I want to run multiple testSuits or testCases via commandline or batch mode using marathontesting tool.


Solution

  • Marathon/Marathonite can accept a list of tests on the command line. Suppose you have a test structure like follows (under the TestCases folder):

    test_1
    test_2
    folder_1
    folder_1/test_1
    folder_1/test_2
    

    You can run marathon as follows:

    marathon -batch <project-folder> # Runs all tests
    marathon -batch <project-folder> test_1 # Runs only test_1
    marathon -batch <project-folder> test_1 test_2 # Runs test_1 and test_2
    marathon -batch <project-folder> folder_1.test_1 # Runs only folder_1/test_1
    marathon -batch <project-folder> folder_1.AllTests # Runs all tests from folder_1
    

    For more details see http://marathontesting.com/documentation/?section=executing-tests-in-batch-mode. Though the user guide is for marathonite is valid for marathon also.