Robotframework-datadriver

Latest version: v1.11.2

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

1.8.0

This Release fixes compatibility to Robot Framework 6.1 (fixes 88 )

And Pandas 2.0 introduced that by default the string "None" in an Excel cell is interpreted as a None value, which is NaN in pandas.
This is fixed as well.

I made some more refactoring related to Paths and if you find any issue, with this version, please report asap.

Thanks and Cheers
René

**Full Changelog**: https://github.com/Snooz82/robotframework-datadriver/compare/1.7.0...1.8.0

1.7.0

What's Changed
Fix 74
Fix 81
Fix 83

**Full Changelog**: https://github.com/Snooz82/robotframework-datadriver/compare/1.6.1...1.7.0

1.6.0

This release contains a bugfix when test case names contain `|` character and added options to PICT.

1.5.0

This Versions made the Handling of Tags more flexible and introduced to preserve Excel data types.

- Fixes 56
- Fixes 57

1.4.1

It was not possible to create an empty list with an empty cell at a list variable.

This has been fixed 48

To create a list with an empty string, add the `${Empty}` variable as value.

1.4.0

The main feature is that all Data read from the DataReaders are now also available as Robot Variables.

Fixes 42 and 49

Example:

robotframework
*** Settings ***
Library DataDriver encoding=utf8
Suite Setup Suite Start
Test Setup Start
Test Template DataDriver demo
Test Teardown End
Suite Teardown Suite End


*** Test Cases ***
Datadriver execution: ${number}


*** Keywords ***
Suite Start
Log ${DataDriver_DATA_LIST}
Log ${DataDriver_DATA_DICT}

Start
Log ${DataDriver_TEST_DATA}

DataDriver demo
[Arguments] ${username} ${password}
Log Many ${username} ${password}

End
Log Task Teardown ${idx}

Suite End
Log Suite Teardown ${idx}


Variables:

`{DataDriver_DATA_LIST}`

A list as suite variable containing a robot dictionary for each test case that is selected for execution.

json
[
{
"test_case_name": "Right user empty pass",
"arguments": {
"${username}": "demo",
"${password}": "${EMPTY}"
},
"tags": [
"1"
],
"documentation": "This is a test case documentation of the first one."
},
{
"test_case_name": "Right user wrong pass",
"arguments": {
"${username}": "demo",
"${password}": "FooBar"
},
"tags": [
"2",
"3",
"foo"
],
"documentation": "This test case has the Tags 2,3 and foo"
},
{
"test_case_name": "Login with user '${EMPTY}' and password 'mode'",
"arguments": {
"${username}": "${EMPTY}",
"${password}": "mode"
},
"tags": [
"1",
"2",
"3",
"4"
],
"documentation": "This test case has a generated name based on template name."
},
{
"test_case_name": "Login with user '${EMPTY}' and password '${EMPTY}'",
"arguments": {
"${username}": "${EMPTY}",
"${password}": "${EMPTY}"
},
"tags": [
""
],
"documentation": ""
},
{
"test_case_name": "Login with user '${EMPTY}' and password 'FooBar'",
"arguments": {
"${username}": "${EMPTY}",
"${password}": "FooBar"
},
"tags": [
""
],
"documentation": ""
},
{
"test_case_name": "Login with user 'FooBar' and password 'mode'",
"arguments": {
"${username}": "FooBar",
"${password}": "mode"
},
"tags": [
"foo",
"1"
],
"documentation": ""
},
{
"test_case_name": "Login with user 'FooBar' and password '${EMPTY}'",
"arguments": {
"${username}": "FooBar",
"${password}": "${EMPTY}"
},
"tags": [
"foo"
],
"documentation": ""
},
{
"test_case_name": "Login with user 'FooBar' and password 'FooBar'",
"arguments": {
"${username}": "FooBar",
"${password}": "FooBar"
},
"tags": [
"foo",
"2"
],
"documentation": ""
}
]

This can be accessed as usual in Robot Framework®.

``${DataDriver_DATA_LIST}[2][arguments][\${password}]`` would result in ``mode`` .



`&{DataDriver_DATA_DICT}`

A dictionary as suite variable that contains the same data as the list, with the test names as keys.

json
{
"Right user empty pass": {
"test_case_name": "Right user empty pass",
"arguments": {
"${username}": "demo",
"${password}": "${EMPTY}"
},
"tags": [
"1"
],
"documentation": "This is a test case documentation of the first one."
},
"Right user wrong pass": {
"test_case_name": "Right user wrong pass",
"arguments": {
"${username}": "demo",
"${password}": "FooBar"
},
"tags": [
"2",
"3",
"foo"
],
"documentation": "This test case has the Tags 2,3 and foo"
},
"Login with user '${EMPTY}' and password 'mode'": {
"test_case_name": "Login with user '${EMPTY}' and password 'mode'",
"arguments": {
"${username}": "${EMPTY}",
"${password}": "mode"
},
"tags": [
"1",
"2",
"3",
"4"
],
"documentation": "This test case has a generated name based on template name."
},
"Login with user '${EMPTY}' and password '${EMPTY}'": {
"test_case_name": "Login with user '${EMPTY}' and password '${EMPTY}'",
"arguments": {
"${username}": "${EMPTY}",
"${password}": "${EMPTY}"
},
"tags": [
""
],
"documentation": ""
},
"Login with user '${EMPTY}' and password 'FooBar'": {
"test_case_name": "Login with user '${EMPTY}' and password 'FooBar'",
"arguments": {
"${username}": "${EMPTY}",
"${password}": "FooBar"
},
"tags": [
""
],
"documentation": ""
},
"Login with user 'FooBar' and password 'mode'": {
"test_case_name": "Login with user 'FooBar' and password 'mode'",
"arguments": {
"${username}": "FooBar",
"${password}": "mode"
},
"tags": [
"foo",
"1"
],
"documentation": ""
},
"Login with user 'FooBar' and password '${EMPTY}'": {
"test_case_name": "Login with user 'FooBar' and password '${EMPTY}'",
"arguments": {
"${username}": "FooBar",
"${password}": "${EMPTY}"
},
"tags": [
"foo"
],
"documentation": ""
},
"Login with user 'FooBar' and password 'FooBar'": {
"test_case_name": "Login with user 'FooBar' and password 'FooBar'",
"arguments": {
"${username}": "FooBar",
"${password}": "FooBar"
},
"tags": [
"foo",
"2"
],
"documentation": ""
}
}


`&{DataDriver_TEST_DATA}`

A dictionary as test variable that contains the test data of the current test case.
This dictionary does also contain arguments that are not used in the ``Test Template`` keyword.
This can be used in Test Setup and within a test case.

json
{
"test_case_name": "Right user wrong pass",
"arguments": {
"${username}": "demo",
"${password}": "FooBar"
},
"tags": [
"2",
"3",
"foo"
],
"documentation": "This test case has the Tags 2,3 and foo"
}

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.