OpenStudio measure interactive debugging
I am writing my OpenStudio measures and then testing them with some test code like shown in the writing openstudio measures guide.
Everything works fine but the time that the code takes to run can be up to 40 seconds, this means that debugging or testing can take a lot longer than it should.
Is it possible to set up the tests in an interactive environment where code snippets can be run one at a time? So that I only need to run the code that I want to test. Is this what Ruby mine does?
Has anyone done this? Any advice would be most appreciated!
40 seconds sounds like a long time for a measure to run unless it is a reporting measure that runs EnergyPlus or is doing sizing runs. If it is a reporting measure, you can configure the test to save the simulation results so the test can be re-run quickly. We do have a few model measures that can take that longer than a few seconds but only if they are doing more complex operations or are tested on very large models.
@DavidGoldWasser it is a modified form of the space and construction wizard and it is most certainly taking more than 40 seconds, isn't this to be expected when you are modifying an existing osm model? I've posted the code here:
and the test file can be seen here