API ReferencecommontestFramework
JUnitXMLWriter Reference
Module defined in `lua/common/testFramework/JUnitXMLWriter.lua`. Writes test results in JUnit XML format for CI/CD integration.
Module defined in lua/common/testFramework/JUnitXMLWriter.lua. Writes test results in JUnit XML format for CI/CD integration.
Exports
Functions
JUnitXMLWriter.write(results, outputFile)
Write test results to a JUnit-compatible XML file.
- Parameters:
results- table - Test results table containing test suite data (pass/fail counts, individual test results with names, durations, failure messages)outputFile- string - File path to write the XML output
- Returns:
table- The JUnit XML writer instance
Internal Notes
- Uses SLAXML library for XML generation
- Module var is
JUnitXMLWriter(not standardM) - Output compatible with Jenkins, GitLab CI, and other JUnit XML consumers
testFramework/ - Unit Testing Framework
Simple unit test framework for BeamNG Lua code with JUnit XML output.
TestManager Reference
Module defined in `lua/common/testFramework/TestManager.lua`. Unit test manager for BeamNG - collects test functions, executes them, logs results, and outputs JUnit XML reports.