spl2-testing-framework 1.3.0__tar.gz → 1.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/PKG-INFO +10 -1
  2. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/README.md +10 -1
  3. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/pyproject.toml +12 -13
  4. spl2_testing_framework-1.5.0/spl2_testing_framework/__init__.py +13 -0
  5. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/conftest.py +22 -13
  6. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/launch_remotely_spl2.py +11 -12
  7. spl2_testing_framework-1.5.0/spl2_testing_framework/logger_manager.py +25 -0
  8. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/single_spl2_file_runner.py +11 -12
  9. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/test_runner.py +11 -12
  10. spl2_testing_framework-1.5.0/spl2_testing_framework/tools/__init__.py +13 -0
  11. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/create_diff_sheet.py +11 -12
  12. spl2_testing_framework-1.5.0/spl2_testing_framework/tools/jobs/__init__.py +13 -0
  13. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/jobs/cli_job.py +22 -13
  14. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/jobs/cloud_job.py +11 -12
  15. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/jobs/job.py +11 -12
  16. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/jobs/splunk_job.py +11 -12
  17. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/jobs/test_cloud_job.py +11 -12
  18. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/performance.py +11 -12
  19. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/results.py +59 -12
  20. spl2_testing_framework-1.5.0/spl2_testing_framework/tools/search_clients/__init__.py +13 -0
  21. spl2_testing_framework-1.5.0/spl2_testing_framework/tools/search_clients/cli_search_client.py +109 -0
  22. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/search_clients/cloud_search_client.py +10 -25
  23. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/search_clients/search_client.py +10 -25
  24. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/search_clients/splunk_search_client.py +10 -25
  25. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/spl2test_runner.py +57 -14
  26. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/test_discovery.py +11 -12
  27. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/test_types.py +11 -12
  28. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/tools/utils.py +11 -12
  29. spl2_testing_framework-1.3.0/spl2_testing_framework/__init__.py +0 -15
  30. spl2_testing_framework-1.3.0/spl2_testing_framework/logger_manager.py +0 -26
  31. spl2_testing_framework-1.3.0/spl2_testing_framework/tools/__init__.py +0 -15
  32. spl2_testing_framework-1.3.0/spl2_testing_framework/tools/jobs/__init__.py +0 -15
  33. spl2_testing_framework-1.3.0/spl2_testing_framework/tools/search_clients/__init__.py +0 -28
  34. spl2_testing_framework-1.3.0/spl2_testing_framework/tools/search_clients/cli_search_client.py +0 -87
  35. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/LICENSE +0 -0
  36. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/pytest.ini.sample +0 -0
  37. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/spl2_test_config.json +0 -0
  38. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/spl2_utils/assertions.spl2 +0 -0
  39. {spl2_testing_framework-1.3.0 → spl2_testing_framework-1.5.0}/spl2_testing_framework/spl2_utils/logs_to_metrics.spl2 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spl2-testing-framework
3
- Version: 1.3.0
3
+ Version: 1.5.0
4
4
  Summary: SPL2 Testing Framework
5
5
  Home-page: https://github.com/splunk/spl2-testing-framework
6
6
  Keywords: SPL2 testing framework
@@ -131,7 +131,9 @@ It is possible to pass more options to the command, which works also with pytest
131
131
  Additionally, the following options are supported:
132
132
 
133
133
  * `--ignore_empty_strings` - to ignore empty strings in the results
134
+ * `--ignore_additional_fields_in_actual` - to ignore fields present in actual results but not in expected results (useful when actual results contain extra fields that should not affect comparison)
134
135
  * `--create_comparison_sheet` - to create a comparison sheet in `comparison_box_test` folder using actual and expected outputs (works only when running box tests)
136
+ * `--cli_bench` - when running tests with CLI, this option enables benchmarking mode by adding `-b` and `-n` flags to the spl2-processor-cli command. The value specifies the number of events to test (e.g., `--cli_bench=1000` will add `-b -n 1000` to the CLI command). **In bench mode, all tests always succeed and CLI output is printed to logs** - this is useful for performance testing and benchmarking. This is only applicable when using `--type cli`.
135
137
 
136
138
  Note: The `pytest.ini.sample` file allows you to define command parameters. Just update the configurations, rename the
137
139
  file by removing the `.sample` extension, and execute the command.
@@ -203,3 +205,10 @@ Content of this file will also be printed to stdout.
203
205
 
204
206
  This checks can be applied only to box tests, as assertions which are used in unit tests may impact spl2 pipeline
205
207
  performance.
208
+
209
+ ## Format all files
210
+ To format all files, run:
211
+
212
+ ```bash
213
+ black spl2_testing_framework tests
214
+ ```
@@ -99,7 +99,9 @@ It is possible to pass more options to the command, which works also with pytest
99
99
  Additionally, the following options are supported:
100
100
 
101
101
  * `--ignore_empty_strings` - to ignore empty strings in the results
102
+ * `--ignore_additional_fields_in_actual` - to ignore fields present in actual results but not in expected results (useful when actual results contain extra fields that should not affect comparison)
102
103
  * `--create_comparison_sheet` - to create a comparison sheet in `comparison_box_test` folder using actual and expected outputs (works only when running box tests)
104
+ * `--cli_bench` - when running tests with CLI, this option enables benchmarking mode by adding `-b` and `-n` flags to the spl2-processor-cli command. The value specifies the number of events to test (e.g., `--cli_bench=1000` will add `-b -n 1000` to the CLI command). **In bench mode, all tests always succeed and CLI output is printed to logs** - this is useful for performance testing and benchmarking. This is only applicable when using `--type cli`.
103
105
 
104
106
  Note: The `pytest.ini.sample` file allows you to define command parameters. Just update the configurations, rename the
105
107
  file by removing the `.sample` extension, and execute the command.
@@ -170,4 +172,11 @@ command ("|")
170
172
  Content of this file will also be printed to stdout.
171
173
 
172
174
  This checks can be applied only to box tests, as assertions which are used in unit tests may impact spl2 pipeline
173
- performance.
175
+ performance.
176
+
177
+ ## Format all files
178
+ To format all files, run:
179
+
180
+ ```bash
181
+ black spl2_testing_framework tests
182
+ ```
@@ -1,22 +1,21 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  [tool.poetry]
18
17
  name = "spl2-testing-framework"
19
- version = "1.3.0"
18
+ version = "1.5.0"
20
19
  description = "SPL2 Testing Framework"
21
20
  authors = ["mgazda-splunk <mgazda@splunk.com>"]
22
21
  readme = "README.md"
@@ -0,0 +1,13 @@
1
+ # Copyright 2026 Splunk Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import json
18
17
  import os
@@ -47,11 +46,13 @@ BOX_TEST = "box_test"
47
46
  SINGLE_SPL2_FILE = "single_spl2_file"
48
47
 
49
48
  IGNORE_EMPTY_STRINGS = "ignore_empty_strings"
49
+ IGNORE_ADDITIONAL_FIELDS_IN_ACTUAL = "ignore_additional_fields_in_actual"
50
50
  CREATE_COMPARISON_SHEET = "create_comparison_sheet"
51
51
  PERFORMANCE_CHECK = "performance_check"
52
52
  TEST_TYPE = "type"
53
53
  TEST_DIR = "test_dir"
54
54
  LIMIT_TESTS = "limit_tests"
55
+ CLI_BENCH = "cli_bench"
55
56
 
56
57
  import logging
57
58
 
@@ -76,7 +77,9 @@ def pytest_addoption(parser):
76
77
  parser.addoption("--sample_delimiter", action="store", default="\n")
77
78
  parser.addoption(f"--{CREATE_COMPARISON_SHEET}", action="store_true", default=False)
78
79
  parser.addoption(f"--{IGNORE_EMPTY_STRINGS}", action="store_true")
80
+ parser.addoption(f"--{IGNORE_ADDITIONAL_FIELDS_IN_ACTUAL}", action="store_true")
79
81
  parser.addoption(f"--{LIMIT_TESTS}", action="store", type=int, default=None)
82
+ parser.addoption(f"--{CLI_BENCH}", action="store", type=int, default=None)
80
83
 
81
84
 
82
85
  def pytest_generate_tests(metafunc):
@@ -145,7 +148,8 @@ def spl2_test_runner(
145
148
  url = f"{config['host']}:{config['port']}"
146
149
  search_client = SplunkSearchClient(url=url, auth=basic_authentication)
147
150
  elif test_type == "cli":
148
- search_client = CLISearchClient()
151
+ cli_bench = run_configurations.get(CLI_BENCH)
152
+ search_client = CLISearchClient(cli_bench=cli_bench)
149
153
  elif test_type == "cloud":
150
154
  url = f"https://{config['tenant']}.api.{config['cloud_instance']}/{config['tenant']}"
151
155
  search_client = CloudSearchClient(url=url, auth=bearer_token_authentication)
@@ -167,6 +171,7 @@ def run_configurations(request):
167
171
  CREATE_COMPARISON_SHEET: request.config.getoption(
168
172
  f"--{CREATE_COMPARISON_SHEET}"
169
173
  ),
174
+ CLI_BENCH: request.config.getoption(f"--{CLI_BENCH}"),
170
175
  }
171
176
 
172
177
 
@@ -249,3 +254,7 @@ def bearer_token_authentication(config):
249
254
  def _set_results_options(metafunc):
250
255
  ignore_empty_strings = metafunc.config.getoption(IGNORE_EMPTY_STRINGS)
251
256
  Results._ignore_empty_strings = ignore_empty_strings
257
+ ignore_fields_in_actual = metafunc.config.getoption(
258
+ IGNORE_ADDITIONAL_FIELDS_IN_ACTUAL
259
+ )
260
+ Results._ignore_additional_fields_in_actual = ignore_fields_in_actual
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import argparse
18
17
  import json
@@ -0,0 +1,25 @@
1
+ # Copyright 2026 Splunk Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ import logging
17
+
18
+
19
+ def setup_logging():
20
+ logging.basicConfig(
21
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
22
+ handlers=[
23
+ logging.FileHandler("spl2_testing_framework.log"),
24
+ ],
25
+ )
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import argparse
18
17
  import logging
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import argparse
18
17
  import sys
@@ -0,0 +1,13 @@
1
+ # Copyright 2026 Splunk Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import pandas as pd
18
17
  from openpyxl import load_workbook
@@ -0,0 +1,13 @@
1
+ # Copyright 2026 Splunk Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  from .job import Job
18
17
 
@@ -51,10 +50,16 @@ class CLISimpleJob(Job):
51
50
  """A job that is executed on CLI in box tests."""
52
51
 
53
52
  def __init__(
54
- self, source: str, code_module_name: str, code_module_content, test_name
53
+ self,
54
+ source: str,
55
+ code_module_name: str,
56
+ code_module_content,
57
+ test_name,
58
+ cli_bench=None,
55
59
  ):
56
60
  code_module_content += f"\n$source = from {str(source)};"
57
61
  super().__init__("", code_module_name, code_module_content, test_name)
62
+ self.cli_bench = cli_bench
58
63
 
59
64
  def create(self) -> "CLISimpleJob":
60
65
  """Creates a job. To run the job use run_job() method."""
@@ -62,6 +67,10 @@ class CLISimpleJob(Job):
62
67
  cli = "spl2-processor-cli"
63
68
  command = [cli, "test", "-s", "pipeline"]
64
69
 
70
+ # Add bench parameters if cli_bench is specified
71
+ if self.cli_bench is not None:
72
+ command.extend(["-b", "-n", str(self.cli_bench)])
73
+
65
74
  input_data = "\n\n".join(
66
75
  [
67
76
  self.commands_module,
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  from requests import Response
18
17
 
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  from requests import Response
18
17
 
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  from requests import Response
18
17
 
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import unittest
18
17
  from unittest.mock import MagicMock
@@ -1,18 +1,17 @@
1
+ # Copyright 2026 Splunk Inc.
1
2
  #
2
- # Copyright 2025 Splunk Inc.
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
3
6
  #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
7
+ # http://www.apache.org/licenses/LICENSE-2.0
15
8
  #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
16
15
 
17
16
  import logging
18
17
  import os