By way of the UI, presently it’s not attainable.
However you need to use Azure API for this.
import requests
import json
group = 'your_organization'
mission="your_project"
plan_id = 'your_test_plan_id'
pat="your_pat"
suite_ids = ['suite_id1', 'suite_id2', 'suite_id3', ....]
headers = {
'Content material-Sort': 'software/json',
'Authorization': f'Fundamental {pat}'
}
def create_chart(suite_id, chart_name, question, settings):
url = f'https://dev.azure.com/{group}/{mission}/_apis/take a look at/Plans/{plan_id}/suites/{suite_id}/charts?api-version=6.0-preview'
payload = {
"title": chart_name,
"question": question,
"settings": settings
}
response = requests.put up(url, headers=headers, knowledge=json.dumps(payload))
if response.status_code == 200:
print(f'Efficiently created chart {chart_name} for suite {suite_id}')
else:
print(f'Didn't create chart {chart_name} for suite {suite_id}: {response.content material}')
for suite_id in suite_ids:
create_chart(suite_id, "Consequence of Take a look at", "Consequence question", {/* your settings */})
create_chart(suite_id, "Who ran the Take a look at", "Runner question", {/* your settings */})
PATH is the token to the API.
Exchange additionally group and mission together with your specific knowledge.
The settings will be like this:
settings = {
"chartType": "Bar",
"xAxis": "Consequence",
"yAxis": "Rely",
"collection": [
{
"name": "Passed",
"color": "Green"
},
{
"name": "Failed",
"color": "Red"
}
],
"filters": {
"testSuite": suite_id,
"dateRange": {
"begin": "2023-01-01",
"finish": "2023-12-31"
}
}
}
Documentation: https://study.microsoft.com/en-us/dotnet/api/microsoft.workplace.instruments.excel.chart?view=vsto-2022