Menu

Repeated Tests in VTS scripts

2013-04-29
2013-05-28
  • Nikola Jelic

    Nikola Jelic - 2013-04-29

    Is there a way to run a set of tests repeatedly? For example, I've made some tests, but I want this script to be executed hundreds of times. One way is to copy the code of the script 100 times, but I would like to use a more elegant solution, if possible. Is there some kind of loop operator for VTS script?

    thanks in advance

     
  • John Hartman

    John Hartman - 2013-05-13

    Unfortunately, the VTS scripting language currently has no loop constructs.  Would be a nice feature, though, and probably easier to add that some of the OTHER things that VTS scripting lacks (functions, general-purpose variables…)

    You can sometimes put your test in one script, and then INCLUDE that multiple times from another.  Ugly and not very flexible, but perhaps better than having to modify all 100 repetitions…

    Or you could get the source and ADD looping (and earn our eternal gratitude…)

     
  • Joel Bender

    Joel Bender - 2013-05-13

    It was my intent to completely replace the scripting language VTS inherited from 2.0 world with Python.  I never got there.

    https://sourceforge.net/tracker/?func=detail&aid=444253&group_id=27326&atid=390008

    I'm no the only one, according to another thread:

    After writing a number of scripts, we realized that the scripting engine needed enhanced, and so BACnet International funded a Python based scripting engine that would make writing the tests easier and the testing more complete.  That product became BITS, and it has yet to be released by BACnet International.

    If I do get back around to this, it will be based on BACpypes and some forward/backward chaining rules engine like PyKE, or something similar.

     
  • Nikola Jelic

    Nikola Jelic - 2013-05-14

    @johnhartman: I would be more than happy to add functionalities to VTS, but I would need some guidance through the code. Is there someone who can help me with that?
    @joelbender: Python is a logical choice for BACnet, but BACpypes is almost forgotten and ill-documented. Source could be used for something more serious, but the lack of proper documentation is a pain.

     
  • Joel Bender

    Joel Bender - 2013-05-14

    …but BACpypes is almost forgotten and ill-documented.

    I would take issue with the forgotten part, all be it a very small community, and accepting that its my project :-).  But your ill-documented point is correct, which I hope to remedy.

     
  • Nikola Jelic

    Nikola Jelic - 2013-05-15

    @joelbender: I meant no disrespect to you, or BACpypes project..

     
  • Joel Bender

    Joel Bender - 2013-05-15

    @nikolla-jelic: No disrespect implied or taken.  If I want the BACpypes project to be an integral part of a future BACnet test shell, and I want the response to a proposal to do that to be "of course, it's awesome", then I had better get the documentation in order first!

     

Log in to post a comment.