Snooz82 / robotframework-datadriver

Library to provide Data-Driven testing with CSV tables to Robot Framework
Apache License 2.0
131 stars 37 forks source link

Unable to use dictionary variables in testcase names. #84

Open burrk opened 1 year ago

burrk commented 1 year ago

From: https://robotframework.slack.com/archives/CJSNFRZMK/p1670879176898089 + thread

I discovered I can have the datadriver provide column values as a dictionary of arguments to a template instead of a long list of variables! https://github.com/Snooz82/robotframework-datadriver#dictionary-variables

What I have not been able to figure out is how to use the dictionary values to create a unique testcase name. For example if I have CSV file setup with: *** Test Cases ***,[Tags],${ARGS}[SYSTEM_ID],${ARGS}[CATEGORY]

And the example testcase as:

*** Test Cases ***
${ARGS.CATEGORY}    id    category

All the testcases get the name ${ARGS.CATEGORY} , AND with ${ARGS}[CATEGORY], each testcase gets a name along the lines of {'SYSTEM_ID': 'id', 'CATEGORY': 'category'}[CATEGORY], but at least they are unique,

What is the correct syntax to get this to work? Thank-you!