# Test Runner Console

The Test Runner console application can be found in \<linx designer install dir>\TestRunner.

To run the tests in a Linx solution, start TestRunner.exe from a command prompt, with a -solutionPath option which specifies the absolute path to the root folder of the solution. Tests created in that solution will be executed.

### Command Line Options <a href="#command-line-options" id="command-line-options"></a>

| Option                 | Description                                                                                                      | Required |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------- | -------- |
| -solutionPath          | The absolute path to the Linx solution root folder.                                                              | Required |
| -command               | Specify RunTests to run tests, or TestList to see a list of tests. The default is RunTests.                      | Optional |
| -testPaths             | A list of colon-delimited locations in the solution at which to run tests. Only applies to the RunTests command. | Optional |
| -settingsFilePath      | Alternate settings file path.                                                                                    | Optional |
| -secretsFilePath       | Linx secret settings config file path.                                                                           | Optional |
| -outputFormat          | The output can be in Text or JSON format. The default is Text. Only applies to the RunTests command.             | Optional |
| -debugPackageTitle     | Debug plugin package title.                                                                                      | Optional |
| -debugPackageId        | Debug plugin package identity.                                                                                   | Optional |
| -debugPackageDirectory | Debug plugin package folder path.                                                                                | Optional |
| -debugPackageVersion   | Debug plugin package version.                                                                                    | Optional |

### Specify Which Tests To Run <a href="#specify-which-tests-to-run" id="specify-which-tests-to-run"></a>

Use the -testPaths option. To run a specific test in a solution, specify the qualified path to the test function. To run all the tests within a specified folder, and all of its subfolders, specify the qualified path to the folder. Note that the qualified path is the path within the solution only, and should not include the solution name. If this option is omitted, all the tests in the solution will be run.

To specify a selection of tests and / or folders, provide a list of test paths, delimited with a colon (:).

***

### See a List of Tests <a href="#see-a-list-of-tests" id="see-a-list-of-tests"></a>

Specify **TestList** for the **-command** option, to see a list of all the test fixtures and test cases in the specified solution. The test list is provided in JSON format only.

***

### Provide Alternate Solution Settings <a href="#provide-alternate-solution-settings" id="provide-alternate-solution-settings"></a>

To provide a set of solution settings for the test run, which are different from the default settings in the solution, specify the **-settingsFilePath** option, with a path to the required settings file.

If there are secret settings in the solution, values can be provided for these in one of two ways. Either specify an alternate settings file in which these setting values are not secret. Otherwise specify the **-secretsFilePath** option, with a path to a Linx secrets config file. For example, the Linx Designer’s secrets config file is at `%USERPROFILE% \AppData\Roaming\Twenty57\Linx Designer 6\LinxDesigner.SolutionSecrets.config`.

***

### Test Results Format <a href="#test-results-format" id="test-results-format"></a>

Specify **JSON** for the **-outputFormat** option, to see the test results in JSON format. Or use **Text** to see the results in a human readable format. The default is **Text**.

***

### Use a Debug Plugin Package <a href="#use-a-debug-plugin-package" id="use-a-debug-plugin-package"></a>

To run tests in a solution which contains a debug plugin package, use the **-debugPackageTitle**, **-debugPackageId**, **-debugPackageDirectory** and **-debugPackageVersion** options to specify the package. This scenario only applies to Linx plugin writers who wish to write tests in Linx for a plugin.

***

### Test Runner Command Line Example <a href="#test-runner-command-line-example" id="test-runner-command-line-example"></a>

`Twenty57.Linx.TestRunner.Console.exe -solutionPath "C:\Git\Linx 6 Plugins\GraphQL\Tests\Test_GraphQL" -testPaths "Test_GraphQL_Server.Test_Blog_Queries.Test_Get_All_Authors" -secretsFilePath "%USERPROFILE% \AppData\Roaming\Twenty57\Linx Designer 6 vNext\LinxDesigner. SolutionSecrets.config" -debugPackageTitle GraphQL_Debug -debugPackageId Twenty57.Linx.Plugins.GraphQL -debugPackageDirectory "C:\Git\Linx 6 Plugins\GraphQL\src\GraphQL\bin\Debug\Net6.0-windows"`

***

### Test Runner Execution Folder <a href="#test-runner-execution-folder" id="test-runner-execution-folder"></a>

When the test runner runs, it first compiles the Linx solution, and then places the resulting binary, and all of its dependencies, in a subfolder of the solution folder, named **.test\_runner**.

For example `C:\Git\Linx 6 Plugins\GraphQL\Tests\Test_GraphQL.test_runner`. If the solution is in source control, this folder should be excluded.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/testrunner/testrunnerconsole.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
