Sequence File Translators
- Updated2025-03-28
- 2 minute(s) read
TestStand uses custom sequence file translators to load test description files saved in a custom format, such as text or XML. The translator reads the contents of the custom sequence file, translates the content to a TestStand sequence file, and opens the TestStand sequence file in the TestStand Sequence Editor or a TestStand User Interface. A custom sequence file translator can use predefined step types to simplify the mapping of common operations the custom file format defines to TestStand steps in sequence files.
Within the sequence editor or user interface, you can perform all typical operations TestStand sequence files support, such as executing and debugging sequences, diffing files, adding custom sequence files to workspaces, and deploying custom sequence files. However, you cannot automatically save changes you make to the sequence file in the sequence editor or user interface back to the custom sequence file format. You must make all changes to the custom sequence file directly.
You can create sequence file translators in various development environments, use versioning schemes with custom files, and deploy translators with TestStand. Refer to the <TestStand Public>\Examples\Fundamentals\Sequence File Translators - Examples directory for example custom sequence files and translators.
Sequence File Translator Functions
A TestStand sequence file translator DLL must export and implement the following C callback functions. When a translator DLL does not export all the callback functions, TestStand does not load the DLL.
- CanTranslate
- GetDescription
- GetExtension
- GetFileFormatVersion
- GetFileVersion
- GetTranslatorCount
- IsCurrentFileVersion
- TranslateToSequenceFile
Error Handling
Each callback function contains three parameters for error handling—an error code, an error string, and the maximum length for the error string. When an error occurs within a callback function, set the error code to a non-zero value. When the value you assign is a TestStand error code, TestStand uses the standard error code description. The callback function can copy additional error details to the standard error message string. However, the callback must not exceed the specified number of bytes for the maximum length for the error message. TestStand uses the error message string the callback function specifies.