mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
test: Add custom reporter for test metrics (#18960)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import { test, expect } from '../../fixtures/cloud';
|
||||
import type { n8nPage } from '../../pages/n8nPage';
|
||||
import { measurePerformance } from '../../utils/performance-helper';
|
||||
import { measurePerformance, attachMetric } from '../../utils/performance-helper';
|
||||
|
||||
async function setupPerformanceTest(n8n: n8nPage, size: number) {
|
||||
await n8n.goHome();
|
||||
@@ -25,7 +25,7 @@ async function setupPerformanceTest(n8n: n8nPage, size: number) {
|
||||
}
|
||||
|
||||
test.describe('Large Node Performance - Cloud Resources', () => {
|
||||
test('Large workflow with starter plan resources @cloud:starter', async ({ n8n }) => {
|
||||
test('Large workflow with starter plan resources @cloud:starter', async ({ n8n }, testInfo) => {
|
||||
await setupPerformanceTest(n8n, 30000);
|
||||
const loopSize = 20;
|
||||
const stats = [];
|
||||
@@ -49,6 +49,10 @@ test.describe('Large Node Performance - Cloud Resources', () => {
|
||||
}
|
||||
const average = stats.reduce((a, b) => a + b, 0) / stats.length;
|
||||
console.log(`Average open node duration: ${average.toFixed(1)}ms`);
|
||||
|
||||
// Attach performance metric using helper method
|
||||
await attachMetric(testInfo, 'open-node-30000', average, 'ms');
|
||||
|
||||
expect(average).toBeLessThan(5000);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user