Friday, February 1, 2013

How to use application metadata for software test automation?


Metadata is commonly understood as data that describes data. An example of metadata is the product catalog of a company. Such a catalog contains additionally assigned attributes (i.e. related but extrinsic attributes) such as name, model, price and availability of products. Another example of metadata is the data within a meta tag of a web page. This metadata includes the description of the web page and keywords. This metadata is not used to generate the web page content but is used by search engines. Still another example of metadata is the details of a digital image such as title, width, height, resolution, camera used and so on. This metadata is used to search the image in an image library and also to modify the image as desired. In the same way, a deployed software application build has metadata.

Software test automation needs certain application metadata in order to execute. Such metadata data is perhaps the application URL or path to the executable file, valid users' credentials (user names and passwords) and their privilege levels, internal name of the application, application version, components released in the build, server addresses, application database name and application database user credentials. It is common for such data and more to be available in the application build release notes. It is also common for the release notes to be created using standard markups like HTML or XML. Now, if test automation is aware of the schema used in the release notes (i.e. which tag contains which data), it can query the release notes and extract the required data. Test automation can also store this data in the test database. This provides readily available data to run manual tests and also to generate test run reports. Auto population of application metadata in the database works well with automated software build systems which create regular application builds and the corresponding release notes. In such a case, test automation can wait for some notification or keep polling the network location for a new build. Whenever the new build is available, it can auto populate the application metadata and launch the build sanity test (or any other test per the automated test plan).

Until next time.

Image courtesy of fotographic1980 / FreeDigitalPhotos.net