The ability to control which testcases should be included in a specific run is important. The ability to code a single testcase to cover different requirements avoids duplication and deduces maintenance costs. Here are some considerations for subsetting testcases:
GINT provides mechanisms to mark testcases for different subsets and run tests to include or exclude testcases based on subsets. Subsetting can be done statically (declared) or dynamically (determined by script logic). In continuous integration (CI) and other automated environments, dynamic subsetting can be used to prevent external factors from failing test runs unnecessarily. Other automation can report directly on the failing external conditions and notify the appropriate people.GINT uses the term level. Each testcase has a level value that defaults to 1. The following Parameters and Functions control the interaction with the testcase level and what testcases are run.
The following functions are available to test scripts:
Test script dynamically figures out the tests to be included.
Test script needs the database configuration provided as a testcase parameter or property in order to run this testcase. The level in this case is a simple boolean - true to include, false to exclude.
By default, a test run will only run testcases with level less than or equal to 1. Anything higher will be deferred. So identifying long running tests makes it possible for quick turn around times on most tests and allow for nightly or special request testing to cover all tests. Specify a parameter of -Dlevel=9 to include the long running test. The meaning of level numbers is test defined.