To run tests from console there is special Unicorn.ConsoleRunner.exe utility.
The tool could be downloaded here.
To run tests use the following command:
Unicorn.ConsoleRunner.exe --test-assembly=path_to_tests_dll --config=path_to_config
Command line arguments
# Required arguments:
--test-assembly=PATH_TO_TEST_ASSEMBLY
--config=PATH_TO_CONFIGURATION_FILE
# Optional arguments:
--trx=TRX_FILE_NAME (trx is not generated by default)
Unicorn config
Config properties
Any of properties is optional (in case of property absence default value is used)
# testsDependency: specifies how to deal with dependent tests in case when main test was failed. Available options
-- Skip
-- DoNotRun
-- Run (default)
# testsOrder: specifies in which order to run tests within a suite. Available options
-- Alphabetical
-- Random
-- Declaration (default)
# parallel: specifies how to parallel tests execution. Available options
-- Suite
-- None (default)
# threads: specifies how many threads are used to run tests in parallel. Default: 1
# testTimeout: specifies timeout for test and suite method execution in minutes. Default: 15
# suiteTimeout: specifies timeout for test suite execution in minutes. Default: 40
# tags: list of suites tags to be run. Default: [empty == all]
# categories: list of test categories to be run. Default: [empty == all]
# tests: list of tests masks to be run. Default: [empty == all]
# userDefined: parent for user defined properties
any number of custom properties as key-value pair could be specified
Config file example
{
"testsDependency": "Skip",
"testsOrder": "Random",
"parallel": "Suite",
"threads": 2,
"testTimeout": 15,
"suiteTimeout": 60,
"tags": [ "Tag1", "Tag2" ],
"categories": [ "Smoke" ],
"tests": [ ],
"userDefined": {
"customProperty1": "value1",
"customProperty2": "value2"
}
}