reportportal / client-Python

A common client library for Python-based agents
Apache License 2.0
40 stars 89 forks source link

Error when running post_result.py with Report Portal Client 5.2.4 against Report Portal 5.7.2 (Client 5.2.3 works) #195

Closed manykarim closed 2 years ago

manykarim commented 2 years ago

Describe the bug Executed Robot Framework Tests and generated output.xml Afterwards used post_result.py script to upload results to Report Portal 5.7.2

python post_report.py --variable RP_UUID:"<my-uuid>" --variable RP_ENDPOINT:"<my-endpoint>" --variable RP_LAUNCH:"test_launch" --variable RP_PROJECT:"<my-project>" output.xml

When running the script with the latest Report Portal Client 5.2.4 I get a standard error. When running the same script with Report Portal Client 5.2.3 it works successfully.

Error:

Robot Framework test report sender to Report Portal.

This tool replays a Robot Framework test session using the output XML file with ReportPortal's listener agent injected without actually doing the test. This will allow all the test results to be sent to ReportPortal, after the test is run. By doing this, we will not disturb the timing when the test is run. It also has the benefit of using the test result generated after running multiple parallel robot testing (eg. by using pabot).

Command-line usage:

post_report --variable RP_UUID:"your_user_uuid"
            --variable RP_ENDPOINT:"your_reportportal_url"
            --variable RP_PROJECT:"reportportal_project_name"
            [--variable RP_LAUNCH:"launch_name"]
            [--variable RP_LAUNCH_DOC:"some_documentation_for_launch"]
            [--variable RP_LAUNCH_ATTRIBUTES:"RF tag_name:tag_value"]
            [--variable RP_TEST_ATTRIBUTES:"Long"]
            [--variable RP_LOG_BATCH_SIZE:"10"]
            [--variable RP_MAX_POOL_SIZE:"50"]
            [--variable RP_MODE:"DEBUG"]
            [--loglevel CRITICAL|ERROR|WARNING|INFO|DEBUG]
            [output.xml]

This script needs to be run within the same directory as the report xml file. Attachments mentioned in the log messages will be referred relative to current dir.

Steps to Reproduce Steps to reproduce the behavior:

  1. ...
  2. ...

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior Standard Error (Doc String of post_result.py) is shown when running post_result.py

Package versions Include version info of the following packages: reportportal-client 5.2.4

Additional context When running the same script with Report Portal Client 5.2.3 it works successfully.

HardNorth commented 2 years ago

@manykarim Fixed. I'm not sure whether I need to release another client version right now, since it looks like this only affects this tool, but to workaround you may specify "RP_MODE" variable.

manykarim commented 2 years ago

Great, thanks a lot. Meaning, I need to add e.g. --variable RP_MODE:"DEBUG" and it'll work?

HardNorth commented 2 years ago

@manykarim --variable RP_MODE:"DEFAULT" if you want regular launch.