Assets and Resources

LegiTest ›› Overview ››
Parent Previous Next


Assets and Resources


Two key concepts in LegiTest are Assets and Resources.

Assets


Assets are items that are created at design time and used at runtime. So, for example, you might have a query or a reference to an SSIS package. These items are configured when you are creating test suites and used when the test suites run. There are many different types of asset available in LegiTest and you can read about those in the Assets section. Assets can also use parameters - so you may want to configure a connection string using the parameter system. Note that parameters are evaluated at the point that the asset is used.

Resources


Resources are items that are available only at runtime. So, for example, when you execute a query you may get a result back which you wish to compare. Resources are referred to by their 'resource key' which is a string that uniquely identifies that resource. Resources are usually loaded by actions (the exception being data driven testing) and can be referenced by other actions or assertions. You can view dependent elements for any element - which shows the elements that follow and use the resource(s) generated.


When data driven testing is being used - additional resources are available - one for each column of data used as the data source. For more information on this, please see the data driven testing section.


Resources can also be used in place of parameters by elements that follow them. So, for example, an execute scalar query might get back a resource called 'CutOffDate' - a query might then follow where the query is defined similarly to:


SELECT OrderId FROM Orders WHERE OrderDate > '{{CutOffDate}}'


Because parameters are evaluated when an asset is used, the resource 'CutOffDate' would be included in the query and used as a filter.