データベースを使った機能テストや単体テストについて要点をまとめておきます。
筆者の経験を強く反映していますので比較的定性的な内容となります事を予めご了承下さい。
テストの実行前に投入するテストデータは、凡そcsvファイルやxmlファイル、エクセルファイル等で管理する事になります。
仕様の変更に伴いテーブルの定義を変更する事で、それらのファイルの内容とデータベースの間に不整合が発生します。
(function(){ | |
jQuery.fn.__init = jQuery.fn.init; | |
var old_expr = /^(?:[^<]*(<[\w\W]+>)[^>]*$)/; | |
var strict_expr = /^\s*</; | |
jQuery.fn.init = function(selector, context, rootjQuery){ | |
if (typeof selector === "string") { | |
// console.log(selector); | |
if (old_expr.test(selector) && !strict_expr.test(selector)) { | |
throw 'Syntax error, html string must start with "<"'; | |
} |
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |