Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net/ :Date: 2010-04-06 21:22
The test suite contains also scripting language which allows you to combine test cases into a test scenarios. On the lowest level, however the language is designed to allow you to describe the test by setting test parameters, test comments, identification and so on.
Let’s look at the example test description.
Short name@test-id-1;test-id-2: Short description for the test case { -loop = 10 -user-name = Frank # This is a comment which is ignored } >> Long, detailed description of the test case <<
Meaning of all elements:
Between an open curly bracket { and close one } you can put all the test case parameters you wish. The format for it is:
-parameter-name = value
Parameter names always start with '-'. Note, some parameters don’t need any value. They can exist on their own without any value assigned:
-debug-on-error
It works like you set "yes" or "true" for this parameter but you don’t set anything.
The scripting language includes also support for variables which can be assigned any value and used multiple times later on. You assign a value to the variable the same way as you assign it to the parameter:
$(variable-name) = value
The variable name must be always enclosed with brackets () and start with '$'.
The value may be enclosed within double quotes "" or double quotes may be omitted. If this is a simple string like a number or character string consisting only of digits, letters, underscore '_' and hyphen '-' then you can omit double quotes otherwise you must enclose the value.
The test case descriptions can be nested inside other test case descriptions. Nested test case descriptions inherit parameters and variables from outer test case description.