mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
feat: enhance HTML report generation by including environment name (#6055)
This commit is contained in:
@@ -656,6 +656,9 @@ const handler = async function (argv) {
|
||||
const totalTime = results.reduce((acc, res) => acc + res.response.responseTime, 0);
|
||||
console.log(chalk.dim(chalk.grey(`Ran all requests - ${totalTime} ms`)));
|
||||
|
||||
// Extract environment name from envVars if available
|
||||
const environmentName = envVars?.__name__ || null;
|
||||
|
||||
const formatKeys = Object.keys(formats);
|
||||
if (formatKeys && formatKeys.length > 0) {
|
||||
const outputJson = {
|
||||
@@ -666,7 +669,7 @@ const handler = async function (argv) {
|
||||
const reporters = {
|
||||
'json': (path) => fs.writeFileSync(path, JSON.stringify(outputJson, null, 2)),
|
||||
'junit': (path) => makeJUnitOutput(results, path),
|
||||
'html': (path) => makeHtmlOutput(outputJson, path, runCompletionTime),
|
||||
html: (path) => makeHtmlOutput(outputJson, path, runCompletionTime, environmentName)
|
||||
}
|
||||
|
||||
for (const formatter of Object.keys(formats))
|
||||
|
||||
Reference in New Issue
Block a user