Using a Source Code Control System to Deploy Test Systems

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Source code control (SCC) systems use a database to store multiple versions of files and can prevent changes from accidentally overwriting other changes. An SCC client application provides a way for users to retrieve files from or submit files to the database. You can also use the SCC client application to synchronize a set of files to retrieve the most recent versions of the files or to retrieve previous versions of the files.

In a typical SCC test system deployment architecture, you use the deployment utility to create a deployable image and submit the generated and modified files to the database on the SCC server, and test station computers retrieve the files from the SCC server. You can submit changes at any time without affecting the test system because test station computers do not receive the changes until requested. Because SCC systems use local copies of the files on test station computers, the test system can continue operation during a network outage. However, because network outages can affect SCC-based deployment mechanisms during an update, you can synchronize files to a temporary directory on the test station computer to avoid a partial update of the test system.

Additionally, you must determine when test station computers synchronize to the updated files on the SCC server. For example, a user interface can ensure that the test system has not loaded any sequences and then synchronize files at startup or before loading sequence files to automatically retrieve the most recent versions of the files.

When you use an SCC system to deploy test systems, confirm that you understand the conditions under which the SCC system overwrites files. For example, an SCC system might not automatically overwrite writeable files or files that are checked out by another user. In this case, you might need to revert the changes and force-synchronize writeable files before you update the files to include changes you make.

Note Note  When you create a patch deployment and select Included in the File Status control of the File Properties tab on the Distributed Files tab of the TestStand Deployment Utility, the deployment utility includes the file in the deployable image even if the file is unmodified. If the SCC system you use allows you to check in unmodified files, the next time you synchronize the file, the SCC system might overwrite any changes you made to the file on disk.

You can use the following techniques with an SCC-based deployment mechanism:

  • Configure the SCC system to retrieve only the files you modified since the last time you retrieved files on the test station computer, which can increase performance over slower networks.
  • Use branching features of the SCC system to concurrently develop multiple versions of a single test system because you can merge changes to large numbers of files between branches. For example, you can use a legacy system branch for bug fixes only and another branch for development tasks.
  • Use separate branches for developing test systems and for storing validated test systems you deployed to test station computers, which can be helpful for separating the development and validation processes but can complicate the update process.

Advantages

Using an SCC system offers the following advantages:

  • Deployment and update tasks scale well if you use a large number of test station computers because each test station computer can retrieve the most recently modified files from a central location.
  • Test station computers use local copies of files from the SCC server to ensure test system operation during network outages.
  • Submitting modified files does not affect executing test systems because test station computers receive changes only when requested.
  • You can synchronize to previous versions of a test system if required.
  • You can install files in TestStand directories, such as the <TestStand Application Data>\Cfg directory, the <TestStand Public> directory, and the <TestStand> directory.
  • You can create a deployment without having specific knowledge of Microsoft Windows Installer technology.
  • You can efficiently perform small updates to the deployment. The size of the files changed determines the size of the update, which does not require a large, fixed, overhead size.

Disadvantages

Using an SCC system presents the following disadvantages:

  • Designing an update process that manages network outages and avoids race conditions requires additional development time. However, using an SCC system to develop an update process typically is more straightforward than developing an update process based on a network drive.
  • The test station computer site requires a network infrastructure of required hardware, IT resources for maintenance, and SCC administration resources.
  • Copying files to a test station computer is not sufficient for the test system to function correctly because you must also run installers on the test station computer to correctly install the SCC client application, the TestStand Runtime, National Instruments components, and required third-party components.
  • Because the source control system stores a copy of all the versions of all the files in the test system, the disk space the source control server uses could become very large.

Using a Source Control System to Deploy Patches

You can use the deployment utility to create a patch deployable image that contains all files modified since the previous full or patch deployment and add the files in the patch deployable image to the source control server, replacing existing files if required. The test station computers can synchronize with the source control server to retrieve the patched version of the deployment.

Note Note  The deployment utility creates cumulative patch deployable images. Files deleted from the deployment remain on the test station computer. If you want to remove these files from the test system, you must manually remove them from the source control server. Use the Status Log on the Build Status tab of the deployment utility to determine which files were removed from the test system.

WAS THIS ARTICLE HELPFUL?

Not Helpful