tcunit / TcUnit

An unit testing framework for Beckhoff's TwinCAT 3
Other
271 stars 74 forks source link

Timed Testing in multiple testsuites #113

Closed Aliazzzz closed 4 years ago

Aliazzzz commented 4 years ago

Hi,

Could somebody post a small and working timed tests in multiple testsuites example? I bet some of us have some small sample laying around (?)

Thank you kindly in advance and I hope to hear from you all ;-)

Roald87 commented 4 years ago

I'm not sure if I understand what you mean. Can you elaborate a bit? Do you mean how long the execution took for each test suite or all test suites combined? And do you mean including the activation time of the project? Also what is the purpose?

Aliazzzz commented 4 years ago

question in short; If you have testsuites that are time constrained or state dependent, would you like to post some unit test examples (ways of tackling such issues) ? Thank you kindly in advance!

purpose; Usually a software project can contain one or several function block which have a state machine implemented or are in a way time constrained or even both. To test such a FB we can choose to implement a timed test. Such test software can be implemented in various ways, there is no right or wrong for it. Currently I have seen just a 1 (a single) approach for of a timed test. However, I'd like to see more approaches (different approaches) to timed/state tests so we can offer a variety of solutions to such usecases.

Roald87 commented 4 years ago

You mean how to solve #54?

Aliazzzz commented 4 years ago

If you have testsuites that are time constrained or state dependent, would you like to post some unit test examples (ways of tackling such issues) ? Thank you kindly in advance!

sagatowski commented 4 years ago

You have one example here: https://tcunit.org/frequently-asked-questions/?Display_FAQ=703

I-Campbell commented 4 years ago

VAR_INST for variables in methods that you want to keep static. builds on sagatowski's linked FAQ 703 https://infosys.beckhoff.com/content/1033/tc3_plc_intro/9007201783539083.html

Aliazzzz commented 4 years ago

Thanks for the anwsers, the question is resolved.