I am trying to assert the response for a HTTP GET
execution:
- executor: selenium
scenario: dashboard
iterations: 1
reporting:
- module: final-stats
dump-xml: results/test.xml
dump-csv: results/test2.csv
- module: junit-xml
filename: results/testfinal.xml
data-source: pass-fail
modules:
console:
disable: true
scenarios:
dashboard:
browser: Chrome
timeout: 60s
default-address: https://${URL}
requests:
- label: ignore
url: https://${URL}
actions:
- waitByXPath(/html/body/div/div[2]/div/div/div/div[4]/div[2]/form/input[4]): Visible
- keysByXPath(/html/body/div/div[2]/div/div/div/div[4]/div[2]/form/input[4]): ${USERNAME}
- keysByXPath(/html/body/div/div[2]/div/div/div/div[4]/div[2]/form/input[5]): ${PASSWORD}
- clickByXPath(/html/body/div/div[2]/div/div/div/div[4]/div[2]/form/div[4]/button)
- url: /Sites/testsite/api/level1/status/auth-service-health-check
method: GET
assert:
- contains:
- 200
subject: status-code
Error i am getting is "TypeError: first argument must be string or compiled pattern"
Please can any one help with this All what i need to check is whether the reponse status is 200 for url: /Sites/testsite/api/level1/status/auth-service-health-check
issue is on here exactly
- contains:
- 200
subject: status-code
if i add like this error disappeared but then it checking the response body not status code
- contains:
- '200'
subject: status-code