-
Notifications
You must be signed in to change notification settings - Fork 13
Running Tests
Nicholas Long edited this page Aug 5, 2022
·
5 revisions
There are three stages of tests: unit tests, docker-based simulation tests, and integration tests. To run the tests, first run the following commands, then jump to the section of interest below.
- Install Docker Desktop for your platform
- Install Poetry:
pip install poetry
- Install dependencies:
poetry install
- Run unit tests:
poetry run pytest
-
Run docker dev stack locally (in detached mode)
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d
-
Call Modelica tests
docker exec alfalfa_worker bash -c "cd /alfalfa && pytest -m docker tests/jobs/modelica"
-
Call OpenStudio tests:
docker exec alfalfa_worker bash -c "cd /alfalfa && pytest -m docker tests/jobs/openstudio"
-
Clean up stack:
docker-compose down
- Run stack locally in detached mode:
docker-compose up --build -d
- Run integration tests:
poetry run pytest -m "integration"
- Clean up stack:
docker-compose down
- Getting Started with Model Measures Part 1: Creating Inputs and Outputs
- Getting Started with Model Measures Part 2: Creating Actuators
- Getting Started with EnergyPlus Measures Part 1: Creating Inputs and Outputs
- Getting Started with EnergyPlus Measures Part 2: Creating Actuators
- How to Configure an OpenStudio Model
- How to Configure Measures for Use with Alfalfa Ruby Gem
- How to Create Inputs and Outputs With Measures
- How to Run URBANopt Output Models in Alfalfa
- How to Migrate EnergyPlus Python Plugins
- How to Integrate Python based Electric Vehicle Models with OpenStudio Workflows
- How to Locally Test OpenStudio Models
- Required Structure of OpenStudio Workflow
- List of Automatically Generated Energyplus Points
- Alfalfa EnergyPlus Mixin Methods
- Getting Started with Uploading and Running a Model Using Python
- Getting Started with Uploading and Running a Model Using the UI
- How to Install Alfalfa Client
- How to Preprocess and Upload a Model
- How to Step Through a Simulation
- How to View Historical Data in Grafana
- How to Configure an Alias
- How to Troubleshoot Models