XMLIGNORE prevents parameters from being passed to an external results listener

My usecase for XMLIGNORE is to avoid re-initialization of variables from a previous run since they have no meaning to the current run of a test plan. Using TUI the testplan works fine with outputs matching inputs. When applying this logic to a custom GUI that displays items based upon teststep.parameters, the ouput value is not included in the array. Why are these parameters excluded when calling a results listener? I’ve looked at the tap project to try and avoid this, but modifications to getParametersMap() don’t seem to avoid the behavior. Any Ideas on where I should be patching this?

Hi @craig.petku,

I am not sure I understand. Are you saying it works in the TUI, but not in your custom GUI?

TUI is only referenced to state the sequence works such that outputs are mapped to inputs. The issue is when a custom ResultsListener is called, the parameters array does not contain items for public controls which have the XMLIGNORE property set. Thus, a statement in the ResultsListener like:

testPlanModel.CurrentBatt = (double)stepRun.Parameters.Find(“Voltage”,“Measurements”).Value;

returns a null when the Parameter isn’t found. This then causes the results listener to be unloaded due to the inability to convert and assign a value to CurrentBatt. Commenting out the XMLIGNORE attribute in the source for my TestStep allows this to run fine.

I can see that those restrictions were mostly added for performance reasons. The idea is that you’d only want ‘settings’ to be used as result parameters, but I don’t think it necessarily has to be this way.

Currently there is no way around it.

Can you open an issue on GitHub - opentap/opentap: This is the code for the base OpenTAP package. See https://opentap.io. This includes the OpenTap.dll (base classes and sequencer), OpenTap.Package.dll (package manager), tap.exe (CLI) and OpenTap.Plugins.BasicSteps.dll (some basic TestSteps)?

Issue opened as requested

1 Like