예제 #1
0
            print "begin to check the availability of " + host

            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )
            #Set ebooking.elong.com proxy
            set_proxy({"http": host})

            #go to client create order page
            client_createOrder_page_response = get(
                "http://rentcarapi.elong.com/m/render/order/create_order.html",
                "create_order", 200, 5000, ["retcode"])
            alert(productline, host, alerttype, "create_order",
                  client_createOrder_page_response)

            #go to client get order liset page
            #client_orderList_page_response = get("rentcarapi.elong.com/m/render/order/get_order_list.html?uid=zhaodan&productType=0201&orderStatus=1", "order_list", 200, 5000, ["pageNo"])
            #alert(productline, host, alerttype, "order_list", client_orderList_page_response)

        except Exception, ex:
            print "failed : " + str(ex) + " \r\n"
        else:
            print "success\r\n"
        finally:
            #reset browser
            reset_browser

    print "===Finished==="
예제 #2
0
            print "begin to check the availability of " + host

            #add response json
            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )

            #Set giftcard proxy
            set_proxy({"http": host})

            #go to client comments page
            client_orderItem_page_response = get(
                "http://giftcardapi.elong.com:8080/web/card/orderItem?elongId=1&pageIndex=1&pageSize=10",
                "orderItem", 200, 5000, ["totalCount", "list"])
            alert(productline, host, alerttype, "orderItem",
                  client_orderItem_page_response)
        except Exception, ex:
            print "failed : " + str(ex) + " \r\n"
        finally:
            #reset browser
            reset_browser

    print "===Finished==="

except Exception, e2:
    print str(e2) + " at url " + get_browser().get_url()
    #show()
예제 #3
0
    print "===Start==="

    for host in ebk_server_list:

        try:

            print "begin to check the availability of " + host

            #Set ebooking.elong.com proxy
            set_proxy({"http": host})

            #ebooking Login Page
            login_page_response = get(
                "http://ebooking.elong.com/ebookingnew/newlogin.mvc/login",
                "Open Login Page", 200, 5000, ["hotel_user", "password"])
            alert(productline, host, alerttype, "Open Login Page",
                  login_page_response)

            #Login
            formvalue(1, "hotel_user", "monitor2")
            formvalue(1, "password", "js020508")
            formvalue(1, "valicode", "1111")
            post("Login", 500, 5000, "")

            #go to client comments page
            client_comments_page_response = get(
                "http://ebooking.elong.com/EbookingNew/NewHotelComment.mvc/HotelComment",
                "View Client Comments", 200, 5000, ["user_info"])
            alert(productline, ebk_server_name, alerttype,
                  "View Client Comments", client_comments_page_response)
        except Exception, ex:
            print "failed : " + str(ex) + " \r\n"
예제 #4
0
	
	print "===Start==="
	hosts = ['CHH-HTmpMis1.ab.elong.com:8081','CHF-HTmpMis1.ab.elong.com:8081','CHG-HTmpMis1.ab.elong.com:8081','DHE-HTmpMis1.ab.elong.com:8081','DHF-HTmpMis1.ab.elong.com:8081']
	for host in hosts:  
		
		try :			
			print "begin to check the availability of " + host
		
			clear_extra_headers()
			add_extra_header("Accept","text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8")
			
			#Set ebooking.elong.com proxy
			set_proxy({"http": host})
			
			templateservice_response = get("http://template.mis.elong.com:8081/f", "test_templateservice", 200, 5000, [""])
			alert(productline, host, alerttype, "test_templateservice", templateservice_response)
			print "success !!!"	
		except Exception, ex:
			print "failed : " + str(ex) + " \r\n"
			exstr=traceback.format_exc()
			print exstr
		finally:
			#reset browser
			reset_browser

	print "===Finished==="

except Exception, e2:
	print str(e2) + " at url " + get_browser().get_url()
	#show()
예제 #5
0
        try:
            print "begin to check the availability of " + host

            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )

            #Set ebooking.elong.com proxy
            set_proxy({"http": host})

            ivr_response = get(
                "http://ivr.mis.elong.com:8080/getorderbycardno?cardno=4922601",
                "test_ivr", 200, 5000, ["status"])
            alert(productline, host, alerttype, "test_ivr", ivr_response)
            print "success !!!"
        except Exception, ex:
            print "failed : " + str(ex) + " \r\n"
            exstr = traceback.format_exc()
            print exstr
        finally:
            #reset browser
            reset_browser

    print "===Finished==="

except Exception, e2:
    print str(e2) + " at url " + get_browser().get_url()
    #show()
예제 #6
0
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )
            set_proxy({"http": host})

            #HBA Logout
            #hba_logout_response = get(HBA_LOGOUT_PAGE, "HBA Logout page",200,5000,[""])
            #hba_logout_instance = "hba_logout"
            #alert(host, hba_logout_instance, hba_logout_response)

            #HBA Login Page
            hba_response = get(HBA_LOGIN_PAGE, "HBA Login Page", 200, 5000,
                               [""])
            hba_instance = "hba_index"
            alert(productline, host, alerttype, hba_instance, hba_response)

            #Login
            formvalue(1, "userid", HBA_USERNAME)
            formvalue(1, "password", HBA_PASSWORD)
            formvalue(1, "logtype", "1")
            login_response = post("Login to HBA", 200, 5000)
            login_instance = "hab_login"
            alert(productline, host, alerttype, login_instance, login_response)

            #defaultorder page
            default_response = get(HBA_ORDER_COMMON_PAGE,
                                   "HBA order master page", 200, 10000,
                                   ["hidisNeedPass"])
            default_instance = "order_commonbusiness"
            alert(productline, host, alerttype, default_instance,
예제 #7
0
    #car online serverip list
    hosts = ["192.168.68.34"]
    #monitor the website one by one
    for host in hosts:
        try:
            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9,*/*;q=0.8"
            )
            #MIS Login Page
            mis_response = get("http://eds.elong.com/mis/index2.asp",
                               "MIS Login Page", 200, 1000, ["IsHaveErrStr"])
            mis_instance = "mis_index"
            alert(host, mis_instance, mis_response)

            #Login
            formvalue(1, "staff_name_en", "hoteladmin")
            formvalue(1, "password", "nopass.2")
            login_response = post("Login to MIS", 200, 1000)
            login_instance = "mis_login"
            alert(host, login_instance, login_response)

            #default.asp
            default_response = get(
                "http://eds.elong.com/mis/default.asp?main=", "MIS Home", 200,
                1000, ["mainframeset"])
            default_instance = "default.asp"
            alert(host, default_instance, default_response)
예제 #8
0
            #add response json
            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )

            #Set car proxy
            set_proxy({"http": host})

            #go to client get squid
            client_getSquid_page_response = get(
                "http://carapi.elong.com/m/taxi/get_sguid.html",
                "car_api_sguid", 200, 5000, ["retcode"])
            alert(productline, host, alerttype, "car_api_sguid",
                  client_getSquid_page_response)

            #go to client get order list page
            client_queryOrder_page_response = get(
                "http://carapi.elong.com/m/taxi/order/query_order.html?orderId=2014012408O000296390101",
                "query_order", 200, 5000, ["retcode"])
            alert(productline, host, alerttype, "query_order",
                  client_queryOrder_page_response)

        except Exception, ex:
            print "failed : " + str(ex) + " \r\n"
        else:
            print "success\r\n"
        finally:
            #reset browser
            reset_browser
예제 #9
0
            # get serverlist by servergroup
            realSgUrl = GetServerListByServerGroup_BaseUrl + serverGroup
            serverListStr = request(realSgUrl)
            if (serverListStr == ""):
                continue
            else:
                pass
            serverList = serverListStr.split(',')
            for server in serverList:
                # check memcached
                realMemCheckUrl = UrlHeader + server + MemcachedHealthCheck_Url
                pageName = server + " memcache"
                mem_response = get(realMemCheckUrl, pageName, 200, 5000,
                                   ["ok"])
                mem_instance = "memcache"
                alert(productline, server, alerttype, mem_instance,
                      mem_response)

                # check order
                realOrderCheckUrl = UrlHeader + server + OrderHealthCheck_URL
                pageName = server + " order"
                order_response = get(realOrderCheckUrl, pageName, 200, 5000,
                                     ["ok"])
                order_instance = "order"
                alert(productline, server, alerttype, order_instance,
                      order_response)

                # check product
                realProductCheckUrl = UrlHeader + server + ProductHealthCheck_URL
                pageName = server + " product"
                product_response = get(realProductCheckUrl, pageName, 200,
                                       5000, ["ok"])
예제 #10
0
        ebk_server_name = ebk_server_list[i % len(ebk_server_list)]
        eb_server_name = eb_server_list[i % len(eb_server_list)]

        try:

            print "begin to check the availability of " + ebk_server_name + " and " + eb_server_name

            #Set ebooking.elong.com proxy
            set_proxy({"http": ebk_server_name})

            #ebooking Login Page
            login_page_response = get(
                "http://ebooking.elong.com/ebookingnew/newlogin.mvc/login",
                "Open Login Page", 200, 5000, ["hotel_user", "password"])
            alert(productline, ebk_server_name, alerttype, "Open Login Page",
                  login_page_response)

            #Login
            formvalue(1, "hotel_user", "monitor2")
            formvalue(1, "password", "js020508")
            formvalue(1, "valicode", "1111")
            post("Login", 500, 5000, "")

            #go to client comments page
            client_comments_page_response = get(
                "http://ebooking.elong.com/EbookingNew/NewHotelComment.mvc/HotelComment",
                "View Client Comments", 200, 5000, ["user_info"])
            alert(productline, ebk_server_name, alerttype,
                  "View Client Comments", client_comments_page_response)

            #Set eb.elong.com proxy
예제 #11
0
    alerttype = "urlmonitor_webmis"
    productline = "webmis"
    hosts = ['CHD-HWebMis3.ab.elong.com']
    for host in hosts:
        try:
            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )
            set_proxy({"http": host})

            #Mis eds Page
            eds_response = get(Mis_EDS_PAGE, "Mis eds Page", 200, 5000, [""])
            eds_instance = "eds_page"
            alert(productline, host, alerttype, eds_instance, eds_response)

            #Login
            formvalue(1, "staff_name_en", Mis_USERNAME)
            formvalue(1, "password", Mis_PASSWORD)
            login_response = post("Login to Mis", 200, 5000)
            login_instance = "Mis_login"
            alert(productline, host, alerttype, login_instance, login_response)

            #Mis Start Page
            eds_main_response = get(Mis_Main_PAGE, "Mis start Page", 200, 5000,
                                    [""])
            eds_main_instance = "mis_start"
            alert(productline, host, alerttype, eds_main_instance,
                  eds_main_response)
예제 #12
0
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )

            #HBA Logout
            hba_logout_response = get(HBA_LOGOUT_PAGE, "HBA Logout page", 200,
                                      5000, [""])
            hba_logout_instance = "hba_logout"
            #alert(host, hba_logout_instance, hba_logout_response)

            #HBA Login Page
            hba_response = get(HBA_LOGIN_PAGE, "HBA Login Page", 20, 5000,
                               [""])
            hba_instance = "hba_index"
            alert(productline, host, alerttype, hba_instance, hba_response)

            ##Login
            #formvalue(1,"userid",HBA_USERNAME)
            #formvalue(1,"password",HBA_PASSWORD)
            #login_response = post("Login to HBA",200,5000)
            #login_instance = "hab_login"
            #alert(productline,host,alerttype,login_instance,login_response)
            #
            ##default.asp
            #default_response = get(HBA_ORDER_COMMON_PAGE, 200, 1000, ["order_commonbusiness"])
            #default_instance="order_commonbusiness"
            #alert(productline,host,alerttype,default_instance,default_response)
            #
            ##OrderSearchResult Page
            #ordersearchresult_response=get(HBA_ORDERSEARCH_RESULT_PAGE, 200, 10000, ["searchresult"])
예제 #13
0
    #apihosts = ['CHF-OApiCrm1.ab.elong.com:8081']
    for host in apihosts:
        try:
            print "begin to check the availability of " + host
            clear_extra_headers()
            add_extra_header(
                "Accept",
                "text/plain,text/html,application/xhtml+xml,application/xml,application/json;q=0.9*/*;q=0.8"
            )
            #Set ebooking.elong.com proxy
            set_proxy({"http": host})

            hotelinfo_response = get(
                "http://oapicrm.elong.com/mobile/api/hotelInfoList?userId=100&pageSize=1",
                "hotelInfoList", 200, 5000, [""])
            alert(productline, host, alerttype, "hotelInfoList",
                  hotelinfo_response)

            signinghotel_response = get(
                "http://oapicrm.elong.com/mobile/api/signingHotels?userId=100&pageSize=1",
                "signingHotels", 200, 5000, [""])
            alert(productline, host, alerttype, "signingHotels",
                  signinghotel_response)

            visittype_response = get(
                "http://oapicrm.elong.com/mobile/api/visitType", "visitType",
                200, 5000, [""])
            alert(productline, host, alerttype, "visitType",
                  visittype_response)
            print "success !!!"
        except Exception, ex:
            print "failed : " + str(ex) + " \r\n"