MCPcopy Create free account
hub / github.com/avoidwork/tenso / parameterizedTests

Function parameterizedTests

benchmarks/load-test.js:446–465  ·  view source on GitHub ↗

* Parameterized endpoint tests

(server)

Source from the content-addressed store, hash-verified

444 * Parameterized endpoint tests
445 */
446async function parameterizedTests (server) {
447 const baseUrl = `http://localhost:${server.server.address().port}`;
448
449 console.log("\n🔥 Parameterized Endpoint Tests");
450 console.log("=".repeat(50));
451
452 // Generate URLs with different user IDs
453 const userIds = Array.from({ length: 100 }, (_, i) => i + 1);
454 const requests = userIds.map(id => ({ path: `/users/${id}` }));
455
456 const result = await runLoadTest({
457 title: "Parameterized Routes Test",
458 url: baseUrl,
459 requests: requests,
460 connections: 25,
461 duration: 15
462 });
463
464 return [{ title: "Parameterized Routes", result }];
465}
466
467/**
468 * Mixed workload tests

Callers 1

mainFunction · 0.85

Calls 2

runLoadTestFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected