Exemplo n.º 1
0
def set_rule(self,startIP,endIP,dlSpeed,upSpeed,i):
    driver = self.driver
    driver.implicitly_wait(10)
    qosIP_control.add(self)
    qosIP_control.set_ip(self,startIP,endIP,i)
    qosIP_control.set_speed(self,dlSpeed,upSpeed,i)
    qosIP_control.submit(self)
Exemplo n.º 2
0
def add_multi(self,numMax):
    driver = self.driver
    ip = ['192','168','11','100']
    dlSpeed = 1024
    upSpeed = 128
    for i in range(1,numMax):
        ip[3] = str(int(ip[3])+1)
        startIp = '.'.join(ip)
        endIp = '.'.join(ip)
        dl = dlSpeed+i*128
        up = upSpeed+i*128
        qosIP_control.add(self)
        qosIP_control.set_ip(self,startIp,endIp,i)
        qosIP_control.set_speed(self,dl,up,i)
    qosIP_control.submit(self)
Exemplo n.º 3
0
 def test_qosIP_multi2(self,numMax):
    u'''验证qos-ip设置多条IP相同速率不同的规则'''
    driver = self.driver
    dlSpeed = 1024
    upSpeed = 128
    for i in range(1,numMax):
        dl = dlSpeed+i*128
        up = upSpeed+i*128
        qosIP_control.add(self)
        qosIP_control.set_ip(self,startIP,endIP,i)
        qosIP_control.set_speed(self,dl,up,i)
    qosIP_control.submit(self)
    dl = qosIP_business.dlSpeedCheck(self,dlSpeed,err)
    assert dl, u"在线测试下载速度与设置的下载速度误差超过"
    print u"验证qos-ip设置多条IP相同速率不同的规则--用例编号100msh0267--测试成功"
Exemplo n.º 4
0
 def test_qosIP_multi(self,numMax):
    u'''验证qos-ip添加多个IP规则有效性'''
    driver = self.driver
    ip = ['192','168','11','100']
    dlSpeed = 1024
    upSpeed = 128
    for i in range(1,numMax):
        ip[3] +=1
        startIp = '.'.join(ip)
        endIp = '.'.join(ip)
        dl = dlSpeed+i*128
        up = upSpeed+i*128
        qosIP_control.add(self)
        qosIP_control.set_ip(self,startIp,endIp,i)
        qosIP_control.set_speed(self,dl,up,i)
    qosIP_control.submit(self)