Prerequisites
- TestStand is installed and the Tools component was selected at the time of installation.
Note: If the Tools component was not installed, you can install the same by repairing TestStand through NI Package Manager, additionally select the Tools component and complete the repair.
Step 1. Download the attached zip file.
Step 2. Extract the contents to a desired folder (e.g. C:\ExtractedFolder)
Step 3. For the Git client you intend to configure, you can follow one of the below options:
a. Provide the argument to the tool as the Git client Config JSON file without creating it to let the tool configure the intended Git client at its default level.
b. Create a Config JSON, <GitClient>_Config.json, with the contents as defined in section Config JSON File.
Step 4. Open a command prompt window with administrator privileges.
Step 5. Navigate to the extracted folder mentioned in Step 2.
Step 6. In the command prompt window, execute the application “ConfigurationModifier.exe” providing the config JSON file for the desired Git client as the argument.
E.g. the following command will configure Microsoft Visual Studio: C:\ExtractedFolder>ConfigurationModifier.exe VisualStudio_Config.json.
Refer to Command-line usage for details of arguments for the application.
Step 7. If no errors are encountered, TestStand File Diff and Merge utility would be configured as the Git external tool for diff and merge for the Git client you chose.
Note: A log file “ConfigurationModifierLog.log” gets created containing the execution log of the tool at the same location as “ConfigurationModifier.exe”.
Command-line usage
The following command-line arguments are supported by “ConfigurationModifier.exe”:
Argument | Description |
? | Describe the usage details for the application |
help | Describe the usage details for the application. |
<GitClient>_Config.json |
Configure Git external tool for the Git client <GitClient>.
Note: If this file is not present, the tool will create one with the latest version of the Git client available in the system and configure it as per the default level mentioned in the above table.
|
Config JSON File
Configuration details are provided to the “ConfigurationModifier.exe” application through the <GitClient>_Config.json file as an argument. The name and contents of this JSON file varies depending on the Git client being configured. The following table provides the details of the valid data that should be present in the Config JSON file for a given Git client.
<GitClient> | JSON content example | Description |
VisualStudio |
{
"MSVisualStudioClients": [
{
"ClientName": "Visual Studio Professional 2022", "ClientPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\Common7\\IDE\\devenv.exe", "Version": "17.12.0"
}
],
"ConfigurationLevel": "repo",
"RepositoryPaths": [
"C:\\GitRepos\Repo1",
"C:\\GitRepos\Repo2",
"C:\\GitRepos\Repo3"
]
}
|
An object consisting of:
- array of “MSVisualStudioClients”, where each element consists of
- “ClientName” as the Visual Studio version name.
- “ClientPath” as the path to Visual Studio application.
- “Version” as the version of Visual Studio.
- “ConfigurationLevel” as one of {“repo”, “client”, “global”}
- “RepositoryPaths” as an array of folder paths. This is required only if the “ConfigurationLevel” is set to “repo”, else set it as ‘null’
|
Sourcetree |
{
" SourceTreeClients": [
{
"ClientName": "SourceTree",
"ClientPath": "C:\\Users\\Administrator\\ AppData\\Local\\SourceTree\\SourceTree.exe",
"Version": "3.4.19"
}
],
" ConfigurationLevel ": "client",
" RepositoryPaths ": null
}
|
An object consisting of:
- array of “SourceTreeClients”, where each element consists of
- “ClientName” as the SourceTree version name.
- “ClientPath” as the path to SourceTree application.
- “Version” as the version of SourceTree.
- “ConfigurationLevel” as one of {“repo”, “client”, “global”}
- “RepositoryPaths” as an array of folder paths. This is required only if the “ConfigurationLevel” is set to “repo”, else set it as ‘null’.
|
GitKraken |
{ " GitKrakenClients": [
{
"ClientName": "GitKraken",
"ClientPath": "C:\\Users\\Administrator\\ AppData\\Local\\gitkraken\\gitkraken.exe", "Version": "10.5.0"
}
], " ConfigurationLevel ": "global" }
|
An object consisting of:
- array of “GitKrakenClients”, where each element consists of
- “ClientName” as the Git Kraken version name.
- “ClientPath” as the path to Git Kraken application.
- “Version” as the version of Git Kraken.
- “ConfigurationLevel” as “global”.
|
GitCola |
{
" GitColaClients": [
{
"ClientName": "git-cola",
"ClientPath": "C:\\Users\\Administrator\\ AppData\\Local\\Programs\\git-cola",
"Version": "4.8.2"
}
],
"ConfigurationLevel": "repo",
"RepositoryPaths": [
"C:\\GitRepos\Repo1",
"C:\\GitRepos\Repo2",
"C:\\GitRepos\Repo3"
]
}
|
An object consisting of:
- array of “GitColaClients”, where each element consists of
- “ClientName” as the Git Cola version name.
- “ClientPath” as the path to Git Cola application.
- “Version” as the version of Git Cola.
- “ConfigurationLevel” as one of {“repo”, “global”}
- “RepositoryPaths” as an array of folder paths. This is required only if the “ConfigurationLevel” is set to “repo”, else set it as ‘null’.
|
Tortoise Git
Tortoise Git provides settings to configure an external application to compare and merge files. Perform the following steps to configure TestStand File Diff and Merge utility to compare and merge TestStand sequence files.
Steps to follow
Prerequisites:
TestStand is installed and the Tools component was selected at the time of installation.
Note: If the Tools component was not installed, you can install the same by repairing TestStand through NI Package Manager, additionally select the Tools component and complete the repair.
1. Launch Settings dialog for Tortoise Git.
2. Configure an external tool to compare/merge TestStand sequence files using one of the following:
a. Using custom File Launcher tool attached in this KB as an external program:
i. Download the attached zip file and extract the contents to a desired folder (e.g. C:\ExtractedFolder).
ii. Copy the following files to ‘C:\Users\Public\Documents\National Instruments\GitExternalToolLauncher’
FileLauncher.*
fileExtensionToApplicationMapping.json
defaultGitClient.json
iii. For configuring Diff tool, click on Diff Viewer node and to configure Merge tool, click on Merge Tool node.
iv. Select the External option.
v. Click on the brows button (…) and select the file C:\Users\Public\Documents\National Instruments\GitExternalToolLauncher\FileLauncher.exe
vi. Provide the arguments to the external program as specified in Step 3.
b. Using diff/merge advanced settings for file extension based configuration:
i. For configuring Diff tool, click on Diff Viewer node and to configure Merge tool, click on Merge Tool node.
ii. Click on the Advanced… button to launch the Advanced settings dialog for diff or merge tool.
iii. Add a new entry for TestStand sequence files by clicking on the Add… button to launch the Edit extension specific program dialog.
iv. Enter ‘.seq’ for Extension and ‘C:\Program Files (x86)\National Instruments\Shared\TestStand\FileDifferLauncher.exe’ as the External Program.
v. Provide the arguments to the external program as specified in Step 3.
3. Provide the arguments to external program as:
for Diff: %mine %base
for Merge: %base %mine %theirs %merged
4. Click OK through the opened dialogs to complete setting custom external tools for Diff and Merge.
For details on Tortoise Git settings to configure external diff and merge tools, refer to https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html#tgit-dug-settings-progs
Atlassian Sourcetree
SourceTree provides option to configure custom external application as a tool to compare and merge files correspondingly. Perform the following steps to configure TestStand File Diff and Merge utility to compare and merge TestStand sequence files.
Steps to follow
Prerequisites:
TestStand is installed and the Tools component was selected at the time of installation.
Note: If the Tools component was not installed, you can install the same by repairing TestStand through NI Package Manager, additionally select the Tools component and complete the repair.
1. In Sourcetree, under the Tools menu, click on the Options menu item to open the Options dialog.
2. Click on the Diff tab to access the External Diff / Merge settings
3. From the drop down list, select Custom for External Diff Tool and Merge Tool.
4. Configure an external tool to compare/merge TestStand sequence files using one of the following:
a. Using TestStand File Diff and Merge Utility directly:
i. For the Diff and Merge Command fields, click on the brows button (…) and select the file C:\Program Files (x86)\National Instruments\Shared\TestStand\FileDifferLauncher.exe
b. Using the custom File Launcher tool attached in this KB:
i. Download the attached zip file and extract the contents to a desired folder (e.g. ‘C:\ExtractedFolder’).
ii. Copy the following files to ‘C:\Users\Public\Documents\National Instruments\GitExternalToolLauncher’
FileLauncher.*
fileExtensionToApplicationMapping.json
defaultGitClient.json
iii. For the Diff and Merge Command fields, click on the brows button (…) and select the file C:\Users\Public\Documents\National Instruments\GitExternalToolLauncher\FileLauncher.exe
5. Provide the arguments as:
for Diff: \"$LOCAL\" \"$REMOTE\"
for Merge: \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
6. Click OK to complete setting custom external tools for Diff and Merge.
1Git Kraken requires Git to be installed in the system for configuring Git Kraken to use external Diff and Merge tool globally.