TcUnit | An unit testing framework for Beckhoff 's TwinCAT | Unit Testing library
kandi X-RAY | TcUnit Summary
kandi X-RAY | TcUnit Summary
Welcome to the documentation TcUnit - an xUnit testing framework for Beckhoff's TwinCAT3. What is test driven development and unit testing? Familiarize yourself with the basic concepts and specifics for TcUnit. Want to know how to get started? Read the user guide. Want to see a more advanced programming example? Read the programming example. Want to download a precompiled version of the library? Go to the releases. Want to include TcUnit tests into a CI/CD pipeline? Check out the TcUnit-Runner project. Want to contribute to the project? That's fantastic! But please read the CONTRIBUTING first. Have any questions? Found a bug or want to discuss an idea? Check the F.A.Q. Check the open and closed issues. If your issue does not already exist, create a new. For general ideas/discussions, use the discussions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TcUnit
TcUnit Key Features
TcUnit Examples and Code Snippets
Community Discussions
Trending Discussions on TcUnit
QUESTION
I made a custom function block which uses FB_XmlSrvRead
and FB_XmlSrvWrite
from the Tc2_TcXmlDataSrv library, to read and write an xml file. The functionality of the custom function blocks are tested with the TcUnit library. After moving the unit tests to a new project, only the tests which used the either a xml read or write failed, but other unit tests in the new project still worked.
The xml function blocks reported the following error:
Error code Name Description 1808 ADSERR_DEVICE_SYMBOLNOTFOUND Symbol not found.I tried to write different symbols, but each time it failed. I'm quite sure the symbols exist.
...ANSWER
Answered 2021-Feb-19 at 10:44It turned out that I had added {attribute 'hide'}
above the program which I used to execute the unit tests. Somehow this caused only the unit tests which needed to read or write an xml file to fail. Other unit tests were not affected.
QUESTION
I have created a testing project to run unit tests using TCunit framework and wanted to link files from development project worked by another colleague.
But there is only Add option when i right click on POU folder in solution explorer of TwinCAT.
When i did so, a copy of a file is made in testing project POU folder. Now I have two copies of same file i.e. in POU folder in testing project and POU folder in development project.
The problem i want is avoid is , if there are changes in the development project files i need to update POU folder in the testing project also manually.
Is there any solution to avoid the duplication?
ANSWER
Answered 2020-Feb-10 at 13:43You could create a library from your development project and reference it in yout Unit Testing project.
By right-clicking on the development project you can select "Save as Library". Once the library is generated you can install the library using the library manager and install the file.
Finally in your unit test project you can add this library by right clicking on the References and choosing the library you just installed.
Unfortunately this still requries to manually update your libray when there are changes but is a somewhat cleaner solution.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TcUnit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page