Package com.alibaba.druid.support.http.stat

Examples of com.alibaba.druid.support.http.stat.WebAppStat


        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotYoudaoCount());
    }

    public void test_bing() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)");

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotBingCount());
    }
View Full Code Here


        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotBingCount());
    }

    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());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotGoogleCount());
    }

    public void test_baidu() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)");

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotBaiduCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotBaiduCount());
    }

    public void test_soso() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Sosospider+(+http://help.soso.com/webspider.htm)");

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotSosoCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotSosoCount());
    }

    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());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotMsnCount());
    }

    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());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotSogouCount());
    }
   
    public void test_yahoo() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)");
       
        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotYahooCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
        Assert.assertEquals(1, stat.getBotYahooCount());
    }

    public void test_unkownBot() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 ()");

        Assert.assertEquals(1, stat.getBotCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
    }

    public void test_unkownBot1() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (compatible; Mail.RU/2.0)");

        Assert.assertEquals(1, stat.getBotCount());
    }
View Full Code Here

        Assert.assertEquals(1, stat.getBotCount());
    }

    public void test_unkownBot2() throws Exception {
        WebAppStat stat = new WebAppStat("");
        stat.computeUserAgent("Mozilla/5.0 (compatible; MJ12bot/v1.4.2; http://www.majestic12.co.uk/bot.php?+)");

        Assert.assertEquals(1, stat.getBotCount());
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.support.http.stat.WebAppStat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.