Runner tries to instantiate abstract classes

Description

I posted this on Slack; didn't get any reaction. I can't see how it's not a bug, so raising it here.

I have an abstract base class for a couple of my test classes, and when I run my tests, the runner errors-out with:

Lucee 5.3.7.48 Error (application) Message you cannot instantiate an abstract component [/path/to/my/tests/SomeAbstractTestClass.cfc], this component can only be extended by other components

Obviously TestBox should only be loading implementation classes, not abstract ones.

Activity

Show:

Adam Cameron June 9, 2021 at 5:02 PM

Yeah I’ve raised a ticket with Lucee:

I guess all you can do ATM is what you say :-|

NB: it was easy to work around for me, so no urgency on this from my perspective.

Luis Majano June 9, 2021 at 3:25 PM

I get it. The question is HOW can I determine that it is an abstract class? There is nothing that denotes this but the exception itself. So if we want to avoid this error, should we ignore abstract classes by trying to instantiate and if we get an abstract issue, skip it?

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Priority

Sentry

Created June 9, 2021 at 7:47 AM
Updated June 16, 2021 at 3:53 PM
Resolved June 16, 2021 at 3:53 PM