Generator to generate file related entries.
Suffix appended to a filename indicating its format or type.
a random file extension
import { Faker } from "k6/x/faker"let faker = new Faker(11)export default function () { console.log(faker.file.fileExtension())} Copy
import { Faker } from "k6/x/faker"let faker = new Faker(11)export default function () { console.log(faker.file.fileExtension())}
Output (formatted as JSON value)
"max" Copy
"max"
Defines file format and nature for browsers and email clients using standardized identifiers.
a random file mime type
import { Faker } from "k6/x/faker"let faker = new Faker(11)export default function () { console.log(faker.file.fileMimeType())} Copy
import { Faker } from "k6/x/faker"let faker = new Faker(11)export default function () { console.log(faker.file.fileMimeType())}
"text/html" Copy
"text/html"
Generator to generate file related entries.