Korredo supports two types of parameters:
- Env or environment parameters
- System parameters
These parameters can be used in the following parts in a package:
- In the path of a directory
- In the path of an assembly
- In the Custom init script
- In the Custom clean up script
- In steps, on:
- Parameters field
- File field
- Text replacement column
The purpose of parameters is to ease the way packages and steps are defined and run on agents or prepared locally. Since Korredo takes a series of folders from the local computer and transfers them to a remote machine, a lot of things can be different. The most important part is related to the config files. For example, the integration tests might require a specific connection string depending on the machine they will run.
Then, if the templates are shared the location of folders can be different. For example, a package can be defined as having the source a folder path %env.disk%\Folder1. Depending on the value of env.disk parameters, the folder will be copied from c: \Folder1, or d:\Folder1
1. Environment parameters
These parameters are defined by the user and are machine specific. Parameters can be managed from the Settings form and are stored in the agent.config file (root folder).
The file is used also by the Korredo Windows Service and can be manually edited by entering on a line the pair key=value.
2. System parameters
These parameters are not user configurable.
Represents the full path to the package content and it depends on where the parameter is invoked:
- On the initiator machine: The path is different than the source folders of a package. All source folders will be copied to the Package folder from the root folder of Korredo. Each package will get a unique folder. For example, if Korredo is installed in C:\Korredo, then the value of %system.PackageDirectory% will be C:\Korredo\Packages\Package-Package-636500049889032684
- On the agent machine: packages are unzipped in the Cache folder from Korredo. For example, if Korredo is installed in C:\Korredo, the value of %system.PackageDirectory% will be C:\Korredo\Cache\Received-36257ea1-d413-4dff-839d-d329dce7c20c\
Represents the full path to the artifact folder. The content of this folder is automatically zipped and sent back to the initiator of the package. The parameter makes sense only on the agent machines. For example, if Korredo is installed in C:\Korredo, the value of %system.ArtifactsFolder% will be C:\Korredo\Cache\Received-36257ea1-d413-4dff-839d-d329dce7c20c\Artifacts
Represents the full path to the Korredo installation folder.
Represents the full path to a file that contains tests (each on a line). When Korredo executes a package, it will generate a .input file for each configured assembly that needs to be executed by an agent. The parameter can be used only in a context where a .dll file is present because the input file will be calculated based on this dll file. For example, the parameters:
will generate for %system.TestsFileList% the full path to the SampleNunit24.input file (depending on the values of %system.PackageDirectory%\%alias.F1%)
This input file is needed for runners like Nunit to execute a specific list of tests inside the assembly, instead of the entire suite of tests.
The parameter can be used only on the agent side and makes sense only in a context where a DLL file is used. The parameter’s value will be a text representing the lists of tests for an agent, separated by commas.The parameter can be used only in a context where a dll file is present because the list of tests will be calculated based on this dll file.
For example, the parameters:
will generate “D:\Korredo\Cache\Received-1fefb99b-58a3-41ce-bb01-ca39f002837c\F0\DummyTestsAssemblyForTesting.dll” /Tests:DummyTestsAssemblyForTesting.UnitTest2.TestMethodUnitTest1,DummyTestsAssemblyForTesting.UnitTest1.TestMethod2
This is needed for the Visual Test Console runner.