reportportal / agent-Python-RobotFramework

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

Too long item test name causes RP server errors #9

Closed frizzby closed 7 years ago

frizzby commented 7 years ago

RP server limits length of name field of a test to be 256 chars max. But this agent may produce name value much longer than 256 chars. This leads to server error:

ResponseError: 4001: Incorrect Request. {} [[Field 'name' should have size from '1' to '256'.] ]

This is how generated test name looks like: ${options} = BuiltIn.Catenate (--variablefile ${VF1}, -V ${VF2}:arg, -V "${VF2}:arg2:value;with;semi;colons", -V "${VF2};semicolon;separator", -V "${VF2};semi:colon;separator:with:colons", --VariableFile ${VF2}, -V ${VF2}:FAIL, -V ${VF2}:too:many:args, --variablef ${VF3} --VARIABLEFILE ${VF4} --VariableFile pythonpath_varfile.py --VariableFile pythonpath_varfile.py:1:2:3 --pythonpath ${VARFILEDIR}/pythonpath_dir

How to reproduce:

  1. clone robotframework source
  2. execute robotframework's acceptance tests as follows: ./atest/run.py python --listener robotframework_reportportal.listener --variable RP_UUID:"uuid" --variable RP_ENDPOINT:"https://endpoint" --variable RP_LAUNCH:”ROBOT” --variable RP_PROJECT:"you_name_personal" atest/robot/variables/
frizzby commented 7 years ago

@krasoffski @DzmitryHumianiuk Do you think it is safe and acceptable solution to trim name length to 256 chars max by agent before posting to RP? What is expected behavior here? If my understanding is correct this was a design decision to cap name's length — it is supposed to be concise.

DzmitryHumianiuk commented 7 years ago

@frizzby @krasoffski yes. we limited it to have starting point in limits. but dictated more of common sense, than because of nice design on UI.

@avarabyeu please correct me, don't we have any other reasons to have limit as 256 for testItem name?

frizzby commented 7 years ago

OK, until we have a better solution i'm going to trim name field.