Menu

Automated Function Block Testing

Developers
kush
2015-03-18
2015-03-19
  • kush

    kush - 2015-03-18

    Hello,

    Apart from FBTester which is great for manually testing function blocks, are there any automated frameworks for unit testing function blocks?

    Sincerely
    Kush

     
  • Zoitl Alois

    Zoitl Alois - 2015-03-18

    Hi,

    In the left part of FBTester there is a list where you can store test sequences which can be all executed at once with the play button. However I haven't used it so far.

    Than there is the FBTest which will take test cases given as service sequence diagrams and automatically executes them. An example how test-cases have to be written can be found in the E_CTU FB.

    However both methods do not allow to automatically or remotely (e.g., Jenkins) trigger the execution of tests for a full set of FBs. We have some ideas how both approaches could be combined and also how to integrate it with a CI server. But we hadn't had the time. Support here would be greatly appriciated.

    Finnaly we have a further means which is integrated in the unit-test suite of FORTE. We have a small Unit-Test Framework for FBs where you can write your unit tests in C++. Examples for this can be found in the FORTE directory /tests/stdfblib. These tests will be executed with all other unit tests of FORTE. And can also be executed on your device. Here we have some ideas how to generate these unit-tests out of the tests in the IDE. But before that the C++ test framework needs some improvements.

    I hope this helps.
    Sincerely,
    Alois

     
  • kush

    kush - 2015-03-19

    Hello Dr. Alios,

    Thank you very much of the reply.

    I feel that the approach of using C++ for unit testing and executing as part of the FORTE testing would be suitable for my requirements.

    I'll take a look at the examples in /tests/stdfblib and revert if I have any questions.

    Thank you once again for your response and assistance.

    Sincerely
    Kush

     
  • Zoitl Alois

    Zoitl Alois - 2015-03-19

    Hi,

    looking forward to your comments. Please be aware that I want to improve this implementation. Currently I see the following two main critical points:

    • Too much output when tests pass
    • Too little use of boost test for the FB test cases