
- The following
Pythonscript helps you to update the automation results right after the execution on exit
from datadog import initialize, api
import time, os, glob, json
print os.environ['API_KEY']
options = {
'api_key': os.environ['API_KEY']
}
initialize(**options)
stats = json.load('./stats.json')
api.Metric.send(metric="qa.baseline.desktop.passed", points=stats['passed'], tags=["country:us")
api.Metric.send(metric="qa.baseline.desktop.failed", points=stats['failed'], tags=["country:us")
api.Metric.send(metric="qa.baseline.desktop.skipped", points=stats['skipped'], tags=["country:us")
- Import the following Dashboard json with the basic settings required
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title":"QA Dashboard", | |
| "description":"", | |
| "widgets":[ | |
| { | |
| "id":0, | |
| "definition":{ | |
| "type":"timeseries", | |
| "requests":[ | |
| { | |
| "q":"avg:qa.baseline.desktop.passed{country:ae}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"cool", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| }, | |
| { | |
| "q":"avg:qa.baseline.desktop.failed{country:ae}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"orange", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| }, | |
| { | |
| "q":"avg:qa.baseline.desktop.passed{country:us}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"cool", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| }, | |
| { | |
| "q":"avg:qa.baseline.desktop.failed{country:us}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"orange", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| } | |
| ], | |
| "yaxis":{ | |
| "label":"", | |
| "scale":"linear", | |
| "min":"auto", | |
| "max":"auto", | |
| "include_zero":true | |
| }, | |
| "title":"DESKTOP BASELINE", | |
| "title_size":"16", | |
| "title_align":"center", | |
| "show_legend":false | |
| }, | |
| "layout":{ | |
| "x":0, | |
| "y":0, | |
| "width":60, | |
| "height":22 | |
| } | |
| }, | |
| { | |
| "id":1, | |
| "definition":{ | |
| "type":"query_value", | |
| "requests":[ | |
| { | |
| "q":"avg:qa.baseline.desktop.failed{*}", | |
| "aggregator":"sum", | |
| "conditional_formats":[ | |
| { | |
| "comparator":">", | |
| "value":0, | |
| "palette":"white_on_red" | |
| }, | |
| { | |
| "comparator":"<", | |
| "value":1, | |
| "palette":"white_on_green" | |
| } | |
| ] | |
| } | |
| ], | |
| "title":"DESKTOP", | |
| "title_size":"16", | |
| "title_align":"center", | |
| "autoscale":false, | |
| "precision":0, | |
| "text_align":"center" | |
| }, | |
| "layout":{ | |
| "x":0, | |
| "y":23, | |
| "width":15, | |
| "height":22 | |
| } | |
| }, | |
| { | |
| "id":2, | |
| "definition":{ | |
| "type":"query_value", | |
| "requests":[ | |
| { | |
| "q":"avg:qa.baseline.mdot.failed{*}", | |
| "aggregator":"last", | |
| "conditional_formats":[ | |
| { | |
| "comparator":">", | |
| "value":0, | |
| "palette":"white_on_red" | |
| }, | |
| { | |
| "comparator":"<", | |
| "value":1, | |
| "palette":"white_on_green" | |
| } | |
| ] | |
| } | |
| ], | |
| "title":"MDOT", | |
| "title_size":"16", | |
| "title_align":"center", | |
| "autoscale":false, | |
| "precision":0, | |
| "text_align":"center" | |
| }, | |
| "layout":{ | |
| "x":61, | |
| "y":23, | |
| "width":15, | |
| "height":22 | |
| } | |
| }, | |
| { | |
| "id":3, | |
| "definition":{ | |
| "type":"timeseries", | |
| "requests":[ | |
| { | |
| "q":"avg:qa.baseline.mdot.passed{country:ae}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"cool", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| }, | |
| { | |
| "q":"avg:qa.baseline.mdot.failed{country:ae}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"orange", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| }, | |
| { | |
| "q":"avg:qa.baseline.mdot.passed{country:us}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"cool", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| }, | |
| { | |
| "q":"avg:qa.baseline.mdot.failed{country:us}", | |
| "display_type":"bars", | |
| "style":{ | |
| "palette":"orange", | |
| "line_type":"solid", | |
| "line_width":"normal" | |
| } | |
| } | |
| ], | |
| "yaxis":{ | |
| "label":"", | |
| "scale":"linear", | |
| "min":"auto", | |
| "max":"auto", | |
| "include_zero":true | |
| }, | |
| "title":"MDOT BASELINE", | |
| "title_size":"16", | |
| "title_align":"center", | |
| "show_legend":false | |
| }, | |
| "layout":{ | |
| "x":61, | |
| "y":0, | |
| "width":60, | |
| "height":22 | |
| } | |
| }, | |
| { | |
| "id":4, | |
| "definition":{ | |
| "type":"toplist", | |
| "requests":[ | |
| { | |
| "q":"max:qa.baseline.desktop.passed{*} by {country}" | |
| } | |
| ], | |
| "title":"Desktop Test Counts", | |
| "title_size":"16", | |
| "title_align":"center" | |
| }, | |
| "layout":{ | |
| "x":16, | |
| "y":23, | |
| "width":44, | |
| "height":22 | |
| } | |
| }, | |
| { | |
| "id":5, | |
| "definition":{ | |
| "type":"toplist", | |
| "requests":[ | |
| { | |
| "q":"max:qa.baseline.mdot.passed{*} by {country}" | |
| } | |
| ], | |
| "title":"MDot Test Counts", | |
| "title_size":"16", | |
| "title_align":"center" | |
| }, | |
| "layout":{ | |
| "x":77, | |
| "y":23, | |
| "width":44, | |
| "height":22 | |
| } | |
| } | |
| ], | |
| "template_variables":[ | |
| { | |
| "name":"", | |
| "default":"*", | |
| "prefix":null | |
| } | |
| ], | |
| "layout_type":"free", | |
| "is_read_only":false, | |
| "notify_list":[ | |
| ], | |
| "id":"hpe-h5g-wut" | |
| } |
- Thats it!































