Hello Community,
I would like to share a Unit Integration Framework project for B&R Automation Studio that helps build, execute, and visualize PLC unit/integration tests with a workflow similar to GoogleTest.
General information
What it is
A reusable test framework for Automation Studio projects that combines:
-
GoogleTest-like assertions/macros (
AWAIT,EXPECT,ASSERT) -
Auto-generation support for Unit Test setup from C test sources
-
XML report generation (with XSL styling for browser-friendly viewing)
-
mappView-based UI to run tests in Group or Single mode
Why this project
In many projects, setting up repeatable PLC tests is fragmented (manual setup, inconsistent asserts, no unified report view). This framework provides one consistent structure for:
-
authoring tests,
-
running them from runtime or visualization,
-
collecting readable reports for teams.
Main features
-
AutoGenerate workflow: optional pre-build PowerShell generation or manual batch trigger
-
Rich assert set: boolean, integer signed/unsigned, REAL/LREAL, STRING/WSTRING, NEAR/tolerance variants
-
Async test handling:
AWAIT_*with configurable timeout and abort behavior -
Structured test lifecycle:
TEST_SET,TEST_CASE, setup/teardown hooks -
Report pipeline: XML output +
style.xslformatting for browser viewing -
mappView dashboard: run configured suites sequentially, run single tests, monitor status and statistics
Quick start
-
Add tests using
TEST_SET/TEST_CASEand assertion macros. -
Enable auto-generation in pre-build, or run generation manually when needed.
-
Configure report FileDevice and keep
style.xslnext to generated XML. -
Run tests from mappView (GroupUIT/SingleUIT) or project flow.
-
Open report XML in Chrome (with file-access option enabled) for formatted results.
Example use cases
-
Regression checks for cyclic logic changes
-
Interface validation for function blocks with setup/teardown dependencies
-
CI-ready report artifacts (XML) for traceable pass/fail history
Downloads and links
-
Screenshots and examples are included in the project documentation


