RQM Import XML testcases using Python code
I want to upload test case in particular project in RQM.
Test case available in proper xml format.
I am using Python code
login_response = requests.post(base_url, data=login_request, verify=cert_path)
if login_response.status_code == 200:
print("Login successful.")
xml_response = requests.post(api_url, data=xml_content, verify=cert_path,headers=headers)
if xml_response.status_code == 200:
print("XML content posted successfully.")
print(xml_response.request)
else:
print(f"Failed to post XML content. Status code: {xml_response.status_code}")
Can you please help me to create API.I am getting status code as 200 but data is not imported
api_url ,I am not getting how to create.Please help me.
One answer
Look into this blog series: https://rsjazz.wordpress.com/2021/10/15/elm-authentication/
Comments
The question lacks pretty much all important information and is likely defunct. You need a session, you need to properly handle authentication, and you can not just send any arbitrary XML document to a bogus API URL.
And if you get a 200, check the response data headers and body. It likely tells you that you are not authenticated.