-
Notifications
You must be signed in to change notification settings - Fork 508
Introduce integration tests #3319
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
Open
parapluplu
wants to merge
3
commits into
OpenEMS:develop
Choose a base branch
from
parapluplu:hackathon2025/integration_tests
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Introduce integration tests #3319
parapluplu
wants to merge
3
commits into
OpenEMS:develop
from
parapluplu:hackathon2025/integration_tests
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (12.50%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #3319 +/- ##
=============================================
- Coverage 59.53% 59.50% -0.03%
Complexity 113 113
=============================================
Files 2765 2767 +2
Lines 119513 119541 +28
Branches 8892 8892
=============================================
- Hits 71142 71119 -23
- Misses 45697 45748 +51
Partials 2674 2674 🚀 New features to boost your workflow:
|
ed9e655
to
fb32b0b
Compare
For testing it's helpful to set production/consumption data externally via channel updates. This controller adds this feature Testing: ``` > curl -d '{"value":6000000}' http://admin:admin@localhost:8084/rest/channel/simulateConsumption/Data {} > curl http://admin:admin@localhost:8084/rest/channel/_sum/ConsumptionActivePower {"address":"_sum/ConsumptionActivePower","type":"INTEGER","accessMode":"RO","text":"","unit":"W","value":6000000} > curl -d '{"value":1}' http://admin:admin@localhost:8084/rest/channel/simulateConsumption/Data {} > curl http://admin:admin@localhost:8084/rest/channel/_sum/ConsumptionActivePower {"address":"_sum/ConsumptionActivePower","type":"INTEGER","accessMode":"RO","text":"","unit":"W","value":1} ```
Currently the dis/charge limit was based on the capacity. With this change it's configurable. Testing: Executed `java -jar build/openems-edge.jar` and configured simulated ess with custom dis/charge limits and verified them via using the fixed state of charge controller
Adds a folder integration_tests that enables us to execute integration tests. The framework automatically spins up an openems edge instance before each test, loads desired configuration files and executes the test. More infos about how to use the integration tests are in the integration_tests/README.md file. Testing: run the following once you full filled the requirements mentioned in `integration_tests/README.md` ``` poetry run pytest > poetry run pytest ============================================================================================= test session starts ============================================================================================== platform win32 -- Python 3.12.10, pytest-8.4.1, pluggy-1.6.0 rootdir: C:\Users\FelixRemmel\development\original_openems\integration_tests configfile: pyproject.toml collected 6 items openems_integration_tests\tests\edge\ems\power_solver\test_keep_all_equals.py .. [ 33%] openems_integration_tests\tests\edge\ems\test_channel_priorities.py .. [ 66%] openems_integration_tests\tests\edge\ems\test_smoke_tests.py . [ 83%] tests\ems_test.py . [100%] ======================================================================================== 6 passed in 223.65s (0:03:43) ========================================================================================= ```
fb32b0b
to
211dc57
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull requests adds a folder
integration_tests
that enables us to execute integration tests. The framework automatically spins up an openems edge instance before each test, loads desired configuration files and executes the test.More infos about how to use the integration tests are in the
integration_tests/README.md
file.Prerequisites of this pull request are two other pull requests. For now they are included as commit in here, but since these are changes in OpenEMS components I think it makes sense to review them separately. Once they are merged I'll remove them from this pull request
#3314
#3313