Question: Hi, its possible for generate postman collection for separate output to multi endpoint file k6?
danielit24 opened this issue · 3 comments
is it possible to convert 1 postman collections to multi file script k6?
eg : i have 1 postman collection with 3 endpoint,
when i run postman-to-k6 collection.json -so its it will generate 3 file script.js with name of endpoint.js
and then for spesific result i just run
k6 run --config config.json endpoint1.js
k6 run --config config.json endpoint2.js
hi @danielit24
you have the --separate
https://github.com/apideck-libraries/postman-to-k6#separate, which will generate separate files per request and main JS file. I showcase it around min 32: https://www.youtube.com/live/Be66Db4wHLA?feature=share&t=1935
hi @thim81 ,
Sorry i mean generate separate files per request and separate file js
because i need add thiss line of code for generate html for every endpoint i'm load test
export function handleSummary(data) {
return {
"{{ .report }}": htmlReport(data),
stdout: textSummary(data, { indent: " ", enableColors: true }),
};
}
i don't want single report html for all endpoint, i think it's bias
hi @danielit24
Generating a separate k6 script.js file per request is not currently possible by the convertor.
My workaround suggestion would be to build a custom NodeJS script that reads the generated K6 script file and creates new K6 script files from that for each request and include your export function handleSummary(data) during that process.