Esempio n. 1
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
accountRecharge = get_excel_value("pcloginCase.xls", "clientWithDraw")
# print(accountRecharge)
b=BasePage()
url1=b.get_url()

@paramunittest.parametrized(*accountRecharge)
class ClientWithDrawTest(unittest.TestCase):
    def setParameters(self, case_name,login,passwd,transMoney):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)
        self.transMoney = str(transMoney)

    # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s

    def test_login(self):
Esempio n. 2
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
testsearchInfomation = get_excel_value("pcloginCase.xls",
                                       "searchInfomation_test")
# print(testsearchInfomation)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*testsearchInfomation)
class SearchInfomation_Test(unittest.TestCase):
    def setParameters(self, case_name, type, channel, position):
        self.case_name = str(case_name)
        self.type = str(int(type))
        self.channel = str(int(channel))
        self.position = str(int(position))

    def test_login(self):
        self._testMethodDoc = self.case_name  # 设置用例名称
        # 用户登录
        content = {
Esempio n. 3
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
accountRecharge = get_excel_value("pcloginCase.xls", "accountRecharge")
# print(accountRecharge)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*accountRecharge)
class AccountRechargeTest(unittest.TestCase):
    def setParameters(self, case_name, systemTypeName, platformSourceName,
                      payChannel, payStyle, bankCode, bankCard, tiedCardFlag,
                      transMoney, login, passwd):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)
        self.systemTypeName = str(systemTypeName)
        self.platformSourceName = str(platformSourceName)
        self.payStyle = str(payStyle)
        self.bankCode = str(bankCode)
        self.bankCard = str(bankCard)
Esempio n. 4
0
import unittest

import paramunittest
import requests

from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

b = BasePage()
url1 = b.get_url()
print(url1)
proDir = getDir.proDir
print('获取目录:', proDir)
now = time.strftime("%Y_%m_%d %H:%M:%S")
authCase = get_excel_value("auth.xls", "auth_test")
print(authCase)


@paramunittest.parametrized(*authCase)
class AuthTest(unittest.TestCase):
    def setParameters(self, case_name, client_id, client_secret, grant_type,
                      password, scope, username):
        self.case_name = str(case_name)
        self.client_id = str(client_id)
        self.client_secret = str(client_secret)
        self.grant_type = str(grant_type)
        self.password = str(password)
        self.scope = str(scope)
        self.username = str(username)
Esempio n. 5
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
pcloginCase = get_excel_value("pcloginCase.xls", "toRecharge_test")
# print(pcloginCase)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*pcloginCase)
class ToRechargeTest(unittest.TestCase):
    def setParameters(self, case_name, login, passwd):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)

    # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s

    def test_login(self):
Esempio n. 6
0
#!/usr/bin/env python
#-*-coding:utf-8-*-
import json
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

b = BasePage()
url1 = b.get_url()
# print(url1)
now = time.strftime("%Y_%m_%d %H:%M:%S")
applogin22 = get_excel_value("applogin2.xls", "applogin2_test")
# print(applogin22)


@paramunittest.parametrized(*applogin22)
class apploginTest(unittest.TestCase):
    def setParameters(self, case_name, access_token, appVersion, login,
                      mobileIp, mobileMAC, mobileModel, mobileUDID,
                      mobileVersion, passLength, password, excepted):
        self.case_name = str(case_name)
        self.access_token = str(access_token)
        self.appVersion = str(appVersion)
        self.login = str(int(login))
        self.mobileIp = str(mobileIp)
        self.mobileMAC = str(mobileMAC)
        self.mobileModel = str(mobileModel)
Esempio n. 7
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
accountRecharge = get_excel_value("pcloginCase.xls", "loadMyAccount")
# print(accountRecharge)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*accountRecharge)
class loadMyAccountTest(unittest.TestCase):
    def setParameters(self, case_name, login, passwd):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)

    # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s

    def test_login(self):
Esempio n. 8
0
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage
from utrl.db import Db

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
investCase = get_excel_value("bidInfoList.xls", "investCase")
# print(accountRecharge)
b = BasePage()
url1 = b.get_url()
db = Db()
connection = db.connection
cursor = db.cursor


@paramunittest.parametrized(*investCase)
class InvestTest(unittest.TestCase):
    def setParameters(self, case_name, login, passwd, biddname, money,
                      investRedPacketId, investRaiseInterestId):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)
        self.biddname = str(biddname)
        self.money = str(int(money))
        self.investRedPacketId = str(int(investRedPacketId))
Esempio n. 9
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
biddinfolist = get_excel_value("bidInfoList.xls", "biddinfolist")
# print(accountRecharge)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*biddinfolist)
class BidInfoListTest(unittest.TestCase):
    def setParameters(self, case_name, login, passwd):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)

    # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s

    def test_login(self):
Esempio n. 10
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
pcloginCase = get_excel_value("pcloginCase.xls", "pclogin_test")
print(pcloginCase)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*pcloginCase)
class PcLoginTest(unittest.TestCase):
    def setParameters(self, case_name, login, passwd):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)

    # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s

    def test_login(self):
Esempio n. 11
0
import json
import re
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
accountRecharge = get_excel_value("pcloginCase.xls", "toWithDrawPage")
# print(accountRecharge)
b = BasePage()
url1 = b.get_url()


@paramunittest.parametrized(*accountRecharge)
class ToWithDrawPageTest(unittest.TestCase):
    def setParameters(self, case_name, login, passwd):
        self.case_name = str(case_name)
        self.login = str(int(login))
        self.passwd = str(passwd)

    # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s

    def test_login(self):
Esempio n. 12
0
import json
import time
import unittest
import paramunittest
import requests
from csh2 import getDir
from csh2.dxExcel import get_excel_value
from utrl.basepage import BasePage

b=BasePage()
url1=b.get_url()
print(url1)
proDir = getDir.proDir
now = time.strftime("%Y_%m_%d %H:%M:%S")
getyzmCase = get_excel_value("getYZM.xls", "getYZM_test")
print(getyzmCase)

@paramunittest.parametrized(*getyzmCase)
class getYZMTest(unittest.TestCase):
    def setParameters(self, case_name, access_token, imgyzm, mobile, type,excepted):
        self.case_name = str(case_name)
        self.access_token = str(access_token)
        self.imgyzm = str(imgyzm)
        self.mobile = str(mobile)
        self.type = str(type)
        self.excepted = str (excepted)
      # def setUp(self):
    #     self.baseUrl = "http://www.mi.com"
    #     self.driver = webdriver.Chrome()
    #     self.driver.implicitly_wait(10)  # 静默等待10s
    def test_login(self):