Update existing test cycle

Mahadev Gadge
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2024
def upload_junit_xml(token, project_key, file_path):
    url = f"https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey={project_key}&autoCreateTestCases=false"
    headers = {
        'Authorization': f'Bearer {bearer_token}',
    }
    files = {
        'file': (file_path, open(file_path, 'rb'), 'application/xml')
    }

 

    try:
        response = requests.post(url, headers=headers, files=files)
        response.raise_for_status()  # Raise an exception for any HTTP error status

 

        print("Request successful. Response:")
        print(response.json())

 

    except requests.exceptions.RequestException as e:
        print(f"Error: {e}")

 

# Replace 'YOUR_TOKEN' with your actual token
file_path =  xml path 
After running above code, it will create a new test cycle and update status of all test cases Pass or Fail.  but what i want is it should update existing test cycle and should not create new test cycle. 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events