NodeJS Artillery with self signed client certificates

266 Views Asked by At

I installed the latest versions of nodejs and Artilliery. I want to do load tests using Artillery in this yml:

config:
  target: "https://my.ip.address:443"
  phases:
    - duration: 60
      arrivalCount: 100
  tls:
    rejectUnauthorized: false
    client:
      key: "./key.pem"
      cert: "./certificate.pem"
      ca: "./ca.cert"
      passphrase: "mypass"
    onError:
       - log: "Error: invalid tls configuration"
    extendedMetrics: true
  https:
    extendedMetrics: true
  logging:
      level: "debug"
scenarios:
  - flow:
    - log: "Current environment is set to: {{ $environment }}"
    - get:
       url: "/myapp/"
       #sslAuth: false
       capture:
          json: "$.data"
          as: "data"
          failOnError: true
          log: "Error: capturing ${json.error}"
       check:
          - json: "$.status"
            as: "status"
            comparison: "eq"
            value: 200
            not: true
            capture:
              json: "$.error"
              as: "error"
            log: "Error: check ${error}"
plugins:
    http-ssl-auth: {}

I run Artillery with:

artillery -e production config_tests.yml

I checked the certificates, they are working when used in other applications. They are generated with Openssl

But, all the virtual users fail with error: errors.EPROTO.

Could you please help me find a solution? Thanks in advance!

0

There are 0 best solutions below