Closed deekhare911 closed 1 month ago
@HardNorth - Could you please help me on this ?
@deekhare911 I don't see any issue on my end, logs appear correctly: So this should be some kind of configuration issue on your side. I upgraded all dependencies in our examples and implement Pabot run script to ease configuration for users: https://github.com/reportportal/examples-python/blob/master/robotframework/run-pabot.sh
Hope this will help.
Describe the bug Logs are not getting attached while executing Pabot with ReportPortal
Steps to Reproduce Steps to reproduce the behavior:
url = "https://demo.reportportal.io/api/v1/:projectName/launch"
payload = json.dumps({ "attributes": [ { "key": "string", "system": False, "value": "string" } ], "description": "string", "mode": "DEFAULT", "name": "string", "rerun": True, "rerunOf": "string", "startTime": "2024-06-21T07:32:35.273Z" }) headers = { 'Content-Type': 'application/json', 'Accept': '/', 'Authorization': 'bearer ' + rp_token }
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)`
Execute Pabot command: (RP_LAUNCH_UUID - we are getting from Step1)
pabot --processes 3 --testlevelsplit --listener robotframework_reportportal.listener -v headless:True -v URL:https://helloworld.com/ -v Username:auto@cloud.com -v Password:*** -v ENV:QA -v CLIENT:Internal --exclude platform:Windows -v RP_LAUNCH:Demo_NewRPTest -v RP_LAUNCH_UUID:10171752-9d5e-4345-a26d-*** -v RP_ENDPOINT:https://reportportal.artegocloud.com -v RP_API_KEY:*** -v RP_PROJECT:Internal **-v RP_ATTACH_LOG:True -v RP_ATTACH_XUNIT:True -v RP_ATTACH_REPORT:True** --xunit xunit_output.xml --outputdir /testoutputs --include SmokeTestsANDENV:QAANDCLIENT:Internal TestCases/*
Finish Launch using API: `import requests import json
url = "https://demo.reportportal.io/api/v1/:projectName/launch/:launchId/finish"
payload = json.dumps({ "attributes": [ { "key": "string", "system": False, "value": "string" } ], "description": "string", "endTime": "2024-06-21T07:32:35.273Z", "status": "PASSED" }) headers = { 'Content-Type': 'application/json', 'Accept': '/', 'Authorization': 'bearer ' + rp_token }
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)`
Expected behavior This should create a single launch - with logs attached - because we have given -v RP_ATTACH_LOG:True -v RP_ATTACH_XUNIT:True -v RP_ATTACH_REPORT:True
Actual behavior Single launch is getting created - but logs are not attached
Package versions robotframework ==7.0 robotframework-pabot==2.17.0 reportportal-client==5.5.4 robotframework-reportportal==1.0.0 RP Build: 5.11.0
Additional context Please let me know if I'm missing something here.