How to get Test Plan External Parameters for Test Step before running

Hi everyone, I’m currently developing test step which needs to list all available external parameters from test plan settings for user to select from combo box. So far I’ve only managed to do this in PrePlanRun/Run phases. How would it be/is it possible to load these external parameters when test plan is loaded, test step is added to the test plan and test step is selected in the test plan?

2 Likes

Hi @juhani.tormanen, and welcome!

So it sounds like you’ve already developed a function which lists the external parameters as desired, and that function works when called from PrePlanRun and Run, correct?

Can you stick that same function into the getter of a List which is used by an AvailableValues attributed property? Something like this:

[xmlignore]
public List<string> AvailableExternalParams
{
  get
  {
    return GetAllExternalParams();
  }
}

[AvailableValues(nameof(AvailableExternalParams))]
public List<string> SelectedExternalParams {get;set;}
3 Likes

Thanks, this code example did the trick :blush:

2 Likes