Test Activity with Dynamic Variables

With the new version 19.4.4 UiPath added the very useful feature to right click on an Activity and just test that activity instead of having to start the debugger and let the process run up until the activity.

The Problem I have when I work with the REFramework is, that there is a Config-File being read and loaded into a dictionary. When you click on “Test activity” you can enter testvalues for the variables so you wont get an error. I dont know how to enter any information into variables of any type other than the basic types like “Int32” or “String”.

Do you guys have a quick workaround for entering any more complicated datatypes like “Dictionary<String,Object>” or so?

1 Like

@LennartM

Here you have to pass direct Value instead of Key value to test that particular activity.

1 Like

Thanks for the answer,

I created a dictionary by running the init-Stage of the REFramework and then I copied the dictionary like so:

Dictionary<String, Object> (8) { { “OrchestratorQueueName”, “” }, { “logF_BusinessProcessName”, “Framework” }, { “isProdRun”, false }, { “MaxRetryNumber”, 0 }, { “TimeoutShort”, 5000 }, { “TimeoutMedium”, 30000 }, { “TimeoutLong”, 120000 } }

However, on entering this into the Dictionary Variable before Testing, I get a validation error:
ERROR [Config] Compiler error(s) encountered processing expression "Dictionary<String, Object>(8) {{ "OrchestratorQueueName", "" }, { "logF_BusinessProcessName", "Framework" }, { "isProdRun", false }, { "MaxRetryNumber", 0 }, { "TimeoutShort", 5000 }, { "TimeoutMedium", 30000 }, { "TimeoutLong", 120000 }}". '.' expected.

1 Like

@LennartM

Enter this into Dictonary variable

new Dictionary(of string, string) From { { “Key1”, “Value1” }, { “Key2”, “Value2” }, { “Key3”, “Value3” } }

4 Likes

Nice that worked, thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.