spacewander commented on a change in pull request #5625:
URL: https://github.com/apache/apisix/pull/5625#discussion_r757836595



##########
File path: docs/en/latest/internal/testing-framework.md
##########
@@ -286,3 +286,24 @@ ONLY:
 --- response_body
 
{"action":"get","count":0,"node":{"dir":true,"key":"/apisix/upstreams","nodes":{}}}
 ```
+
+### Executing Shell Commands
+
+It is possible to execute shell commands while writing tests in Test Nginx for 
apisix modules. We exeposes this feature via `exec` code block. The `stdout` of 
the executed process can be captured via `response_body` code block and 
`stderr` (if any) can be captured by filtering error.log through 
`grep_error_log`. Here is an example:

Review comment:
       ```suggestion
   It is possible to execute shell commands while writing tests in test-nginx 
for APISIX. We expose this feature via `exec` code block. The `stdout` of the 
executed process can be captured via `response_body` code block and `stderr` 
(if any) can be captured by filtering error.log through `grep_error_log`. Here 
is an example:
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to