Pass Arguments to Execution Template

I want to pass arguments to a Execution Template. There is the possibility to create arguments but I cannot pass them when I set the template to a test case or at least I haven’t found this option yet. Is it even possible?

These are the Arguments in the template:

TestCaseName is the most important one: It is used for the filename to save a screenshot at the end of the execution.

This is from the official docs (https://docs.uipath.com/studio/standalone/2023.10/user-guide/execution-templates#conditions):

  • When you run or debug the file, the test case and its associated execution template are merged into a temporary file. The collection of arguments and variables from both files are compared by name at runtime. If the execution template shares a matching argument or variable name with the test case, it will be linked in the Invoked Workflow File after the merge. If the test case does not have any matching arguments with the execution template, the arguments from the former file will be copied to the latter.

I tried to set the Arguments by setting Arguments in the Arguments Panel in the Test Case but it doesn’t work.
Any help would be appreciated.

@damos

Wherever you are invoking the template there you need to pass the values to the template workflow…those are then used

Cheers

I don’t invoke the template, I just set it like this:
image
And when I have set the template to a new test case it is just an empty workflow, so there is no option to set any arguments of the template:

@damos

Your execution template will be called automatically furing testing and in the test cases you need to maintain same arguments so that the value is passed

And how are you using the execution template can you please show an example…or implementation…

Ideally if argument name matches witht he actual invoked file or case then values are passed

Cheers

Thanks for the replies, I got it to work by setting the arguments in the test case. Not sure why it didn’t work before.
It would be awesome if all the arguments would get copied to the test case from the template once you set the template… maybe in future releases.

1 Like

@damos

Glad its resolved

Idealy that is the way we can set…

Cheers