bel2125 8ccd6f7270 Convert system info text to JSON format %!s(int64=8) %!d(string=hai) anos
..
ajax 6d3cbb697f Update manual tests %!s(int64=9) %!d(string=hai) anos
dir with spaces d864d72470 On windows, enclosing path to CGI script in quotes to allow paths with spaces %!s(int64=12) %!d(string=hai) anos
imagetest 4872116f19 image test: File extension is case sensitive for Linux %!s(int64=10) %!d(string=hai) anos
.leading.dot.txt a69a2da39d Initial import - converting from Subversion. %!s(int64=15) %!d(string=hai) anos
1000images.lua 72b3d3deb2 Reduce test default from 10000 images to 1000 (number can be configured as ?cnt=1000) %!s(int64=10) %!d(string=hai) anos
100images.htm 6d3cbb697f Update manual tests %!s(int64=9) %!d(string=hai) anos
CMakeLists.txt ac059742a0 Improve unit tests %!s(int64=8) %!d(string=hai) anos
HugeText.lua a9cdd7960c Test 'require' of other Lua libs %!s(int64=11) %!d(string=hai) anos
MakefileTest.mk 16b31002e7 Updated test makefile to eb easier to read. %!s(int64=11) %!d(string=hai) anos
MethodTest.xhtml 01711abd46 Test even more HTTP methods %!s(int64=10) %!d(string=hai) anos
README.md 548baf792c Added check unit tests %!s(int64=10) %!d(string=hai) anos
all_build_flags.pl cd94fb9bdc Changed exec permissions on perl test programs %!s(int64=11) %!d(string=hai) anos
bad.cgi a69a2da39d Initial import - converting from Subversion. %!s(int64=15) %!d(string=hai) anos
bad2.cgi 82bcf523f3 added %!s(int64=13) %!d(string=hai) anos
bad_page.lp 66aa28b234 Add a bad lua script and a bad lua page for test purposes %!s(int64=9) %!d(string=hai) anos
bad_script.lua 66aa28b234 Add a bad lua script and a bad lua page for test purposes %!s(int64=9) %!d(string=hai) anos
cgi_test.c 226167b881 Add test to reproduce #296 %!s(int64=9) %!d(string=hai) anos
cgi_test.html 1b4b8b8fc7 Add HTML page for CGI test (#296) %!s(int64=9) %!d(string=hai) anos
civetweb_check.h 9e18539efa Automated unit test: Set timeout for all server tests %!s(int64=8) %!d(string=hai) anos
cors.html 7a366c45b2 CORS test should work with default port 8080 %!s(int64=10) %!d(string=hai) anos
cors.reply.html c498dde851 Add cross-origin resource sharing (CORS) test %!s(int64=11) %!d(string=hai) anos
cors.reply.lua 158e71c8e6 Add support for access_control_allow_headers %!s(int64=8) %!d(string=hai) anos
cors.reply.shtml c62ded82e8 CORS for SSI pages %!s(int64=11) %!d(string=hai) anos
echo.lua 7539ab1172 Add websocket echo test %!s(int64=8) %!d(string=hai) anos
embed.c ec9d5413a8 replace Windows CRLF with Unix newline %!s(int64=10) %!d(string=hai) anos
env.cgi da75a62a32 More tests %!s(int64=13) %!d(string=hai) anos
error.lua b5da6dbcaa Lua error handler for all errors %!s(int64=11) %!d(string=hai) anos
error404.htm 4b0bfbb55b Error4xx page should be an error404 page. The error 403 (e.g., list a directory if enable_directory_listing no is configured) will show the error.lua page %!s(int64=11) %!d(string=hai) anos
exit.lua 1473a00ce2 Add Lua script to exit the server %!s(int64=9) %!d(string=hai) anos
exploit.pl cd94fb9bdc Changed exec permissions on perl test programs %!s(int64=11) %!d(string=hai) anos
filehandler.lua aa6dd2f84e Add example for a Lua file handler %!s(int64=9) %!d(string=hai) anos
form.html b08b61d0d2 Alternative to mg_upload (Step 7/?) %!s(int64=9) %!d(string=hai) anos
handle_form.lua 8dea7de0c4 Dump file content as hex in handle_form example %!s(int64=10) %!d(string=hai) anos
hello.cgi a69a2da39d Initial import - converting from Subversion. %!s(int64=15) %!d(string=hai) anos
hello.shtml a2178b9045 New test for server side includes (SSI) %!s(int64=9) %!d(string=hai) anos
hello.txt a69a2da39d Initial import - converting from Subversion. %!s(int64=15) %!d(string=hai) anos
hello_gz.txt.gz 94b38ccc65 Add zipped test file %!s(int64=10) %!d(string=hai) anos
hello_gz_unzipped.txt 94b38ccc65 Add zipped test file %!s(int64=10) %!d(string=hai) anos
html_esc.lua d8adb70f43 Character encoding converstion functions for Lua (as test/example) %!s(int64=11) %!d(string=hai) anos
linux.cgi a6eb2d232f Linux shell scripts used as CGI process must still return \r\n at the end of header lines %!s(int64=9) %!d(string=hai) anos
linux_fail.cgi c9bb894b84 Redirect stderr of CGI process to error log (Step 3/3) %!s(int64=10) %!d(string=hai) anos
linux_fail_silent.cgi c9bb894b84 Redirect stderr of CGI process to error log (Step 3/3) %!s(int64=10) %!d(string=hai) anos
lua_preload_file.lua 4f3c267731 Add test for lua_preload_file %!s(int64=11) %!d(string=hai) anos
main.c 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
page.lp 6ed309a7ac Update link in test scripts %!s(int64=8) %!d(string=hai) anos
page.lua 6ed309a7ac Update link in test scripts %!s(int64=8) %!d(string=hai) anos
page.ssjs 4189a556ab Fix Duktape test: rename function in test %!s(int64=9) %!d(string=hai) anos
page2.lp 533eac37cd Add library test for Lua5.3 %!s(int64=10) %!d(string=hai) anos
page2.lua 096b5472a0 Add Lua function to list all options %!s(int64=8) %!d(string=hai) anos
page2.ssjs e9860d7180 Duktape example: show content of civetweb specific javascript objects %!s(int64=9) %!d(string=hai) anos
page3.lp 53144a0904 Add test page for mg.include %!s(int64=8) %!d(string=hai) anos
page3.lua 9bb13c9232 Add parameter checking in var_get %!s(int64=11) %!d(string=hai) anos
page3.ssjs 9a9a424511 Duktape: Add http_headers %!s(int64=9) %!d(string=hai) anos
page4.lua 01998fbcfe Add UUID for Lua (in Linux). See also #140. %!s(int64=9) %!d(string=hai) anos
page5.lua f030c1c71e Add very simple test page (created by Lua) %!s(int64=8) %!d(string=hai) anos
page_keep_alive.lua 6ed309a7ac Update link in test scripts %!s(int64=8) %!d(string=hai) anos
page_keep_alive_chunked.lua aae7646e90 Cache control (see also #201) (Step 1/?) %!s(int64=9) %!d(string=hai) anos
page_status.lua 8ccd6f7270 Convert system info text to JSON format %!s(int64=8) %!d(string=hai) anos
passfile a69a2da39d Initial import - converting from Subversion. %!s(int64=15) %!d(string=hai) anos
prime.ssjs 799a8e0f19 Duktape: Store connection object as internal property on the Ecmascript function object %!s(int64=9) %!d(string=hai) anos
private.c 6e448f1392 Rewrite request parsing (Step 25/?) %!s(int64=8) %!d(string=hai) anos
private.h 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
private_exe.c 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
private_exe.h 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
public_func.c 48f210ec2c Improve unit tests %!s(int64=8) %!d(string=hai) anos
public_func.h 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
public_server.c 9e18539efa Automated unit test: Set timeout for all server tests %!s(int64=8) %!d(string=hai) anos
public_server.h 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
require_test.lua a9cdd7960c Test 'require' of other Lua libs %!s(int64=11) %!d(string=hai) anos
resource_script_demo.lua e497dd34f8 Test for chunked transfer encoding (#95, #98) %!s(int64=10) %!d(string=hai) anos
shared.c 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
shared.h 0e1a352855 Update copyright year %!s(int64=8) %!d(string=hai) anos
ssi_test.shtml a2178b9045 New test for server side includes (SSI) %!s(int64=9) %!d(string=hai) anos
syntax_error.ssjs 9308cbd16d Duktape: Create 'conn' object with 'read' and 'write' function %!s(int64=9) %!d(string=hai) anos
test.ico 32cbb48710 Allow to specify title and tray icon for the Windows standalone server %!s(int64=11) %!d(string=hai) anos
test.pl cd94fb9bdc Changed exec permissions on perl test programs %!s(int64=11) %!d(string=hai) anos
testclient.c 6b92c512f5 Rename include Windows.h to windows.h for cross-compilation from Linux to Windows %!s(int64=8) %!d(string=hai) anos
timeout.cgi 08bf149d85 timeout.cgi test sometimes failed. %!s(int64=14) %!d(string=hai) anos
timertest.c 3924d27aa5 Remove old instrumentation and format code %!s(int64=8) %!d(string=hai) anos
timertest.h 7ec97f166a Add unit test for timers %!s(int64=8) %!d(string=hai) anos
websocket.lua ed72d40adf Websocket test should support WSS %!s(int64=11) %!d(string=hai) anos
websocket.xhtml 1a273e421d Fix for issue #77 (Step 1/?) %!s(int64=10) %!d(string=hai) anos
windows.cgi ceb5f39461 Add CGI test for windows, that does not need an extra interpreter %!s(int64=10) %!d(string=hai) anos
windows.cgi.cmd 1286e26b43 Windows minimal CGI test: HTTP method and status code are sent by the framework and windows.cgi.cmd must be in the PATH %!s(int64=10) %!d(string=hai) anos
windows_fail.cgi d8adf7d640 Redirect stderr of CGI process to error log (Step 2/3) %!s(int64=10) %!d(string=hai) anos
windows_fail.cgi.cmd d8adf7d640 Redirect stderr of CGI process to error log (Step 2/3) %!s(int64=10) %!d(string=hai) anos
windows_fail_silent.cgi d8adf7d640 Redirect stderr of CGI process to error log (Step 2/3) %!s(int64=10) %!d(string=hai) anos
windows_fail_silent.cgi.cmd d8adf7d640 Redirect stderr of CGI process to error log (Step 2/3) %!s(int64=10) %!d(string=hai) anos
ws_status.lua bd2e80ca53 Prepare data for server status (Step 20/?) (See #243) %!s(int64=8) %!d(string=hai) anos
x.php 771ce9059c added %!s(int64=12) %!d(string=hai) anos

README.md

Testing

C API

The unit tests leverage the CTest and Check frameworks to provide a easy environment to build up unit tests. They are split into Public and Private test suites reflecting the public and internal API functions of civetweb.

When adding new functionality to civetweb tests should be written so that the new functionality will be tested across the continuous build servers. There are various levels of the unit tests:

  • Tests are included in
  • Test Cases which are there are multiple in
  • Test Suites which are ran by the check framework by
  • civetweb-unit-tests which is driven using the --suite and --test-case arguments by
  • CTest via add_test in CMakeLists.txt

Each test suite and test case is ran individually by CTest so that it provides good feedback to the continuous integration servers and also CMake. Adding a new test case or suite will require the corresponding add_test driver to be added to CMakeLists.txt