# Subclass Teststep

**URL:** <https://forum.opentap.io/t/subclass-teststep/2317>\
**Category:** Technical\
**Created:** [January 18, 2025, 11:00am UTC](https://forum.opentap.io/t/subclass-teststep/2317 "2025-01-18T11:00:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonnys](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@tonnys](https://forum.opentap.io/u/tonnys)\
**Post date:** [January 18, 2025, 11:00am UTC](https://forum.opentap.io/t/subclass-teststep/2317/1 "2025-01-18T11:00:02Z")

</div>

Hello,

when I subclass Teststep, the subclass is not recognized as a Teststep in the Editor. Is this expected behavior?

Thanks in advance,  
Tonny

---

<div class="post-metadata">

**Author:** ![alexander.larsen](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@alexander.larsen](https://forum.opentap.io/u/alexander.larsen)\
**Post date:** [January 20, 2025, 9:12am UTC](https://forum.opentap.io/t/subclass-teststep/2317/2 "2025-01-20T09:12:06Z")

</div>

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:

1. The class is not `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.
2. The test step does not have an empty constructor – If a class requires arguments to instantiate, OpenTAP does not know how, or even attempt to construct it. Constructors where all arguments have default values are not considered empty constructors.

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?

---

<div class="post-metadata">

**Author:** ![tonnys](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@tonnys](https://forum.opentap.io/u/tonnys)\
**Post date:** [January 20, 2025, 3:29pm UTC](https://forum.opentap.io/t/subclass-teststep/2317/3 "2025-01-20T15:29:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alexander.larsen](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@alexander.larsen](https://forum.opentap.io/u/alexander.larsen)\
**Post date:** [January 20, 2025, 4:16pm UTC](https://forum.opentap.io/t/subclass-teststep/2317/4 "2025-01-20T16:16:21Z")

</div>

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 🙂
