A Context is a core concept in the BaselineTest approach. A Context is defines an environment, arguments, and input data files that are inherited by any Suite that references it. The "name" of a context is derived from the directory it lives in. For example, let's say we have a "simple" context folder with a context.xml in it.
The reason we don't name the XML file after the context is that we can put data files in the context as well, and the suites and test cases can reference (i.e. share) them.
An example context.xml is shown below:
<!-- A TestContext is used to setup the execution environment for an entire TestSuite. In general, a TestContext can also be reused across many different TestSuites. The appropriate level of detail in a context or set of related contexts could be a configurable resource such as a database, a webserver, etc. --> <context> <!-- Every Context can define a single "environment" element that lists a set of environment variables to be defined for every Suite that is executed under this Context. In the current implementation, each arg under an environment is set as a Java System Property before the Suite is executed. --> <environment> <!-- Each "arg" is a single argument that will be used to initialize a Java System Property. An "arg" requires a "name" attribute and a "Parsed Character DATA" section between its start and end tags. All of these arguments will be Strings. --> </environment> <!-- Every Context can also define a set of read-only arguments. These will be shared among all Suites that run under this Context. Every arg requires a "name" attribute and a "Parsed Character DATA" section between its start and end tags. There is an optional "type" attribute that can be used to specify the data type. Currently supported types include: String Boolean Short Integer Long --> <arguments> <!-- context-level arguments. --> </arguments> </context>