Attachment Element
Aus ExpeccoWiki
An attachment allows managing any file together with a testsuite. These files will be packed and bundeled into the testsuite (which is technically a ZIP-file). Attachments are important, if test data sets or configuration files have to be managed together with the testsuite. They can also contain files which are meant for other users like documentation or specifications and explanations concerning test runs. All attachment will be unpacked in a project-specific directory when the testsuite is loaded under a separate "attachments" folder.
Therefore, an attachment's filename should consist of the base-filename only (i.e. do not use a full path). To get the full path of an attachment, use the "get-attachment-directory-path" block from the standard library, which returns the attachment path. Alternatively, simply drop the attachment itself into an activity diagram. This creates a UML-element which provides the path or contents in various formats at runtime (see the element's popup-menu item "output data representation").
Attachments can be added via drag and drop of any file into the expecco tree. They can be modified in the builtin attachment editor or by an external tool (Excel, Notepad etc.).
Use of Absolute Filenames
If an absolute path is given as filename, the underlying file is assumed to be generated by some other program (possibly on the fly, during execution). These files are considered "extern to expecco", and are not saved with the ".elf" file. Use this, to access configuration data which is supposed to be already installed on the testhost, or which is created dynamically, for example due to the execution of a supporting program.
Because absolute pathnames are considered harmful (you may forget to save/restore/install) them, the project tree's error-search function includes a "search-for-absolute attachments" checkbox, to search for such attachments.
URL Attachments
These attachments are fetched dynamically during execution time via an HTTP-Get request from the specified URL (other access methods may be added in future versions). A runtime error will be raised, if that file is no longer accessable. URL attachments are therefore somewhat dangerous: your test depends on another external resource. Therefore, it is recommended to fetch the URL once during test-development time, and to add it as a regular attachment to the test suite.
See Also
For other tree elements see: Tree Elements