TIA Portal CI/CD with GitLab
CI/CD for TIA Portal means versioning PLC code in Git and testing it automatically in a pipeline. With the tia-test-runner command-line tool, that runs in GitLab CI like any other build step.
The idea
Instead of manual acceptance on every change, the pipeline guards every change against regressions automatically. The building blocks in the pipeline are the same SCL unit tests you write locally — plain-text JSON files next to the project, versioned in Git.
Pipeline step
The runner runs headless and returns JUnit XML that GitLab shows as a test result:
plc-tests:
stage: test
script:
- tia-test-runner run --suite .tia-tests --report junit.xml
artifacts:
reports:
junit: junit.xml
GitLab then shows the results directly in the merge request — pass/fail per test case, without anyone opening TIA Portal.
Test only what changed
On large projects, --rerun-affected is the key: the runner runs only suites whose underlying block changed since the last run. That keeps the pipeline fast as the project grows.
PLCSIM in the pipeline
Tests run against PLCSIM Advanced — no physical hardware needed in the build, and the runs are reproducible. HTML reports and CSV trends can be stored as artifacts.
The end-to-end flow
CI/CD is the last link of the chain: AI generates → Openness imports → unit tests verify → Git and CI/CD track every change. Details on the TIA Portal CI/CD page.