-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPP E2E tests #959
OCPP E2E tests #959
Changes from 53 commits
440c250
c672c2d
ebeeff2
c4d48a5
be0da67
19a39f7
5d81f88
96b770e
c251c54
657b0a7
6342aa6
7be00a8
22c716f
dd409e7
31db428
9841b66
b1a1580
2f993d5
025857d
a7a45f7
dd8f38e
2a82c2f
0301363
bf9b6cc
3eefd2b
251ce15
8ef308b
547cab9
307540e
fc9b597
a294248
8ea0a36
15ad26e
b790fcf
4a94dd6
9e6ee63
ae6295a
caea306
f0b4d49
55b3597
dc2bb38
c351560
343a550
c7fc75f
339258a
fc0a6b7
9f7f021
2b1a45f
752d281
1f5ed0b
63fcdca
98ae4b4
be2190a
f804a48
3121548
42d0b54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
rsync -a "$EXT_MOUNT/source/tests" ./ | ||
retVal=$? | ||
|
||
if [ $retVal -ne 0 ]; then | ||
echo "Failed to copy tests" | ||
exit $retVal | ||
fi | ||
|
||
pip install --break-system-packages \ | ||
"$EXT_MOUNT"/wheels/everestpy-*.whl \ | ||
"$EXT_MOUNT"/wheels/everest_testing-*.whl \ | ||
"$EXT_MOUNT"/wheels/iso15118-*.whl \ | ||
pytest-html | ||
retVal=$? | ||
|
||
if [ $retVal -ne 0 ]; then | ||
echo "Failed to pip-install" | ||
exit $retVal | ||
fi | ||
|
||
pip install --break-system-packages -r tests/ocpp_tests/requirements.txt | ||
|
||
$(cd ./tests/ocpp_tests/test_sets/everest-aux/ && ./install_certs.sh "$EXT_MOUNT/dist" && ./install_configs.sh "$EXT_MOUNT/dist") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
cd tests | ||
|
||
PARALLEL_TESTS=$(nproc) | ||
|
||
echo "Running $PARALLEL_TESTS ocpp tests in parallel" | ||
|
||
pytest \ | ||
-rA \ | ||
-d --tx "$PARALLEL_TESTS"*popen//python=python3 \ | ||
--max-worker-restart=0 \ | ||
--timeout=300 \ | ||
--junitxml="$EXT_MOUNT/ocpp-tests-result.xml" \ | ||
--html="$EXT_MOUNT/ocpp-tests-report.html" \ | ||
--self-contained-html \ | ||
ocpp_tests/test_sets/ocpp16/*.py \ | ||
ocpp_tests/test_sets/ocpp201/*.py \ | ||
--everest-prefix "$EXT_MOUNT/dist" | ||
retVal=$? | ||
|
||
if [ $retVal -ne 0 ]; then | ||
echo "OCPP tests failed with return code $retVal" | ||
exit $retVal | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build | ||
__pycache__ | ||
*.egg-info | ||
.pytest_cache | ||
.venv | ||
results.xml | ||
result.xml | ||
report.html | ||
**/.DS_Store | ||
**/.idea |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# OCPP Integration Tests | ||
|
||
This directory contains some test tooling and integration tests | ||
for OCPP1.6 and OCPP2.0.1. | ||
|
||
## Requirements | ||
|
||
In order to run the integration tests, you need to have everest-core compiled | ||
and installed on your system. | ||
|
||
Make sure to also install the python requirements | ||
for running the test cases using | ||
|
||
```bash | ||
python3 -m pip install -r requirements.txt | ||
``` | ||
|
||
## Run the tests | ||
|
||
You can run the integration tests using the convenience scripts | ||
provided in this directory e.g. | ||
|
||
```bash | ||
./run-testing.sh | ||
``` | ||
|
||
This command runs all test cases in parallel. | ||
The time for running the test cases depends on your system. | ||
It usually takes a couple of minutes. | ||
You can check out the test results by opening the generated `results.html`. | ||
|
||
You can choose to run the tests sequentially and/or only run subsets | ||
for OCPP1.6 or OCPP2.0.1 using any of the other run scripts. | ||
|
||
Alternatively, you can run individual test sets or test cases using | ||
|
||
```bash | ||
python3 -m pytest test_sets/ocpp201/remote_control.py \ | ||
--everest-prefix <path-to-everest-core-installation-directory> \ | ||
-k 'test_F01_F02_F03' | ||
``` | ||
|
||
e.g. | ||
|
||
```bash | ||
python3 -m pytest test_sets/ocpp201/remote_control.py \ | ||
--everest-prefix ~/checkout/everest-core/build/dist \ | ||
-k 'test_F01_F02_F03' | ||
``` | ||
|
||
This runs test case `test_F01_F02_F03` | ||
specified in `test_sets/ocpp201/remote_control.py`. | ||
|
||
If you run the test cases individually, | ||
make sure to have all required certificates and configs | ||
for the test cases installed using the | ||
convenience scripts inside [test_sets/everest/aux](test_sets/everest-aux/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not clear to me where this everest-aux directory is. It is not in test_sets. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is in |
||
|
||
```bash | ||
./install_certs <path-to-everest-core-installation-directory> | ||
./install_configs <path-to-everest-core-installation-directory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to point to released version of everest-utils not a commit on a branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EVerest/everest-utils#167