Settings parameters are always outdated

Hello Guys,

Been working with Opentap for about a month and a half already.
For first time I am coming across an issue I cannot figure out.

I have the following Settings

And as expected, every time I am running my testplan, those are being shown as a popup and user needs to input these info.

Now, when I try to access these from my result listeners (I tried both OnTestPlanRunStart & OnTestPlanRunCompleted):

They are always outdated

Explain:

1st time I input Operator ZZZ Serial number YYY
On result listener I get excemption for both

2nd time I input PPP and SSS
I read ZZZ and YYY

3rd time I input QQQ and CCC
I read PPP and SSS

That leads me to the conclusion that test plan is reading the parameters before the popups is shown to the user.

I also tried to create the same settings under DUT page, but then the popups are not shown

Is there a way around this?
am I doing something wrong?

Very frustrating and I spend more time on this than I did for more complicated things on opentap

Thanks for helping

2 Likes

@carlos.montes do you think you can help look at this? It is possible it is a bug.

Hello @connospp and welcome to the forum!

I have a couple of questions:

-How are you updating the settings? Are you enabling the “Allow Metadata Prompt” checkbox on the Engine settings or are you using a custom user prompt?

image

We noticed this behavior a few months ago and are working on a fix, in the meantime there is a workaround which you can find on the following post:

The workaround is:
-move the properties from the component settings to the DUT
-call the OnPropertyChanged() method on the setter of each property
-Enable the “Allow Metadata Prompt” checkbox on the Engine settings

This should update the metadata properties and you should be able to get the updated values on Result Listener OnTestStepRunStart, OnTestPlanRunCompleted and also on any test step Run. I tested the behavior and here are some screen shots showing the input box for the meta data and the session log shows the values for Serial and Operator during the OnTestStepRunStart, Test Step Run and OnTestPlanRunCompleted:

image

Let me know if this works for you.

Regards,

Carlos Montes

1 Like

Hey there,

Thanks for getting back to me.

  1. Yes I am doing it through “Allow metadata prompt” from engine settings/

  2. I found a workaround for now . I am just calling the settings directly and getting the most up to date value. Works for not but defo not the nicest solution

image

1 Like