This software extends BOPTEST to a web service architecture, which enables support for multiple clients and multiple simultaneous tests at a large scale. This is a containerized design that can be deployed on a personal computer, however the software is targeted at commercial cloud computing environments such as AWS. For details about BOPTEST, refer to the project homepage.
The canonical BOPTEST source code is incorporated into this repository as a git subtree located at <project-root>/boptest
and used under the terms of the license located at <project-root>/boptest/license.md
.
BOPTEST-Service is a sibling of Alfalfa, which follows the same architecture, but adopts a more general purpose API to support interactive building simulation, whereas the BOPTEST API is designed around predetermined test scenarios.
flowchart LR
A[API Client] <--> B[Web Frontend]
subgraph cloud [Cloud Deployment]
B <--> C[(Message Broker)]
C <--> D[Worker 1]
C <--> E[Worker 2]
C <--> F[Worker N]
subgraph workers [Worker Pool]
D
E
F
end
end
A simple demonstration of using the BOPTEST API is available in this interactive tutorial. This tutorial leverages a publicly available deployment of BOPTEST-Service, which can be reached at https://api.boptest.net.
The core BOPTEST APIs are documented as part of the upstream BOPTEST project. The BOPTEST-Service defines a number of APIs on top of BOPTEST for the purpose of managing test cases and running tests.
Description | Request |
---|---|
List official BOPTEST test cases. | GET testcases |
List unofficial test cases in a namespace. | GET testcases/{namespace} |
List private user test cases. (Auth required) | GET users/{username}/testcases/ |
Select a test case and begin a new test. (Auth optional) | POST testcases/{testcase_name}/select |
Select a test case from the namespace and begin a new test. (Auth optional) | POST testcases/{namespace}/{testcase_name}/select |
Select a private user test case and begin a new test. (Auth required) | POST users/{username}/testcases/{testcase_name}/select |
Get test status as Running or Queued |
GET status/{testid} |
Stop a queued or running test. | PUT stop/{testid} |
List tests for a user. (Auth required) | GET users/{username}/tests |
The family of the select
APIs are used to choose a test case and begin a running test. Select returns a testid
which is required by all APIs that interact with the test or provide test information.
An OpenAI-Gym environment for BOPTEST is available.
- Clone this repository.
git clone https://github.com/NREL/boptest-service.git
-
Install Docker.
-
Use Docker to build and run BOPTEST-Service.
docker compose up web worker provision
-
In a separate process, use the core BOPTEST APIs as well as BOPTEST-service APIs to interact with the test case using your test controller.
-
Shutdown the test case by the command
docker compose down
executed in the root directory of this repository.
NREL maintains a helm chart for Kubernetes based deployments of BOPTEST-Service.
Testing is based on the BOPTEST test suite with small adaptations to conform to the BOPTEST-Service API. Follow the README for more information.
Development is tracked by three branches within the project repository.
develop
maintains the latest stable version of the project.main
tracks the latest release version and corresponds to the current production deployment on https://api.boptest.net. A tag is also created for each release version.experimental
is for versions of the project under evaluation and corresponds to a deployment on the "dev" cluster at https://api.dev.boptest.net.