Hello,
when I subclass Teststep, the subclass is not recognized as a Teststep in the Editor. Is this expected behavior?
Thanks in advance,
Tonny
Hello,
when I subclass Teststep, the subclass is not recognized as a Teststep in the Editor. Is this expected behavior?
Thanks in advance,
Tonny
Hi @tonnys, and welcome to the forum!
No, this is not expected behavior. Editor should recognize any public class which implements the ITestStep
interface, including arbitrary subclassing. Off the top of my head, here are the most likely reasons why your step might now show up:
public
– OpenTAP only scans public types when looking for plugins. unless the [assembly: PluginAssembly(true)]
attribute is used, in which case it also scans internal types.It could also be that the plugin was not loaded at all, but it is difficult for me to guess exactly what went wrong without looking at your screen
If this does not help you resolve the problem, could you please share a simple code example of what you are trying to do that doesn’t work?
Dear Alexander,
Thanks for your prompt answer. Somehow I started a class from scracth and it all worked, even without creating an empty constructor, which I hadn’t.
So issue solved and I know a bit more, thanks to you.
have a nice day,
Tonny
Hi @tonnys ,
I am happy to hear you got it to work.
Regarding the behavior you mentioned, if a class does not have an explicit constructor, a parameterless constructor is inserted by the compiler. Issues only arise when a constructor with parameters is explicitly added.
I hope this sheds some light on the situation