Home

aliazzz hermsen i-campbell
There is a newer version of this page. You can find it here.




co♻e: A unittest framework for CODESYS

Highlights | Tour | Download | Getting Started | Automated test runs | Resources | FAQ | Acknowledgements


Motivated by absence of a 'good and free' open source IEC61131-3 unit-testing solution. Developed in Structured-Text for any CODESYS based system, MIT-licensed.
Forked with kind permission by Jakob Sagatowski from TcUnit for TwinCAT3.

Highlights

Easy Powerful Free
1. Download Increase productivity Open-Source
2. Install Stimulate re-usability MIT-Licensed
3. Reference Reduce bugs Well documented
4. Ready! Cleaner code Large user community

Notable Differences

TcUnit co♻e
1. Targets Beckhoff systems Targets any compatible CODESYS based system, including Beckhoff
2. Uses bespoke C# runner Uses CODESYS IDE built-in Python scripting technology as runner
3. Uses ADS protocol to collect reports from TwinCAT XAE IDE Generates XML reports at runtime at a specified location on PLC filesystem or (networked) drive

Tour

1/2 Easy Installation: package installer

2/2 Excellent Integration: E.g Jenkins or another platform of choice

Download

The package contains all components in a convenient single installer. By downloading and using our software you abide by the MIT License

Download v1.2.0.0 Package


Or download via these links or browse via the repo and download yourself
repo v1.2.0.0

co♻e.library
Verifier.project
Simple Example.project
Timed Test.project
Timed Test2.project
Run In Sequence Test Example.project
license.txt

Previous version(s)
repo

Getting started

A step by step tutorial to get started with a co♻e unit testing example project can be found here.

Automated test runs

It's possible to integrate all your co♻e tests into a CI/CD software toolchain like Jenkins or Azure DevOps.
Pre-integrated into the CForge CI/CD backend (beta phase), for details read here
With the aid of extra software such as Jenkins or Azure DevOps, you can have your tests run automatically and collect test statistics every time something has changed in your software version control (like Git or Subversion).

If you want to know more, please follow the steps laid out in the following documentation;
* Starting Scripts from the Command Line Interface
* Using the Command-Line Interface
* Option --runscript (run script)
* Creating a Python Script

Resources

Userlist
If you have an interesting project in which you use the framework we can mention you.
A shortlist with users of the co♻e framework can be found here.

Wiki
The online API reference wiki can be found here.

Tutorial
A tutorial can be found here.

Code
The code repository can be found here.

Bugs
Any found bugs can be reported here.

FAQ

Any questions? You can browse them here.
Posted questions will be moderated into the FAQ for future reference.

Acknowledgements

We are passionate software developers who develop & maintain co♻e in our spare time.
CODESYS fully supports us in our efforts by providing a free and open source platform for everybody to use.

Forked with kind permission by Jakob Sagatowski from TcUnit for TwinCAT3.

Assistance provided by @aliazzz, @ingo and @i-campbell greatly appreciated.
Without their assistance, porting alone would have taken me several months.
Kudos for helping me out with various tickets and providing invaluable feedback!