reportportal / agent-Python-RobotFramework

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

Can't use pabot to attach the image to Reportportal #160

Closed Jirawatkk closed 1 year ago

Jirawatkk commented 1 year ago

i have use to attach the screenshot from robot command to Reportportal it work but then i use pabot to run and it doesn't attach to the Reportportal

Steps

  1. curl --header "Content-Type: application/json" --header "Authorization: Bearer xxx-xxxx-xxx-xxx-xxxx" --request POST --data '{"name":"superadmin_personal","description":"My first launch on RP","startTime":"1574423221000","mode":"DEFAULT","attributes":[{"key":"build","value":"0.1"},{"value":"test"}]}' http://127.0.0.1:8080'/api/v1/superadmin_personal/launch

  2. insert the id of the response to RP_LAUNCH_UUID

  3. pabot --pabotlib --listener robotframework_reportportal.listener --variable RP_UUID:'xxx-xxx-xxx-xxx-xxxx' --variable RP_ENDPOINT:'http://127.0.0.1:8080'' --variable RP_LAUNCH:'superadmin_TEST_EXAMPLE' --variable RP_LAUNCH_UUID:'xxx-xxx-xxx-xxx-xxx' --variable RP_PROJECT:'superadmin_personal' -v app:/xxx/xx/xxx/xxx.apk ./path/to/testcase/

  4. create function to send the attachment i follow this https://github.com/reportportal/client-Python#send-attachement-screenshots use the function that create to keywords

Package versions robotframework-reportportal==5.3.0

can you provide the solution to attach something to the Reportportal

this is the command in robot that work

robot --listener robotframework_reportportal.listener \ --variable RP_UUID:'xxx-xxx-xx-xxx-xxx' \ --variable RP_ENDPOINT:'http://127.0.0.1:8080' \
--variable RP_LAUNCH:'superadmin_TEST_EXAMPLE' \
--variable RP_PROJECT:'superadmin_personal' \ -v app:/xx/xx/xx.apk \ ./path/to/testcase/

HardNorth commented 1 year ago

Should be fixed now: https://pypi.org/project/robotframework-reportportal/5.3.1/