Skip to content

Commit

Permalink
Merge pull request #6 from qahive/update_testdata_property
Browse files Browse the repository at this point in the history
Support update test data property
  • Loading branch information
atthaboon authored Jan 1, 2021
2 parents 76627f4 + 72b0235 commit 93b1151
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 3
matrix:
python-version: [3.5, 3.6, 3.7]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v1
Expand Down
3 changes: 3 additions & 0 deletions ExcelDataDriver/ExcelParser/ExcelTestDataService.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def select_validation_data(self, test_data):
def get_test_data_property(self, property_name):
return ExcelTestDataService.select_test_data.get_test_data_property(property_name)

def update_test_property(self, property_name, property_value):
ExcelTestDataService.select_test_data.set_test_data_property(property_name, property_value)

def update_test_result(self, status, log_message=None, screenshot=None):
ExcelTestDataService.select_test_data.update_result(status, log_message, screenshot)

Expand Down
17 changes: 16 additions & 1 deletion ExcelDataDriver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from ExcelDataDriver.Config.CaptureScreenShotOption import CaptureScreenShotOption


__version__ = '1.2.2'
__version__ = '1.2.3'


class ExcelDataDriver:
Expand Down Expand Up @@ -301,6 +301,10 @@ def _capture_screenshot(self):
# Public Utility Keywords
#
#############################################
@keyword
def update_test_property(self, property_name, property_value):
self.excelTestDataService.update_test_property(property_name, property_value)

@keyword
def update_test_result(self, status, log_message=None, screenshot=None):
"""
Expand Down Expand Up @@ -466,6 +470,17 @@ def get_test_data_property(self, property_name):
"""
return self.excelTestDataService.get_test_data_property(property_name)

@keyword
def update_test_data_property(self, property_name, property_value):
"""
Update test data property
Arguments:
| property_name | Test data property name should be lower case |
| property_value | Test data value |
"""
return self.excelTestDataService.update_test_property(property_name, property_value)

@keyword
def verify_update_data_property(self, property_name, data_type, allow_none=True, *data_list):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'robotframework-seleniumlibrary',
'robotframework-puppeteerlibrary',
],
python_requires='>3.5',
python_requires='>3.6',
test_suite='nose.collector',
tests_require=['nose', 'parameterized'],
zip_safe=False,
Expand Down

0 comments on commit 93b1151

Please sign in to comment.