- Notifications
You must be signed in to change notification settings - Fork35
Description
When running the code coverage on the application I'm testing, an error occurs when attempting to set the printer during a print attempt. This issue only happens when the application is run with code coverage enabled.
To provide more detail, the problem occurs in the method from the Vcl.Printers library, specifically in the procedure TPrinter.BeginDoc. The issue arises when executing SetState(TPrinterState.psHandleDC);. The error message returned is: "Printer selected is not valid."
I start the code coverage using a batch file, passing the necessary parameters. I suspect that the issue may be related to the command prompt not recognizing the default printer when running the application in this instance.
I would appreciate assistance with this situation. Is there any configuration or parameter that I should set for the code coverage to resolve this problem?
Thank you.