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

Issue22 testing #28

Merged
merged 30 commits into from
Feb 25, 2019
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b50498f
Initial implementation.
dhblum Jan 30, 2019
4e4d1f8
Add readme.
dhblum Jan 30, 2019
76e9cc2
Add detach option.
dhblum Jan 30, 2019
240e980
Use detach option in test.
dhblum Jan 30, 2019
08cbb52
Update README.md
dhblum Jan 30, 2019
d064911
Update README.md
dhblum Jan 30, 2019
b175346
Add tests for parser.
dhblum Jan 30, 2019
5d8d341
Add tests for compiling testcase1 and testcase2 models.
dhblum Jan 30, 2019
638c7ec
Update README.md
dhblum Jan 30, 2019
df1ee14
Merge branch 'master' into issue22_testing
dhblum Feb 12, 2019
852a1ca
Make functions.
dhblum Feb 13, 2019
2ca8f52
Add test suite.
dhblum Feb 13, 2019
9dc39d0
Make function with plotting optional.
dhblum Feb 13, 2019
9240694
Add python test suites and some reference results.
dhblum Feb 13, 2019
1387d25
Collapse testing into one directory and abstract API tests.
dhblum Feb 14, 2019
6a2df41
Add trajectory reference checking for testcase1 and 2.
dhblum Feb 14, 2019
302c6b9
Update testing for parser.
dhblum Feb 14, 2019
fe3e004
Add test report generation.
dhblum Feb 14, 2019
9efffa6
Edit deployment detach option.
dhblum Feb 14, 2019
0ff3d54
Save report to file.
dhblum Feb 15, 2019
6db1742
Make sure test file path is relative.
dhblum Feb 16, 2019
5027414
Change function to get test file name.
dhblum Feb 21, 2019
8e9d237
Merge master.
dhblum Feb 21, 2019
a708b90
Pass existing unit tests with updated kpi parsing.
dhblum Feb 21, 2019
fc18160
Clean up .json from testing directory.
dhblum Feb 21, 2019
0449302
Add tests for kpi parsing.
dhblum Feb 21, 2019
2afa727
Merge branch 'master' into issue22_testing
dhblum Feb 21, 2019
bb272fc
Update testing readmes.
dhblum Feb 21, 2019
d8189ae
Rename example controllers.
dhblum Feb 25, 2019
ff609bd
Add exit code to unittest reporting.
dhblum Feb 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add detach option.
  • Loading branch information
dhblum committed Jan 30, 2019
commit 76e9cc2e9bdb7094d0f1ad3f8fc78f85e9d7fa6e
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,17 +11,19 @@ that is being developed as part of the IBPSA Project 1 (https://ibpsa.github.io/
- ``\template`` contains template Modelica code for a test case emulator model.

## Run Prototype Test Cases
1) Build the test case by ``$ TESTCASE=testcase# make build`` where # is the number of the test case to build.
2) Deploy the test case by ``$ TESTCASE=testcase# make run`` where # is the number of the test case that has been built.
1) Build the test case image by ``$ TESTCASE=testcase# make build`` where # is the number of the test case to build.
2) Deploy the test case container by ``$ TESTCASE=testcase# DETACH=false make run`` where # is the number of the test case that has been built.
3) In a seperate process, use the test case API defined below to interact with the test case.
4) Run an example controller test:

- For testcase1, in a separate terminal use ``$ python examples/twoday-p.py`` to test a simple proportional feedback controller on the test case over a two-day period.
- For testcase2, in a separate terminal use ``$ python examples/szvav-sup.py`` to test a simple supervisory controller on the test case over a two-day period.

5) Shutdown test case container by slecting container terminal window and ``Ctrl+C`` to close port, ``Ctrl+D`` to exit docker container.
6) Remove the test case image by ``$ TESTCASE=testcase# make remove-image``.

## Test Case RESTful API
- To interact, send RESTful requests to: ``http://127.0.0.1:5000/<request>``
- To shutdown: ``Ctrl+C`` to close port, ``Ctrl+D`` to exit docker container.

Example RESTful interaction:

2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ IMG_NAME=boptest_${TESTCASE}

COMMAND_RUN=docker run \
--name ${IMG_NAME} \
--detach=true \
--detach=${DETACH} \
--rm \
-it \
-p 127.0.0.1:5000:5000 \