DataDriver 1.0.0 RELEASE!
Is ready for test.
#pabot 1.10.0 is compatible with --testlevelsplit
Data Types supported
Scalars
+-----------------+
| ${scalar} |
+-----------------+
| Sum List |
+-----------------+
| Should be Equal |
+-----------------+
| Whos your Daddy |
+-----------------+
| Should be Equal |
+-----------------+
| Should be Equal |
+-----------------+
| Should be Equal |
+-----------------+
Lists
+---------+
| @{list} |
+---------+
| 1,2,3,4 |
+---------+
| a,b,c,d |
+---------+
| !,",',$ |
+---------+
| 1 |
+---------+
| |
+---------+
| [1,2] |
+---------+
Dicts (uses Create Dictionary)
+-----------------------+
| &{dict} |
+-----------------------+
| key=value |
+-----------------------+
| key,value |
+-----------------------+
| z,value,a,value2 |
+-----------------------+
| key=value |
+-----------------------+
| a=${2} |
+-----------------------+
| key=value,key2=value2 |
+-----------------------+
Literal Evaluations
+--------------------+
| e{eval} |
+--------------------+
| [1,2,3,4] |
+--------------------+
| True |
+--------------------+
| {'Daddy' : 'René'} |
+--------------------+
| 1 |
+--------------------+
| "string" |
+--------------------+
| None |
+--------------------+
And it can create also nested Dictionaries…
+-------------+----------------------+-------------------+
| ${user}[id] | ${user}[name][first] | ${user.name.last} |
+-------------+----------------------+-------------------+
| 1 | Pekka | Klärck |
+-------------+----------------------+-------------------+
| 2 | Ed | Manlove |
+-------------+----------------------+-------------------+
| 3 | Tatu | Aalto |
+-------------+----------------------+-------------------+
| 4 | Jani | Mikkonen |
+-------------+----------------------+-------------------+
| 5 | Mikko | Korpela |
+-------------+----------------------+-------------------+
| 6 | Ismo | Aro |
+-------------+----------------------+-------------------+
Which is the same than this:
+--------------------------------------------------+
| e{user} |
+--------------------------------------------------+
| {'id': '1', 'first': 'Pekka', 'last': 'Klärck'} |
+--------------------------------------------------+
| {'id': '2', 'first': 'Ed', 'last': 'Manlove'} |
+--------------------------------------------------+
| {'id': '3', 'first': 'Tatu', 'last': 'Aalto'} |
+--------------------------------------------------+
| {'id': '4', 'first': 'Jani', 'last': 'Mikkonen'} |
+--------------------------------------------------+
| {'id': '5', 'first': 'Mikko', 'last': 'Korpela'} |
+--------------------------------------------------+
| {'id': '6', 'first': 'Ismo', 'last': 'Aro'} |
+--------------------------------------------------+
Please test it in your productive environment!
pip install --upgrade --pre robotframework-datadriver
If no issues appear, i will release it in a week.
##########################################
Edit 20:15
delete an el from an elif and now it also supports new RF 4.0 syntax for variable types.
${dict}[test]
-> does mean the value behind the key test is used as scalar
&{dict}[test]
-> does mean that the value is interpreted as unpacked dictionary.
@{dict}[test]
-> does mean that value in test is an unpacked list.
+--------------+---------------------+-----------------+---------------+
| &{dict.dict} | @{dict.list} | e{exp.dict} | e{exp.list} |
+--------------+---------------------+-----------------+---------------+
| key=value | 1,2,3 | {'key':'value'} | ["1","2","3"] |
+--------------+---------------------+-----------------+---------------+
| key,${1.9} | ${1},${2},${3},${4} | {'key':1.9} | [1,2,3,4] |
+--------------+---------------------+-----------------+---------------+
| key=${False} | ${TRUE}, ${1.9} | {'key':False} | [True, 1.9] |
+--------------+---------------------+-----------------+---------------+
Which means in that list: {dict} and {exp} are equal!
{'dict': {'key': 'value'}, 'list': ['1', '2', '3', '4']}
{'dict': {'key': 1.9}, 'list': [1, 2, 3, 4]}
{'dict': {'key': 'value', 'key2': 'value2'}, 'list': [True, '', 1.9, None]}