Skip to content

feat(tests): Unify e2e test runner and enable parallel ISO 15118 execution#1940

Open
Pietfried wants to merge 3 commits intomainfrom
tests/e2e/iso15118-parallelization
Open

feat(tests): Unify e2e test runner and enable parallel ISO 15118 execution#1940
Pietfried wants to merge 3 commits intomainfrom
tests/e2e/iso15118-parallelization

Conversation

@Pietfried
Copy link
Copy Markdown
Contributor

@Pietfried Pietfried commented Mar 11, 2026

Describe your changes

Replace per-suite shell scripts with a single tests/run-tests.sh entry point covering all test suites (core, framework, async, ocpp). CI workflows are updated to invoke the new run-tests.sh directly.

ISO 15118 tests are grouped via xdist_group("ISO15118") to prevent conflicts when running without network isolation. When veth pairs are available (created by the new setup-network-isolation.sh), the NetworkIsolationPlugin strips the group markers and assigns each xdist worker a dedicated interface, enabling fully parallel execution. The NetworkIsolationStrategy auto-injects the assigned interface into EVerest configs for ISO 15118 modules.

pytest configuration is consolidated into tests/pytest.ini, which is always selected via --config-file so that both the unified runner and direct pytest invocations use the same rootdir and option definitions.

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@Pietfried
Copy link
Copy Markdown
Contributor Author

EVerest/everest-ci#150 will allow container to execute ip link ... to create the veth pairs as part of the test orchestration.

@Pietfried Pietfried force-pushed the tests/e2e/iso15118-parallelization branch 2 times, most recently from b797f9d to a181f64 Compare March 16, 2026 15:33
@Pietfried Pietfried marked this pull request as ready for review March 16, 2026 15:33
@Pietfried Pietfried marked this pull request as draft March 16, 2026 15:36
@Pietfried Pietfried marked this pull request as ready for review March 17, 2026 08:37
Copy link
Copy Markdown
Contributor

@mlitre mlitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the small nits it looks good

# CTRL+C at the sudo prompt cancels it and falls back to sequential execution.
if "$SETUP_SCRIPT" setup "$WORKERS" 2>/dev/null; then
ISOLATION_FLAG="--network-isolation"
elif sudo "$SETUP_SCRIPT" setup "$WORKERS"; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably set the -n or else it might hang here right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its actually intentional for local developer use. The CI uses the non-sudo path that runs first. Its a bit fragile, which is why I added the comment above.

if not self._active:
return

stripped_count = 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this, you don't do anything with it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, removed it

Comment on lines +44 to +45
except ValueError:
pass
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should log something here or else we never know if there was an error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a log

"gcp": [Requirement("grid_connection_point", "external_limits")],
}
)
@pytest.mark.xdist_group(name="ISO15118")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed here? Isn't this basic charging

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, removed it

"gcp": [Requirement("grid_connection_point", "external_limits")],
}
)
@pytest.mark.xdist_group(name="ISO15118")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, removed it

@Pietfried Pietfried force-pushed the tests/e2e/iso15118-parallelization branch from a181f64 to 32131b2 Compare March 23, 2026 17:43
@Pietfried Pietfried requested a review from mlitre March 23, 2026 17:44
@Pietfried Pietfried force-pushed the tests/e2e/iso15118-parallelization branch 2 times, most recently from 0424d03 to 1ff0188 Compare March 24, 2026 15:44
Copy link
Copy Markdown
Contributor

@mlitre mlitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OCPP test most likely fails in the CI due to the strict timing so either we can put it in a serial run or relax the timing

from everest.testing.core_utils import EverestConfigAdjustmentStrategy

# Module types that use the `device` config field for ISO 15118 communication
ISO15118_MODULE_TYPES = frozenset({"EvseV2G", "Evse15118D20", "PyEvJosev"})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pietfried I think your missing the network isolation for the IsoMux module, so if you just do the following it should fix your issue.

Suggested change
ISO15118_MODULE_TYPES = frozenset({"EvseV2G", "Evse15118D20", "PyEvJosev"})
ISO15118_MODULE_TYPES = frozenset({"EvseV2G", "Evse15118D20", "IsoMux", "PyEvJosev"})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so too, but its unfortunately not that easy. IsoMux connects to the -2 and -20 modules via lo on ::1 so the tests would conflict. To address this we need to make the proxy device IsoMux connects to not hardcoded but configurable. @SebaLukas fyi
@mlitre @andistorm I am putting this back to draft and will potentially add a PR for IsoMux which can then be incorporated in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #2004

@Pietfried Pietfried marked this pull request as draft March 25, 2026 07:27
…ution

Replace per-suite shell scripts with a single tests/run-tests.sh entry
point covering all test suites (core, framework, async, ocpp). CI
workflows are updated to invoke run-tests.sh directly.

ISO 15118 tests are grouped via xdist_group("ISO15118") to prevent
conflicts when running without network isolation. When veth pairs are
available (created by the new setup-network-isolation.sh),
the NetworkIsolationPlugin strips the group markers and assigns
each xdist worker a dedicated interface, enabling fully parallel
execution. The NetworkIsolationStrategy auto-injects the assigned
interface into EVerest configs for ISO 15118 modules.

pytest configuration is consolidated into tests/pytest.ini, which is
always selected via --config-file so that both the unified runner and
direct pytest invocations use the same rootdir and option definitions.

Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
Co-authored-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
@Pietfried Pietfried force-pushed the tests/e2e/iso15118-parallelization branch from 1ff0188 to 59d5d0b Compare March 26, 2026 09:48
@Pietfried Pietfried marked this pull request as ready for review March 26, 2026 13:01
@mlitre mlitre self-requested a review March 26, 2026 14:54
@Pietfried Pietfried enabled auto-merge March 26, 2026 15:06
@Pietfried Pietfried requested a review from andistorm March 26, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants