@apica-io/url-xi
Version:
URL Check for integrations and API monitoring
84 lines (79 loc) • 2.2 kB
JSON
{
"$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://badssl.com",
"includes": [
{
"name": "key_pem",
"type": "certificate",
"scope": "project",
"src": "file.key_err.pem"
},
{
"name": "cert_pem",
"type": "certificate",
"scope": "project",
"src": "file.cert.pem"
}
],
"steps": [
{
"name": "Client pages",
"httpsAgent": {
"rejectUnauthorized": true,
"key": "{{$cert.key_pem}}",
"cert": "{{$cert.cert_pem}}"
},
"requests": [
{
"name":"Client",
"config":{
"url": "https://client.badssl.com"
},
"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
}
]
},
{
"name":"Client Cert Missing",
"config":{
"url": "https://client-cert-missing.badssl.com/"
},
"expectedStatus": [400],
"extractors": [
{
"type": "regexp",
"expression": "<title>400 The SSL certificate error</title>",
"variable": "responseValidation"
}
],
"assertions": [
{
"type": "javaScript",
"value": "{{responseValidation}}",
"description": "Html title must contain SSL certificate error",
"expression": "value.length > 0 ",
"failStep": true,
"reportFailOnly": false
}
]
}
]
}
]
}