diff --git a/.github/workflows/test_and_docs.yml b/.github/workflows/test_and_docs.yml index ad27a1fcb00..6017213b8d7 100644 --- a/.github/workflows/test_and_docs.yml +++ b/.github/workflows/test_and_docs.yml @@ -68,6 +68,9 @@ jobs: - name: Execute Unit Tests with Coverage Analysis run: | python ./scripts/quality_runners.py + - name: Execute Feature Integration Tests + run: | + bazel test //feature_integration_tests/test_cases:fit - name: Publish build summary if: always() run: | diff --git a/bazel_common/score_python.MODULE.bazel b/bazel_common/score_python.MODULE.bazel index 08ceadcd674..b59a4efb120 100644 --- a/bazel_common/score_python.MODULE.bazel +++ b/bazel_common/score_python.MODULE.bazel @@ -22,7 +22,7 @@ python.toolchain( python_version = PYTHON_VERSION, ) -pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True) +pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") pip.parse( hub_name = "pip_score_venv_test", python_version = PYTHON_VERSION, diff --git a/feature_integration_tests/test_cases/BUILD b/feature_integration_tests/test_cases/BUILD index a845e016941..40cc724aa51 100644 --- a/feature_integration_tests/test_cases/BUILD +++ b/feature_integration_tests/test_cases/BUILD @@ -12,7 +12,7 @@ # ******************************************************************************* load("@pip_score_venv_test//:requirements.bzl", "all_requirements") load("@rules_python//python:pip.bzl", "compile_pip_requirements") -load("@score_tooling//python_basics:defs.bzl", "score_py_pytest", "score_virtualenv") +load("@score_tooling//python_basics:defs.bzl", "score_py_pytest") # In order to update the requirements, change the `requirements.txt` file and run: # `bazel run //feature_integration_tests/python_test_cases:requirements.update`. @@ -31,31 +31,24 @@ compile_pip_requirements( ], ) -score_virtualenv( - name = "python_tc_venv", - reqs = all_requirements, - venv_name = ".python_tc_venv", -) - # Tests targets score_py_pytest( name = "fit", srcs = glob(["tests/**/*.py"]) + [ - "conftest.py", - "fit_scenario.py", - "test_properties.py", ], args = [ "--traces=all", "--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_test_scenarios)", ], data = [ - ":python_tc_venv", + "conftest.py", + "fit_scenario.py", + "test_properties.py", "//feature_integration_tests/test_scenarios/rust:rust_test_scenarios", ], env = { "RUST_BACKTRACE": "1", }, - pytest_config = ":pytest.ini", + pytest_config = "//:pyproject.toml", deps = all_requirements, ) diff --git a/feature_integration_tests/test_cases/pytest.ini b/feature_integration_tests/test_cases/pytest.ini deleted file mode 100644 index 801c0a4304e..00000000000 --- a/feature_integration_tests/test_cases/pytest.ini +++ /dev/null @@ -1,15 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2026 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* -[pytest] -addopts = -v -testpaths = tests diff --git a/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py b/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py index d22276baf16..0dff3149527 100644 --- a/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py +++ b/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py @@ -22,7 +22,7 @@ @add_test_properties( - partially_verifies=["feat_req__persistency__persistency"], + partially_verifies=["feat_req__persistency__store_data"], test_type="requirements-based", derivation_technique="requirements-analysis", ) diff --git a/pyproject.toml b/pyproject.toml index 6b8b4dba378..469533f41bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,24 @@ [tool.pytest] +addopts = ["-v"] pythonpath = [ ".", "scripts/tooling", + "feature_integration_tests/test_cases" +] +testpaths = [ + "scripts/tooling/tests", + "feature_integration_tests/test_cases/tests" +] +junit_log_passing_tests = true +junit_family = "xunit1" +markers = [ + "metadata", + "test_properties(dict): Add custom properties to test XML output", +] +filterwarnings = [ + 'ignore:record_property is incompatible with junit_family:pytest.PytestWarning', + 'ignore:record_xml_attribute is an experimental feature:pytest.PytestExperimentalApiWarning', ] -testpaths = ["scripts/tooling/tests"] [tool.ruff] # Exclude a variety of commonly ignored directories.