Hi, I have a unittest and I want to send the result to Slack as email.
It works but formatting is bad due to missing EOL.
How it looks in Slack:
======================================= Attracs DUnitX Test Results ======================================= Test Run Date/Time: 2025-10-31 05:38:04 Test Statistics: ----------------------------------- Total Tests: 170 Passed: 156 Failed: 0 Errors: 0 Ignored: 14 Memory Leaks: 0 Duration: 350,325 seconds Success Rate: 91,8% Overall Result: ----------------------------------- ✓ ALL TESTS PASSED =======================================![]()
My implementation:
The testproject save result to a separate textfile UnitTestResult.txt
The file like this:
=======================================
Attracs DUnitX Test Results
Test Run Date/Time: 2025-10-31 05:38:04
Test Statistics:
Total Tests: 170
Passed: 156
Failed: 0
Errors: 0
Ignored: 14
Memory Leaks: 0
Duration: 350,325 seconds
Success Rate: 91,8%
Overall Result:
✓ ALL TESTS PASSED
=======================================![]()
I have an action Read text file that read in the file to a variable.
The variable is then included en email body to Slack. But EOL is lost.
Is there a better way to do this ?