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
-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
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
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
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
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
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
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
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.
Last updated