reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 33 forks source link

Issues setting up a demo #41

Closed testautomation closed 4 years ago

testautomation commented 4 years ago

Hey guys, I'm trying to setup demo integration for a cool open source project: EHRbase. It has a nice and complex test-suite of REST API integration tests written in Robot Framework - thus it's a great candidate to back test your RF integration. I configured the agent to use your demo instance https://beta.demo.reportportal.io/

OS: Ubuntu 19.10 / x86_64 Linux 5.3.0-26-generic Python 3.7.5 reportportal-client 3.2.3 robotframework-reportportal 3.1.0 robotframework 3.1.2 six 1.14.0

All I did was pip install, logged in with Github to your demo instance and added information from profile to robot command.

Have I missed something?

robot --listener robotframework_reportportal.listener \
      --variable RP_UUID:'871a4189-97c7-4efa-9b8f-xxxxxxxxx' \
      --variable RP_ENDPOINT:'https://beta.demo.reportportal.io' \
      --variable RP_LAUNCH:'DUMMY' \
      --variable RP_PROJECT:'TESTAUTOMATION_PERSONAL' \
      -d results robot/ci_test_dummy.robot
==============================================================================
Ci Test Dummy                                                                 
==============================================================================
Dummy Test For CircleCi Pipeline Testing/Debugging :: CI Pipeline ... ..

    UUID: e92c16bb-5346-4482-aa40-61f0421334aa

Dummy Test For CircleCi Pipeline Testing/Debugging :: CI Pipeline ... | PASS |
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 153, in start_launch
    self.launch_id = _get_id(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 32, in _get_id
    return _get_data(response)["id"]
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: Incorrect Request. [Field 'attributes[].value' should have size from '1' to '128'.] [Field 'attributes[].value' should not contain only white spaces and shouldn't be empty.] 
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 211, in start_test_item
    item_id = _get_id(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 32, in _get_id
    return _get_data(response)["id"]
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: Incorrect Request. [Field 'launchUuid' should not be null.] 
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 211, in start_test_item
    item_id = _get_id(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 32, in _get_id
    return _get_data(response)["id"]
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: Incorrect Request. [Field 'launchUuid' should not be null.] 
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 233, in process_item
    self._post_log_batch()
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 203, in _post_log_batch
    self.rp_client.log_batch(self.log_batch)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 317, in log_batch
    return _get_data(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: ReportPortalException: Launch 'null' not found. Did you use correct Launch ID?
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 211, in start_test_item
    item_id = _get_id(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 32, in _get_id
    return _get_data(response)["id"]
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: Incorrect Request. [Field 'launchUuid' should not be null.] 
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 233, in process_item
    self._post_log_batch()
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 203, in _post_log_batch
    self.rp_client.log_batch(self.log_batch)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 317, in log_batch
    return _get_data(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: ReportPortalException: Launch 'null' not found. Did you use correct Launch ID?
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 211, in start_test_item
    item_id = _get_id(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 32, in _get_id
    return _get_data(response)["id"]
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: Incorrect Request. [Field 'launchUuid' should not be null.] 
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 231, in finish_test_item
    return _get_msg(r)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 40, in _get_msg
    return _get_data(response)["msg"]
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 52, in _get_data
    raise ResponseError(error_messages[0])
reportportal_client.errors.ResponseError: Test Item 'None' not found. Did you use correct Test Item ID?
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 227, in finish_test_item
    item_id = self.stack.pop()
IndexError: pop from empty list
Traceback (most recent call last):
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service_async.py", line 234, in process_item
    getattr(self.rp_client, method)(**kwargs)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 171, in finish_launch
    status=status)
  File "/home/osboxes/projects/ehrbase/tests/venv/lib/python3.7/site-packages/reportportal_client/service.py", line 165, in _finalize_launch
    self.stack.pop()
IndexError: pop from empty list
Ci Test Dummy                                                         | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output:  /home/osboxes/projects/my/ehrbase/tests/results/output.xml
Log:     /home/osboxes/projects/my/ehrbase/tests/results/log.html
Report:  /home/osboxes/projects/my/ehrbase/tests/results/report.html
iivanou commented 4 years ago

@testautomation Currently, Python agents do not support RP version 5. The support will be added later.

testautomation commented 4 years ago

Thank you @iivanou! Do you have a rough estimate when Python agents will support RP 5?

So for my demo I will have to set up my own instance with RP 4. How do I control which version I get if I choose the docker/docker-compose path?

iivanou commented 4 years ago

The rough estimate is about a couple of months. Pick up any version you want except v 5.

testautomation commented 4 years ago

OK. I'll see how far I can go with v 4 :)