Hi,
I have been developing a plugin for assigning run time variables using Flee (Fast Lightweight Expression Evaluator) library. My goal is creating a menu model to assign a variable to a test step property.
I achieved this using a dynamic member and adding it to the test step. I add the dynamic member, which is a variable object, as follows:
var variableObjectMember = new DynamicMember()
{
Name = "Variable",
TypeDescriptor = TypeData.FromType(typeof(VariableObject)),
DeclaringType = TypeData.FromType(typeof(ITestStep)),
Readable = true,
Writable = true,
Attributes = new object[2] {
new DefaultValueAttribute((string) null),
new BrowsableAttribute(false)
}
};
var variableObject = new VariableObject()
{
MemberName = member.Name,
VariableName = variableName
};
DynamicMember.AddDynamicMember(step, variableObjectMember);
variableObjectMember.SetValue(step, variableObject);
I can add the dynamic member and can see the member while debugging. My issue starts here, I can’t save the dynamic member to the test plan file. Is there a way to achieve this? Can I save and load dynamic members?