SilkTest學習17-Link Tester 軟件測試
SilkTest提供一個工具Link Tester,你可以用它來識別網頁或者是網站上的問題鏈接。只要指定了想要檢查的web頁面地址,想要檢查的鏈接層數,link tester就會替你自動遍歷頁面上的每一個link,并且檢查他們是否有問題。
Link Tester在測試網頁的時候會幫你節省很多時間,你可以通過SilkTest IDE上的提供Link Tester的工具來進行link的檢測,也可以使用Help里面提到的方法,在test case中自動調用link tester
view plaincopy to clipboardprint?
01.[-] testcase TestHomePage() appstate none
02. [ ] List of String ls
03. [ ] ls = ReturnLinkData ("http://silktest.blogspot.com/","http://silktest.blogspot.com/", 1)
04. [ ] ListPrint (ls)
05.[ ]
06.[-] List of string ReturnLinkData(String sBaseURL, String sIncDomains, Integer iDepth)
07. [ ] LINKTESTERINFO lit
08. [ ]
09. [ ] List of String ls
10. [ ] //Populate the LINKTESTERINFO structure with the passed in data
11. [ ] lit.sBaseURL = sBaseURL
12. [ ] lit.sIncludeDomains = sIncDomains
13. [ ] lit.iDepth = iDepth
14. [ ] ls = RunLinkTester (lit)
15. [ ] return ls
文章來源于領測軟件測試網 http://www.k11sc111.com/