Welcome! Log In Create A New Profile

Advanced

[ANN] Test::Nginx 0.21 released

agentzh
September 27, 2012 03:26PM
Hello, folks!

I've just uploaded Test::Nginx 0.21 to CPAN, which features embeded
TCP/UDP mocking server support and SystemTap integration for white-box
testing:

http://search.cpan.org/perldoc?Test::Nginx

It will appear on the CPAN mirror near you in the next few hours or so.

Special thanks go to all our contributors and users :)

Here's the complete change log for this release, as compared to the
last CPAN release, 0.20, released three months ago:

* feature: added support for SystemTap: the SystemTap white-box
testing mode is enabled by setting TEST_NGINX_USE_STAP=1 and by
using new test sections "--- stap", "--- stap_out", and "---
stap_out_like".

* feature: added support for new sections "--- udp_listen" and
"--- udp_reply" for mocking an internal UDP server.

* feature: added new section "--- udp_reply_delay" and also make
"--- udp_reply_delay" and "--- timeout" sections accept time
values with a time unit which can be either "s" or "ms".

* feature: added new section "--- udp_query" to test if the UDP
query sent to the embeded UDP server is expected.

* feature: added new section "--- tcp_query_len" to work with
mockeagain testing modes.

* feature: added support for embedded TCP server by introducing
new sections "--- tcp_listen", "--- tcp_query", "--- tcp_reply",
and "--- tcp_reply_delay".

* feature: added new section "--- tcp_no_close" to tell the
embedded TCP server (if any) never close the connection
actively. this is feature is mainly for mocking upstream reply
read time out in the middle.

* feature: added new section "--- log_level" to specify the error
log level on a test-by-test basis.

* bugfix: we might lose logs at config-time when
TEST_NGINX_USE_HUP=1 because we sent HUP before USR1.

* bugfix: be more tolarent when removing the nginx pid file while
the nginx process is not running.

* optimize: now we can automatically check the version of the
current nginx configuration and retry dozens of times when
TEST_NGINX_USE_HUP=1. this speed up the test suite in this mode
a lot and also avoid accidental failures due to slow nginx
reloads.

* bugfix: try harder when failing to connect to the Nginx server.

* refactor: now we use the standard "return" directive instead of
"echo" for detecting nginx config reload completion for the "HUP
reload" testing mode.

* refactor: use waitpid() wherever possible.

* bugfix: Parallel::ForkManager does not allow the user calling
waitpid directly, or inifinite looping might happen when calling
its start() method. now we no longer use this module any more
and use the fork() builtin function exclusively.

* bugfix: disabled the ending output "Looks like you ..." when the
client socket timed out.

* refactor: now we disabled the access log by default.

* updated the bundled versions of Test::Builder and Test::More
modules.

* docs: documented the "--- skip_nginx" and "--- skip_nginx2"
sections. thanks Weibin Yao for requesting it.

This Perl module provides a test scaffold based on IO::Socket or LWP
for automated testing in Nginx C module or ngx_lua-based Lua library
development.

This class inherits from Test::Base, thus bringing all its declarative
power to the Nginx C module testing practices.

Please check out the full documentation on CPAN:

http://search.cpan.org/perldoc?Test::Nginx::Socket

All of our Nginx modules (as well as our lua-resty-* libraries) are
using Test::Nginx to drive their test suites.

Please note that this module is completely different from the
Test::Nginx module created by Maxim Dounin.

The git repository for this Perl module is hosted on GitHub:

https://github.com/agentzh/test-nginx

Enjoy!
-agentzh

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[ANN] Test::Nginx 0.21 released

agentzh 868 September 27, 2012 03:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 180
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready