Custom Error Messages in CITRUS Test Results

88 Views Asked by At

I want to use my custom error messages in my citrus test results. Example: Original Error Message: java.io.FileNotFoundException: D:\expectedOutput\Smaple.xml (The system cannot find the file specified).

Custom Message: Hey The File was not found in your directory Please check. (Need to print like this in my test results failure message).

Please check the image hereenter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

You can not change this message in particular as this is coming from the thrown Java exception. You could implement your own TestReporter and/or TestListener though to translate the error into something matching your needs.

Something like: https://citrusframework.org/samples/reporting/