TcUnit icon indicating copy to clipboard operation
TcUnit copied to clipboard

Creating my own I_TestResultLogger

Open doerk77 opened this issue 3 years ago • 1 comments

In v1.2.1.0 injection of a custom I_TestResultLogger is pretty much impossible. I tried to implement my own XML publisher that allows customizing the file name, but I came across a few issues:

  • Extending FB_xUnitXmlPublisher doesn't help since the reference to the file path is in the private method DeleteOpenWriteClose which I cannot overwrite.
    • I could rewrite LogTestSuiteResults to call my own method, but it would be better to have the file path in a separate variable instead of referencing the parameter in the method. This variable should be pointing to the corresponding parameter "xUnitFilePath" as default.
    • Moreover, it would be better to make DeleteOpenWriteClose a protected method and not INTERNAL.
  • Method LogTestSuiteResults is calling AdsMessageQueue.WriteLog() which is an internal method and thereby cannot be accessed from my own implementation. Why isn't this a public method? It's just adding another log entry.

doerk77 avatar Jun 13 '22 12:06 doerk77

There is a library parameter to set the file name that FB_xUnitXmlPublisher uses

iadonkey avatar Nov 20 '23 17:11 iadonkey