{
  "$schema": "file:///usr/local/lib/node_modules/@apica-io/url-xi/config/url-xi-schema-v1-0.json",
  "name": "Test Client with ssl certificates",
  "description": "The site is badssl.com",
  "baseURL": "https://client.badssl.com",
  "httpsAgent": {
    "rejectUnauthorized": false, 
    "pfx": "{{$cert.client.p12}}",
    "password":"badssl.com",
    "passphrase":"badssl.com"
  },
  "includes": [
    {
      "name": "client.p12",
      "type": "certificate",
      "scope": "project",
      "src": "badssl.com-client.p12"
    }
  ],
  "steps": [
    {
      "name": "Get Home page",
      "iterator": {"value": "2"},
    
      
      "requests": [
        {
          "config":{
            "url": "/"
          },
          "extractors": [
            {
              "type": "regexp",
              "expression": "(Client-authenticated_TLS_handshake)",
              "variable": "responseValidation"
            }
          ],
          "assertions": [
            {
              "type": "javaScript",
              "value": "{{responseValidation}}",
              "description": "Html body must contain Client-authenticated",
              "expression": "value.length >0 ",
              "failStep": true,
              "reportFailOnly": false
            }
          ]
        }
      ]
      
    }
  ]
}