Closed raggs07 closed 4 years ago
@raggs07 Are sure that you passed all the necessary RP connection parameters via the command-line correctly?
yes passed all the Required parameters: --listener robotframework_reportportal.listener --variable RP_UUID:"your_user_uuid" --variable RP_ENDPOINT:"your_reportportal_url" --variable RP_LAUNCH:"launch_name" --variable RP_PROJECT:"reportportal_project_name"
This first time I am using reportPortal. So no prior installation was there.
Please, double-check your input parameters. Everything works well on my side.
i dont think this is due to input parameter I removed the RP_PROJECT variable and fired the commands still got the same errors. I believe the main problem is at not getting the Suite ID, not sure why... because of that all of these errors are coming.
I need something that helps me to reproduce the problem on my side. Could you create and share a test suite that I can use?
This what i ran:
pybot --listener robotframework_reportportal.listener --variable RP_UUID="
Test Cases TC1 Log Hello World
Give me a pointer on possible reasons for Suite ID not getting in attributes. I will try to debug it here.
Output from above command :
[ ERROR ] Calling listener method 'end_suite' of listener 'robotframework_reportportal.listener' failed: KeyError: 'id'
@raggs07 RP_UUID should not be empty.
Your example works well on my side:
# robot --listener robotframework_reportportal.listener --variable RP_UUID:"6fecfbb1-xxx-xxxx-xxxx-xxxxxxxxxxx" --variable RP_ENDPOINT:"https://beta.demo.reportportal.io" --variable RP_LAUNCH:"test_key_error" --variable RP_PROJECT:"iivanou_personal" test1.txt
[ WARN ] Automatically parsing other than '*.robot' files is deprecated. Convert '/***/agent-Python-RobotFramework/test1.txt' to '*.robot' format or use '--extension' to explicitly configure which files to parse.
==============================================================================
Test1
==============================================================================
TC1 Hello World
TC1 | PASS |
------------------------------------------------------------------------------
Test1 | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
i printed the attribute in listner.py this what I got:
{'suites': [], 'tests': [u'TC1'], 'doc': u'', 'source': u'/home/**/test1.txt', 'totaltests': 1, 'starttime': '20200727 05:41:00.216', 'longname': u'Test1', 'metadata': {}}
[ WARN ] Automatically parsing other than '*.robot' files is deprecated. Convert '/***/agent-Python-RobotFramework/test1.txt' to '*.robot' format or use '--extension' to explicitly configure which files to parse.
==============================================================================
Test1
==============================================================================
{'id': 's1', 'longname': 'Test1', 'doc': '', 'metadata': {}, 'starttime': '20200727 16:00:36.394', 'tests': ['TC1'], 'suites': [], 'totaltests': 1, 'source': '/***/agent-Python-RobotFramework/test1.txt'}
{'id': 's1-s1', 'longname': 'Test1', 'doc': '', 'metadata': {}, 'starttime': '20200727 16:00:36.394', 'tests': ['TC1'], 'suites': [], 'totaltests': 1, 'source': '/***/agent-Python-RobotFramework/test1.txt'}
TC1 Hello World
TC1 | PASS |
------------------------------------------------------------------------------
Test1 | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
# robot --version
Robot Framework 3.1.2 (Python 3.6.5 on linux)
i see your robot version is 3.1.2 can it be because of that my pybot version :
pybot --version
Robot Framework 2.8.4 (Python 2.7.5 on linux2)
I just created a robot 3 client and ran it over there and it worked but for robot 2 it do not work... so it is clear that robot 2 support is required, which version of library I can use for robot 2
Robot versions below 3 support Python 2 only. It does not make any sense adding support for Python 2 because it is EOL. You can try juggling with agent versions, but I'm doubt that you will find any version that supports both a new common Python client version 5 and robot versions below 3. Nevertheless, you can contribute to the project in order to achieve that goal.
Moment I start the test, it keeps printing this message in loop. Not sure what is causing the issue or what I am doing wrong.
Version Info: reportportal-client 5.0.3 robotframework 2.8.4 robotframework-reportportal 5.0.2 Report Portal Version: 5.2.3
[ ERROR ] Calling listener method 'start_suite' of listener 'robotframework_reportportal.listener' failed: KeyError: 'id' [ ERROR ] Calling listener method 'start_keyword' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'log_message' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'start_keyword' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'log_message' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'log_message' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'log_message' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'end_keyword' of listener 'robotframework_reportportal.listener' failed: KeyError: 'libname' [ ERROR ] Calling listener method 'start_keyword' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'log_message' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range [ ERROR ] Calling listener method 'log_message' of listener 'robotframework_reportportal.listener' failed: IndexError: list index out of range