I have a few checks in a test that I’m running on k6-operator and streaming the metrics to Grafana cloud Prometheus:
check(page, {'Title visible': page.locator('h1.site-heading').isVisible(),
'Title correct': page.locator('h1.site-heading').textContent() == 'Next Wp Prod 627',
'Live history section': page.locator('div#live-build-history-table').isVisible(),
'Multidev section': page.locator('div#multidev-branch-table').isVisible(),
'PR section': page.locator('div#pull-request-table').isVisible(),
'Live deployment URL correct': page.locator('div.mb-4 a#deployment-url').textContent() ==
some_url
});
when some of the checks fail, i see it correctly in the report:
checks..............................................: 83.33% ✓ 5 ✗ 1
however, when i go check the k6_checks_rate
value in Grafana, i don’t see any values. i only see values of 1 for tests where all the checks have passed. i see all other metric data for tests with failed checks but just not the checks metric. without it, i won’t know if the test passed or failed. Am I doing anything wrong or is that value not sent?