Interface Internet

Generator to generate internet related entries.

interface Internet {
    chromeUserAgent(): string;
    domainName(): string;
    domainSuffix(): string;
    firefoxUserAgent(): string;
    httpMethod(): string;
    httpStatusCode(): number;
    httpStatusCodeSimple(): number;
    httpVersion(): string;
    imageUrl(width: number, height: number): string;
    inputName(): string;
    ipv4Address(): string;
    ipv6Address(): string;
    logLevel(): string;
    macAddress(): string;
    operaUserAgent(): string;
    password(lower: boolean, upper: boolean, numeric: boolean, special: boolean, space: boolean, length: number): string;
    safariUserAgent(): string;
    url(): string;
    userAgent(): string;
    username(): string;
}

Methods

  • The specific identification string sent by the Google Chrome web browser when making requests on the internet.

    Returns string

    a random chrome user agent

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.chromeUserAgent())
    }

    Output (formatted as JSON value)

    "Mozilla/5.0 (X11; Linux i686) AppleWebKit/5340 (KHTML, like Gecko) Chrome/40.0.816.0 Mobile Safari/5340"
    
  • Human-readable web address used to identify websites on the internet.

    Returns string

    a random domain name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.domainName())
    }

    Output (formatted as JSON value)

    "internalenhance.org"
    
  • The part of a domain name that comes after the last dot, indicating its type or purpose.

    Returns string

    a random domain suffix

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.domainSuffix())
    }

    Output (formatted as JSON value)

    "info"
    
  • The specific identification string sent by the Firefox web browser when making requests on the internet.

    Returns string

    a random firefox user agent

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.firefoxUserAgent())
    }

    Output (formatted as JSON value)

    "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_9_1 rv:5.0) Gecko/1979-07-30 Firefox/37.0"
    
  • Verb used in HTTP requests to specify the desired action to be performed on a resource.

    Returns string

    a random http method

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.httpMethod())
    }

    Output (formatted as JSON value)

    "HEAD"
    
  • Random http status code.

    Returns number

    a random http status code

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.httpStatusCode())
    }

    Output (formatted as JSON value)

    400
    
  • Three-digit number returned by a web server to indicate the outcome of an HTTP request.

    Returns number

    a random http status code simple

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.httpStatusCodeSimple())
    }

    Output (formatted as JSON value)

    200
    
  • Number indicating the version of the HTTP protocol used for communication between a client and a server.

    Returns string

    a random http version

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.httpVersion())
    }

    Output (formatted as JSON value)

    "HTTP/1.0"
    
  • Web address pointing to an image file that can be accessed and displayed online.

    Parameters

    • width: number

      Width

    • height: number

      Height

    Returns string

    a random image url

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.imageUrl(500,500))
    }

    Output (formatted as JSON value)

    "https://picsum.photos/500/500"
    
  • Attribute used to define the name of an input element in web forms.

    Returns string

    a random input name

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.inputName())
    }

    Output (formatted as JSON value)

    "last_name"
    
  • Numerical label assigned to devices on a network for identification and communication.

    Returns string

    a random ipv4 address

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.ipv4Address())
    }

    Output (formatted as JSON value)

    "234.106.177.171"
    
  • Numerical label assigned to devices on a network, providing a larger address space than IPv4 for internet communication.

    Returns string

    a random ipv6 address

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.ipv6Address())
    }

    Output (formatted as JSON value)

    "3aea:ef6a:38b1:7cab:7f0:946c:a3a9:cb90"
    
  • Classification used in logging to indicate the severity or priority of a log entry.

    Returns string

    a random log level

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.logLevel())
    }

    Output (formatted as JSON value)

    "error"
    
  • Unique identifier assigned to network interfaces, often used in Ethernet networks.

    Returns string

    a random mac address

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.macAddress())
    }

    Output (formatted as JSON value)

    "87:2d:cd:bc:0d:f3"
    
  • The specific identification string sent by the Opera web browser when making requests on the internet.

    Returns string

    a random opera user agent

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.operaUserAgent())
    }

    Output (formatted as JSON value)

    "Opera/10.45 (X11; Linux i686; en-US) Presto/2.13.288 Version/13.00"
    
  • Secret word or phrase used to authenticate access to a system or account.

    Parameters

    • lower: boolean

      Lower

    • upper: boolean

      Upper

    • numeric: boolean

      Numeric

    • special: boolean

      Special

    • space: boolean

      Space

    • length: number

      Length

    Returns string

    a random password

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.password(true,false,true,true,false,12))
    }

    Output (formatted as JSON value)

    "z42x8h!47-9r"
    
  • The specific identification string sent by the Safari web browser when making requests on the internet.

    Returns string

    a random safari user agent

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.safariUserAgent())
    }

    Output (formatted as JSON value)

    "Mozilla/5.0 (iPhone; CPU iPhone OS 7_3_2 like Mac OS X; en-US) AppleWebKit/534.34.8 (KHTML, like Gecko) Version/3.0.5 Mobile/8B114 Safari/6534.34.8"
    
  • Web address that specifies the location of a resource on the internet.

    Returns string

    a random url

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.url())
    }

    Output (formatted as JSON value)

    "http://www.forwardtransition.biz/enhance/benchmark"
    
  • String sent by a web browser to identify itself when requesting web content.

    Returns string

    a random user agent

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.userAgent())
    }

    Output (formatted as JSON value)

    "Mozilla/5.0 (X11; Linux i686) AppleWebKit/5311 (KHTML, like Gecko) Chrome/37.0.834.0 Mobile Safari/5311"
    
  • Unique identifier assigned to a user for accessing an account or system.

    Returns string

    a random username

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.internet.username())
    }

    Output (formatted as JSON value)

    "Abshire5538"