use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_msn.
public void test_msn() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("msnbot/2.0b (+http://search.msn.com/msnbot.htm)._");
Assert.assertEquals(1, stat.getBotCount());
Assert.assertEquals(1, stat.getBotMsnCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_google.
public void test_google() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)");
Assert.assertEquals(1, stat.getBotCount());
Assert.assertEquals(1, stat.getBotGoogleCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_huawei.
public void test_huawei() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("HuaweiSymantecSpider/1.0+DSE-support@huaweisymantec.com+(compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR ; http://www.huaweisymantec.com/en/IRL/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_aiHitBot.
public void test_aiHitBot() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; aiHitBot/1.1; +http://www.aihit.com/)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_AhrefsBot.
public void test_AhrefsBot() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)");
Assert.assertEquals(1, stat.getBotCount());
}
Aggregations