What would be the better approach to view Cucumber test result

Hi Folks, I have a use case in which I need to visualise BDD test results, which is in json or html format. Is that, I can use promtail to ingest json files into Loki to visualise in Grafana or do I need to use data source like influxdb, postgresql etc… please let me know the best approach for bdd test result ingestion? Thanks in advance

Depends on the nature of your data, I suppose. If your test results are all numbers then a metrics platform such influxdb or prometheus might be better. But if it’s a mixed of logs, labels, and numbers, and you want to keep the original JSON payload intact, then perhaps Loki would be a better choice.

I’d encourage you to sign up for a free account on Grafana Cloud, and just put some data in there and see what it looks like. You can play around with both Loki and Mimir for free.

1 Like

Thanks for your quick response. I already have promtail agent installed in vm and sending log files to loki and able to see logs in grafana. But with respect to Bdd test result, which is a huge json file with nested arrays and with lots of data and information in it. It seems I’m not able to get the result I look for. Basically I’m trying to parse JSON arrray and need to create dashboard based few key and value pairs. Is there any other better approach then Loki to ingest bdd test result created in cucumber ?

I know nothing about BDD or Cucumber, but if you are trying to parse a huge JSON file, how about using the Infinity plugin with jsonata, or even a simple Node-RED program set up to receive & decode the file, then send the parts you want to keep into InfluxDB, Postgres, etc.

Thanks grant for your reply. As I mentioned the bdd test result contains nested JSON array however grafana Loki not able to take the nested json array key as label. Is there any way we can parse Json data and create label as nested json array key

Sample json format:
“level”: “info”,
“msg”: “This is the message”,
“stats”: {
“Filedetails”: [
"File”: “file1”,
“name”: “path/to/file/1”
"File”: “file2”,
“name”: “path/to/file/2”

I need to label “Filedetails.File” key as label from grafana Loki. Is that it is feasible?