Working with Snippets

dsClient Desktop not only produces dsTest XML documents, a large number of XML elements may be configured and saved as standalone XML Snippets. See this video on Working with Snippets.

A Snippet represents one element of a document and Snippets enable you to develop standard configurations that you can then plug into many documents or into higher level Snippets. The image to the right shows a small sample of the Snippets available. Generally speaking, any element that contains a significant amount of information - especially elements that are used in more than one place - can be saved as a Snippet.

Testing with multiple vendors? Build separate node configurations to vendor requirements and easily change from one to another in your test scenarios.

Need to change between subnets or physical interfaces? Build interface configurations for any available protocol with the appropriate addressing information and switch between them by choosing a different option from a selection list.

Testing policies or charging rules? Configure different subscriber databases or any of the profile Snippets and save them with names that clearly identify their purposes. In addition to the ease of swapping between configurations, you'll be able to easily identify how your subscribers are configured.

Have a standard subscriber database that you want to use in different test scenarios? Save the database as a separate Snippet and simply link it to each of your separate configuration files.

Have a standard SmartEvents state machine that you want to use in testing different vendor configurations? Save the state machine as a separate Snippet and link it to each vendor configuration file.

Writing dsTest XML with a script? You can generate dsTest XML from a Snippet just as you do from a Workspace and in this case can use the resulting XML as a template.

In addition to ensuring that common configurations are used in your testing, snippets allow you to make configuration changes that ripple through all of your scenarios rather than having to update each Workspace. A Snippet operates the same way as an include file. The configuration that employs a Snippet only refers to the Snippet file - the file is not accessed until dsTest XML is generated, ensuring that the contents are always up to date.

Linking to a Snippet

Special configuration settings appear wherever snippets may be used. In the example shown, a snippet has been selected to provision the Subscriber database.


When Use Library File is selected the selection list contains the library path and file name of every snippet in your library that is of the appropriate element type, and the View... button opens the selected file. The configuration contained in the snippet can be converted to a local configuration by selecting To Local Configuration.

When Configure Locally is selected, the Subscriber parameters are displayed and saved in the SPR node section. If you decide later that you'd like to use that configuration elsewhere, you can create a snippet with the Save As... button.

If the subject element has a "name" attribute a third option, Use Remote Configuration, is displayed. Select this option and enter the name value when one object - a subscriber database, for example - will be utilized by two or more parent objects. The name can refer to an object in the Workspace you are configuring or to the name of an object already running on your dsTest server.