3 short-description: GstValidate test file
6 # GstValidate Test file
8 A `.validatetest` file describes a fully contained validate test case. It
9 includes the arguments of the tool supposed to be used to run the test as well
10 as possibly a [configuration](gst-validate-config.md) and a set of action to
11 describe the validate [scenario](gst-validate-scenarios.md).
15 A validate test file requires a `meta` structure which contains the same
16 information as the [scenario](gst-validate-scenarios.md) `meta` with some
17 additional fields described below. The `meta` structure should be either the
18 first or the one following the `set-globals` structure. The `set-globals`
19 structures allows you to set global variables for the rest of the
20 `.validatetest` file and is a free form variables setter. For example you can
24 set-globals, media_dir=$(test_dir)/../../media
29 In the case of [`gst-validate`](gst-validate.md) it **has to** contain an
30 `args` field with `gst-validate` argv arguments like:
33 # This is the default tool so it is not mandatory for the `gst-validate` tool
34 tool = "gst-validate-$(gst_api_version)",
36 # pipeline description
37 videotestrc num-buffers=2 ! $(videosink),
38 # Random extra argument
39 --set-media-info $(test-dir)/some.media_info
45 The `configs` field is an array of structures containing the same content as
46 usual [configs](gst-validate-config.md) files.
52 # Set videotestsrc0 pattern value to `blue`
53 "core, action=set-property, target-element-name=videotestsrc0, property-name=pattern, property-value=blue",
54 "$(validateflow), pad=sink1:sink, caps-properties={ width, height };",
58 Note: Since this is GstStructure synthax, we need to have the structures in the
59 array as strings/within quotes.
63 The `expected-issues` field is an array of `expected-issue` structures containing
64 information about issues to expect (which can be known bugs or not).
66 Use `gst-validate-1.0 --print-issue-types` to print information about all issue types.
72 "expected-issue, issue-id=scenario::not-ended",
76 Note: Since this is GstStructure synthax, we need to have the structures in the
77 array as strings/within quotes.
81 * `issue-id`: (string): Issue ID - Mandatory if `summary` is not provided.
82 * `summary`: (string): Summary - Mandatory if `issue-id` is not provided.
83 * `details`: Regex string to match the issue details `detected-on`: (string):
84 The name of the element the issue happened on `level`: (string):
86 * `sometimes`: (boolean): Default: `false` - Wheteher the issue happens only
87 sometimes if `false` and the issue doesn't happen, an error will
89 * `issue-url`: (string): The url of the issue in the bug tracker if the issue is
96 Validate testfile will define some variables to make those files relocable:
98 * `$(test_dir)`: The directory where the `.validatetest` file is in.
100 * `$(test_name)`: The name of the test file (without extension).
102 * `$(test_name_dir)`: The name of the test directory (test_name with folder
103 separator instead of `.`).
105 * `$(validateflow)`: The validateflow structure name with the default/right
106 values for the `expectations-dir` and `actual-results-dir`
107 fields. See [validateflow](gst-validate-flow.md) for more
110 * `$(videosink)`: The GStreamer videosink to use if the test can work with
111 different sinks for the video. It allows the tool to use
112 fakesinks when the user doesn't want to have visual feedback
115 * `$(audiosink)`: The GStreamer audiosink to use if the test can work with
116 different sinks for the audio. It allows the tool to use
117 fakesinks when the user doesn't want to have audio feedback