Serializer Plugin to Remove Embedded Properties

Hi,

I’ve developed some plugins with an attached property that attaches to test steps. When I save the test plan with this plugin installed a test step’s name is changed to emb:MarkedForOperator:OpenTap.Plugins.BasicSteps.DelayStep .

When we move the test plan to another system without that plugin installed, it can’t read the type of the test step and removes it from the test plan.

I want to safely remove the embedded type from the test step. I developed a serializer plugin to remove the “emb:MarkedForOperator:” string, but i am not sure if it is a safe way to do it. For example, if there are other plugins that provides attached properties to test steps, it may change the type name. Thus, removing only that string makes it meaningless.

Is there any better way to achieve this?

Hi @btyilmaz, for this kind of thing I’d use a XML serializer plugin as well, it should be pretty safe. You can implement it in a way that destructively modifies the XDocument object and then just returns false.

1 Like

I tried to remove the “MarkedForOperator:” part only and it worked. My concern was messing up the other embedded types but this way it will only remove the error that my plugin causes.

Thanks for the help :slight_smile: