【正文】
測(cè)試的負(fù)荷及壓力測(cè)試,使用比較方便,可以編寫測(cè)試腳本,也可以先行自動(dòng)生成測(cè)試腳本,而后對(duì)于應(yīng)用測(cè)試腳本進(jìn)行測(cè)試。 CSE HTML Validator 一個(gè)有用的對(duì)于HTML代碼進(jìn)行合法性檢查的工具 Ab(Apache Bench) Apache自帶的對(duì)于性能測(cè)試方面的工具,功能不是很多,但是非常實(shí)用。 例:在XP系統(tǒng)下調(diào)試asp文件出錯(cuò)的問題解決辦法:錯(cuò)誤內(nèi)型: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC Microsoft Access Driver] 不能更新。數(shù)據(jù)庫(kù)或?qū)ο鬄橹蛔x。/Admin/, 第 120 行分析:第一句:還沒弄清楚, 第二句:數(shù)據(jù)庫(kù)為指讀對(duì)像那當(dāng)然不能瀏覽了,查看一下數(shù)據(jù)庫(kù),并非指讀對(duì)像。第三句:錯(cuò)誤文件既然以上的都錯(cuò)誤,都并程序本身,那就證明跟系統(tǒng)設(shè)置有關(guān)解決方法:找到存放IIS文件下的父文件夾,看它屬性,找到安全這一項(xiàng):如圖:圖片有點(diǎn)大,請(qǐng)點(diǎn)擊觀看, xywy1985/然后在這一項(xiàng): 然后在IE輸入:,看看你剛才訪問不了的asp文件,現(xiàn)在可以訪問了。其它調(diào)試文件出錯(cuò)的解決辦法在這里就不一一列舉了。三、體會(huì)經(jīng)過調(diào)試與測(cè)試,感覺受益非淺,對(duì)網(wǎng)站制作有了更深的了解,特總結(jié)如下:.asp程序要放在iis的虛擬目錄下才能運(yùn)行,在iis里設(shè)置能匿名訪問,讀取并可以執(zhí)行腳本,如果想要往服務(wù)器寫數(shù)據(jù)的話,比如說(shuō)fso還要打開寫入功能,如果要執(zhí)行cgi等可執(zhí)行程序,如一些語(yǔ)音聊天室等插件,還要把執(zhí)行權(quán)限打開. 虛擬目錄最好指定在fat32下,如果放到ntfs下的話,數(shù)據(jù)庫(kù)文件要讓iis用戶(一般是iusr_加上你的機(jī)器名字)能完全訪問,如果是access數(shù)據(jù)庫(kù)的話,還要設(shè)置數(shù)據(jù)庫(kù)的那個(gè)文件夾的權(quán)限讓iusr_完全訪問, 如果出什么500錯(cuò)誤的話,在瀏覽器的internet選項(xiàng)/高級(jí)里把友好提示的鉤去掉,就可以看到你寫大代碼到底是那里出錯(cuò)了,這樣就容易找到錯(cuò)誤了 如果操作數(shù)據(jù)庫(kù)出錯(cuò)的話,可以把執(zhí)行sql的字符串讀出來(lái)看看對(duì)不對(duì),例如:(strsql) 養(yǎng)成良好的編程習(xí)慣,表單提交前先用js腳本驗(yàn)證,變量比較的時(shí)候要顯式轉(zhuǎn)換成同一類型,用option語(yǔ)句,確保變量先聲明后使用,不要忘記顯式關(guān)閉記錄集。 例:調(diào)試函數(shù)如下: %39。39。程序作用:39。 FormData()function FormData()Dim llngMaxFieldIndexDim llngFieldIndexDim llngMaxValueIndexDim llngValueIndexDim lstrDebug39。 Count FormllngMaxFieldIndex = 39。 Let user know if Form Do Not existif llngMaxFieldIndex = 0 ThenFormData = Form data is empty.Exit functionEnd if39。 Begin building a list of all FormlstrDebug = OL39。 Loop through Each FormFor llngFieldIndex = 1 To llngMaxFieldIndexlstrDebug = lstrDebug amp。 LI amp。 ((llngFieldIndex))39。 Count the valuesllngMaxValueIndex = (llngFieldIndex).Count39。 if the Field doesn39。t have multiple values ...if llngMaxValueIndex = 1 ThenlstrDebug = lstrDebug amp。 = lstrDebug = lstrDebug amp。 ((llngFieldIndex))39。 Else Loop through Each valueElselstrDebug = lstrDebug amp。 OLFor llngValueIndex = 1 To llngMaxValueIndexlstrDebug = lstrDebug amp。 LIlstrDebug = lstrDebug amp。 ((llngFieldIndex)(llngValueIndex))lstrDebug = lstrDebug amp。 /LINextlstrDebug = lstrDebug amp。 /OLEnd iflstrDebug = lstrDebug amp。 /LINextlstrDebug = lstrDebug amp。 /OL39。 Return the dataFormData = lstrDebugEnd function%% 39。39。函數(shù)功能:,用于調(diào)試!39。 QueryStringData()function QueryStringData()Dim llngMaxFieldIndexDim llngFieldIndexDim llngMaxValueIndexDim llngValueIndexDim lstrDebug39。 Count QueryStringllngMaxFieldIndex = 39。 Let user know if QueryString Do Not existif llngMaxFieldIndex = 0 ThenQueryStringData = QueryString data is empty.Exit functionEnd if39。 Begin building a list of all QueryStringlstrDebug = OL39。 Loop through Each QueryStringFor llngFieldIndex = 1 To llngMaxFieldIndexlstrDebug = lstrDebug amp。 LI amp。 ((llngFieldIndex))39。 Count the valuesllngMaxValueIndex = (llngFieldIndex).Count39。 if the Field doesn39。t have multiple values ...if llngMaxValueIndex = 1 ThenlstrDebug = lstrDebug amp。 = lstrDebug = lstrDebug amp。 ((llngFieldIndex))39。 Else Loop through Each valueElselstrDebug = lstrDebug amp。 OLFor llngValueIndex = 1 To llngMaxValueIndexlstrDebug = lstrDebug amp。 LIlstrDebug = lstrDebug amp。 ((llngFieldIndex)(llngValueIndex))lstrDebug = lstrDebug amp。 /LINextlstrDebug = lstrDebug amp。 /OLEnd iflstrDebug = lstrDebug amp。 /LINextlstrDebug = lstrDebug amp。 /OL39。 Return the dataQueryStringData = lstrDebugEnd function%,錯(cuò)誤處理就更簡(jiǎn)單了.40