Skip to content
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

Write tests for all new MMvIB app extensions #78

Open
18 tasks
redekok opened this issue Feb 17, 2023 · 1 comment
Open
18 tasks

Write tests for all new MMvIB app extensions #78

redekok opened this issue Feb 17, 2023 · 1 comment
Assignees
Labels

Comments

@redekok
Copy link

redekok commented Feb 17, 2023

Below you can find an overview of all the tests I could think of (so far) and the required fixtures (ESDL files). @Charlottevm it would be great if you could create the fixtures and push those to the mmvib-tests branch. And feel free to add tests and fixtures to this list!

test_esdl_to_scenario_converter.py

  • Test if the app can calculate ETM inputs for different fixtures
    • Fixture representing the macro case
    • Fixture representing the meso case
    • Fixture representing the micro case
  • Test what happens when no (top) area is specified
    • Fixture without area ID
  • Test what happens when no date instance is specified
    • Fixture without date instance

test_scenario_to_esdl_converter.py

  • Test ...
    • Fixture ...

test_range_handler.py

  • Test if a range is added when there is none specified for the asset yet
    • Fixture with an asset (either volatile or flexible) without a range
  • Test if the range is updated when it yet includes one
    • Fixture with an asset (either volatile or flexible) with a range
  • Test if the range is updated when it includes one without attributeReference="power" being specified
    • Fixture with an asset (either volatile or flexible) with a range but without attributeReference="power"

test_cost_handler.py

  • Test ...
    • Fixture ...
@Charlottevm
Copy link

Charlottevm commented Apr 19, 2023

Macro

export_scenario

Test range:

  1. Test min < max or min = max
  2. Test if range is added to all relevant assets (whether range is present or not present in original esdl)
  3. Test if power is deleted when range is added (for correct assets)

Test assets (smr, electrolyzer, pv, wind, mobility demand):

  1. Test if attributes flh, power (range) and marginal costs have been changed for all production and conversion assets (whether attribute is present or not present in original esdl)
  2. Test if attributes flh, power and full load hours have been changed (whether attribute is present or not present in original esdl)

create_scenario

Test assets (smr, electrolyzer, pv, wind):

  1. Test if slider is set when asset is present in esdl
  2. Test if power is given but no flh are present, power should be set
  3. Test if power is not given but asset is present, slider is set to zero

Meso

export_scenario

Test filter:

  1. Test if only the cost of the carrier electricity are added / changed
  2. Test if carrier (or asset) given in filter is present in esdl, otherwise give warning message

Test kpi's:

  1. Test if kpi's are added if not present
  2. Test if kpi's are changed when present

Micro

create_with_context

Test assets (pv, wind, battery, heatpump, heat mix buildings):

  1. Test if slider has been changed if asset
  2. Test if area is within scenario area
  3. Test if assets change is expected by compairing if both delta's are positves or negative

Notifying @redekok, @noracato if you have any other tests you would like to see let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants