github.com/kubeshop/testkube@v1.17.23/contrib/executor/curl/README.md (about) 1  2 3 # Welcome to testkube Executor Curl 4 5 testkube Executor Curl is the test executor for [testkube](https://testkube.io) that is using [Curl](https://curl.se/). 6 7 # Issues and enchancements 8 9 Please follow to main testkube repository for reporting any [issues](https://github.com/kubeshop/testkube/issues) or [discussions](https://github.com/kubeshop/testkube/discussions) 10 11 ## Details 12 13 Curl executor is a very simple one, it runs a curl command given as the input and check the response for expected status and body, the input is of form 14 15 ```js 16 { 17 "command": [ 18 "curl", 19 "https://reqbin.com/echo/get/json", 20 "-H", 21 "'Accept: application/json'" 22 ], 23 "expected_status": "200", 24 "expected_body": "{\"success\":\"true\"}" 25 } 26 ``` 27 28 Templates can be used to parametrize input 29 30 ```js 31 { 32 "command": [ 33 "curl", 34 "{{.url}}", 35 "-H", 36 "'{{.header}}'" 37 ], 38 "expected_status": "{{.status}}", 39 "expected_body": "{{.body}}" 40 } 41 ``` 42 43 and the parameters will be passed by testkube using param flag ```--param key=value``` 44 45 the executor will check if the response has `expected_status` and if body of the response contains the `expected_body`. 46 47 The type of the test CRD should be `curl/test`. 48 49 ## API 50 51 testkube Executor Curl implements [testkube OpenAPI for executors](https://docs.testkube.io/openapi) (look at executor tag)