use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_unkownBot5.
public void test_unkownBot5() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Speedy Spider (http://www.entireweb.com/about/search_tech/speedy_spider/)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_sogou.
public void test_sogou() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)");
Assert.assertEquals(1, stat.getBotCount());
Assert.assertEquals(1, stat.getBotSogouCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_DoCoMo.
public void test_DoCoMo() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("DoCoMo/2.0 P900i(c100;TB;W24H11) (compatible; ichiro/mobile goo; +http://search.goo.ne.jp/option/use/sub4/sub4-1/)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_findlinks.
public void test_findlinks() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("findlinks/2.1.5 (+http://wortschatz.uni-leipzig.de/findlinks/)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentTest method test_agent_ie9.
public void test_agent_ie9() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)");
Assert.assertEquals(1, stat.getBrowserIECount());
Assert.assertEquals(1, stat.getBrowserIE9Count());
Assert.assertEquals(1, stat.getOSWindowsCount());
}
Aggregations