#116 SendStatistics.py

Closed
opened 3 years ago by aguryev · 4 comments
aguryev commented 3 years ago

SendStatistics.py rises errors when executing json-defined Testruns. The issue relates to Testrun dictionary keys that are strings in JSON-defined Testruns and integers in XLSX-defined Testruns.

These changes fixe the issue for JSON-defined testrun

def update_data(self, dic):
    self.SequenceClass = dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["SequenceClass"]
    self.TestCaseClass = dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["TESTCASE"]['1'][0]
    self.update_attribute(dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["TESTCASE"]['1'][1]["TestCaseType"])
    TestStep = dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["TESTCASE"]['1'][2]["TestStep"]['1'][1]["TestStepExecutionParameters"]
`SendStatistics.py` rises errors when executing json-defined Testruns. The issue relates to Testrun dictionary keys that are **strings** in JSON-defined Testruns and **integers** in XLSX-defined Testruns. These changes fixe the issue for JSON-defined testrun ```python def update_data(self, dic): self.SequenceClass = dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["SequenceClass"] self.TestCaseClass = dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["TESTCASE"]['1'][0] self.update_attribute(dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["TESTCASE"]['1'][1]["TestCaseType"]) TestStep = dic["TESTRUNEXECUTIONPARAMETERS"]["TESTSEQUENCE"]['1'][1]["TESTCASE"]['1'][2]["TestStep"]['1'][1]["TestStepExecutionParameters"] ```
Bernhard Buhl commented 3 years ago
Owner

fixed in 1.1.3. @aguryev please check.

fixed in 1.1.3. @aguryev please check.
aguryev commented 3 years ago
Collaborator

The issue is fixed in 1.1.3.

However, the execution of example_googleImages.xlsx raises another error:

File "/usr/local/lib/python3.6/dist-packages/baangt/base/ExportResults/SendStatistics.py", line 121, in update_attribute
    var = getattr(self, string)
AttributeError: 'Statistics' object has no attribute 'Activity_COMMENT'

Executing other examples fails all the test cases:

2020-06-08 11:10:22,994 _ ERROR _ BrowserHelperFunction _ browserHelper_log : Webpage http://localhost/signup not reached. Error was: Message: Reached error page: about:neterror?e=connectionFailure&u=http%3A//localhost/signup&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%20localhost.
The issue is fixed in 1.1.3. However, the execution of `example_googleImages.xlsx` raises another error: ``` File "/usr/local/lib/python3.6/dist-packages/baangt/base/ExportResults/SendStatistics.py", line 121, in update_attribute var = getattr(self, string) AttributeError: 'Statistics' object has no attribute 'Activity_COMMENT' ``` Executing other examples fails all the test cases: ``` 2020-06-08 11:10:22,994 _ ERROR _ BrowserHelperFunction _ browserHelper_log : Webpage http://localhost/signup not reached. Error was: Message: Reached error page: about:neterror?e=connectionFailure&u=http%3A//localhost/signup&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%20localhost. ```
Bernhard Buhl commented 3 years ago
Owner

@aguryev: Please use 1.1.4 - this should be fixed now!

@aguryev: Please use 1.1.4 - this should be fixed now!
aguryev commented 3 years ago
Collaborator

Tested 1.1.4 -- the issue is fixed!))

Tested 1.1.4 -- the issue is fixed!))
Sign in to join this conversation.
No Label
Mac
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.