예제 #1
0
@desc       : 系统管理自动化测试用例
"""

import json
from faker import Factory
from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from ymjry.query import xqkj_query
from ymjry.testAction import WebAction
from ymjry.testAction import loginAction
from ymjry.testAction import specialAction

global_dict = loginAction.global_dict
fake = Factory().create('zh_CN')
# 系统用户基本信息
name = loginAction.sign + fake.name_male()
idcard = fake.ssn(min_age=18, max_age=20)
email = loginAction.sign + fake.email()
phone = '131' + fake.ean8()

# 修改用户信息
name3 = loginAction.sign + 'modify' + fake.name_male()
phone3 = '131' + fake.ean8()
email3 = loginAction.sign + fake.email()

# 新增用户测试--非email
name4 = loginAction.sign + 'mail' + fake.name_male()
phone4 = '131' + fake.ean8()
email4 = loginAction.sign + fake.email()

# 新增报表
예제 #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json

from faker import Factory

from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from common.mydb import MysqlClent
from reborn.test import case_stream
from reborn.testAction import PlatformAction as JtlbasicAction, loginAction

fake = Factory().create('zh_CN')
name = fake.name_male()

# 渠道
channelname_stream = fake.company() + '渠道' + '下级stream'
email_stream = fake.email()
name_stream = fake.name_male()
namecount_stream = fake.name_male()
# 商户
# 与产品绑定的商户
merchantname_stream = fake.company() + '流程stream'
account_name_stream = fake.name_male()
st_name_stream = fake.name_male()
# 产品使用资金包
pFundSidename = fake.name_male() + '资方名stream'
pFundPackagename = fake.name_male() + '资金包名stream'
# 解绑商户
merchantname_stream_del = fake.company() + 'dele'
예제 #3
0
import unittest

from faker import Factory

from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from common.myFile import MockData as MD
from ymjry.query import xqkj_query as xq
from ymjry.testAction import WebAction
from ymjry.testAction import loginAction
from ymjry.query import xqkj_query

global_dict = loginAction.global_dict
fake = Factory().create('zh_CN')
# 系统用户基本信息
name = loginAction.sign + fake.name_male()
idcard = fake.ssn(min_age=18, max_age=20)
email = loginAction.sign + fake.email()


class test_024_web_urge(TestBaseCase):
    def test_001_api_78dk_platform_urge_collectionPersonnelList_null(self):
        """
        Time       :2019-09-27
        author     : 闫红
        desc       :催收人员管理列表-搜索-v1.5.2,搜索分案状态为空的所有人员
        """
        res = json.loads(
            WebAction.test_api_78dk_platform_urge_user_collectionPersonnelList(
                divisionstate='',
                email='',
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json

from faker import Factory

from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from common.mydb import MysqlClent
from reborn.testAction import PlatformAction as JtlbasicAction, loginAction

fake = Factory().create('zh_CN')
# 资方名
FundSidename = fake.name_male() + '资方名'
FundSidenamedele = fake.name_male() + '资方名dele'
# 资金包名
FundPackagename = fake.name_male() + '资金包名'
# 产品使用资金包
pFundSidename = fake.name_male() + '资方名'
pFundPackagename = fake.name_male() + '资金包名'

# 资方管理相关接口


class testJtlbasic_002_Fundside(TestBaseCase):
    def test_01api_78dk_platform_fund_fundSide_saveFundSide(self):
        # 添加资方
        res = JtlbasicAction.test_api_78dk_platform_fund_fundSide_saveFundSide(
            FundSidename, 'enabled')
        Assertion.verity(json.loads(res)['code'], '10000')
예제 #5
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json

from faker import Factory

from common.myCommon import Assertion
from common.mydb import MysqlClent
from reborn.testAction import PlatformAction as JtlbasicAction, loginAction

fake = Factory().create('zh_CN')

# 渠道
channelname_stream = fake.company() + '渠道' + '下级stream'
email_stream = fake.email()
name_stream = fake.name_male()
namecount_stream = fake.name_male()
# 商户
# 与产品绑定的商户
merchantname_stream = fake.company() + '流程stream'
# email_stream=fake.email()
# name_stream=fake.name_male()
account_name_stream = fake.name_male()
st_name_stream = fake.name_male()

# 产品使用资金包
pFundSidename = fake.name_male() + '资方名stream'
pFundPackagename = fake.name_male() + '资金包名stream'


# 新增资金包
예제 #6
0
@File       : test_003_web_Merchant_two.py
@desc       : 商户管理(门店)自动化测试用例 1.4版本修改及新增
"""

import json
from faker import Factory
from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from mjjry.testAction import WebAction, specialAction
from mjjry.testAction import loginAction

global_dict = loginAction.global_dict
fake = Factory().create('zh_CN')
# 商户名称
merchantname = loginAction.sign + fake.company()
name = fake.name_male() + loginAction.sign
email = loginAction.sign + fake.email()
mobile = '15388188697'
cardnumber = fake.ssn()


class test_003_web_Merchant_two(TestBaseCase):
    def test_001_api_78dk_platform_mm_base_saveMerchant(self):
        """
        新增商户基本信息
        :return:
        """
        channelid = loginAction.global_dict.get('channelid')
        res = json.loads(
            WebAction.test_api_78dk_platform_mm_base_saveMerchant(
                note='备注',
예제 #7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json

from faker import Factory

from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from common.mydb import MysqlClent
from xqkj.test import case_stream
from xqkj.testAction import PlatformAction
from xqkj.testAction import loginAction

fake = Factory().create('zh_CN')
name = fake.name_male()

channelname = fake.company() + '渠道' + loginAction.sign
channelname3 = channelname + '下级' + loginAction.sign
channelname1 = fake.company() + '渠道拒绝' + loginAction.sign
channelname2 = fake.company() + '删除机构测试' + loginAction.sign
email = fake.email()

# 法人名称
# 新增
# name=fake.name_male()
# 测试删除法定代表人
name2 = fake.name_male() + loginAction.sign

# 结算账户名称人
namecount = fake.name_male() + loginAction.sign
예제 #8
0
fake = Factory().create('zh_CN')
# 商户名称
merchantname = fake.company() + '门店'
# 拒绝商户名称
merchantnamefail = fake.company() + '拒绝'
# s删除机构 法人 结算的商户
merchantnamedele = fake.company() + '删除测试'

# 新增机构 email
email = fake.email()
# 删除机构email
emaildele = fake.email()

# 新增法人信息
name = fake.name_male()
# 删除法人信息
namedele = fake.name_male()

# 计算账户信息
account_name = fake.name_male()
# 删除结算账户信息
account_namedele = fake.name_male()

# 门店信息
st_name = fake.name_male()
# 删除门店信息
st_namedele = fake.name_male()

# 与产品绑定的商户
merchantname_stream = fake.company() + '流程'
예제 #9
0
fake = Factory().create('zh_CN')
# 商户名称
merchantname = fake.company() + '门店' + loginAction.sign
# 拒绝商户名称
merchantnamefail = fake.company() + '拒绝' + loginAction.sign
# s删除机构 法人 结算的商户
merchantnamedele = fake.company() + '删除测试' + loginAction.sign

# 新增机构 email
email = fake.email()
# 删除机构email
emaildele = fake.email()

# 新增法人信息
name = fake.name_male() + loginAction.sign
# 删除法人信息
namedele = fake.name_male() + loginAction.sign

# 计算账户信息
account_name = fake.name_male() + loginAction.sign
# 删除结算账户信息
account_namedele = fake.name_male() + loginAction.sign

# 门店信息
st_name = fake.name_male() + loginAction.sign
# 删除门店信息
st_namedele = fake.name_male() + loginAction.sign

# 与产品绑定的商户
merchantname_stream = fake.company() + '流程' + loginAction.sign
예제 #10
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json

from faker import Factory

from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from common.mydb import MysqlClent
from reborn.testAction import PlatformAction as JtlbasicAction, loginAction

fake = Factory().create('zh_CN')
name = fake.name_male()
name = name + 'test'
idcard = fake.ssn(min_age=18, max_age=20)
phone = fake.ean8()
email = fake.email()
phone = '135' + phone

# 删除用户
name1 = fake.name_male()
name1 = name1 + 'dele'
phone1 = fake.ean8()
email1 = fake.email()
phone1 = '135' + phone1

# 清除用户权限
name2 = fake.name_male()
name2 = name2 + 'clear'
phone2 = fake.ean8()
예제 #11
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from common.mydb import MysqlClent
from common.myCommon.TestBaseCase import TestBaseCase
from common.myCommon import Assertion
import json
from faker import Factory
from xqkj.testAction import loginAction
from xqkj.testAction import PlatformAction

fake = Factory().create('zh_CN')
# 资方名
FundSidename = fake.name_male() + '资方名' + loginAction.sign
FundSidenamedele = fake.name_male() + '资方名dele' + loginAction.sign
# 资金包名
FundPackagename = fake.name_male() + '资金包名' + loginAction.sign
# 产品使用资金包
pFundSidename = fake.name_male() + '资方名'+ loginAction.sign
pFundPackagename = fake.name_male() + '资金包名' + loginAction.sign


# 资方管理相关接口

class testPlatform_002_Fundside(TestBaseCase):
    def test_01api_78dk_platform_fund_fundSide_saveFundSide(self):
        # 添加资方
        res = PlatformAction.test_api_78dk_platform_fund_fundSide_saveFundSide(FundSidename, 'enabled')
        Assertion.verity(json.loads(res)['code'], '10000')
        Assertion.verity(json.loads(res)['msg'], '成功')
예제 #12
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json

from faker import Factory

from common.myCommon import Assertion
from common.myCommon.TestBaseCase import TestBaseCase
from common.mydb import MysqlClent
from xqkj.testAction import PlatformAction
from xqkj.testAction import loginAction
from xqkj.testAction import specialAction

fake = Factory().create('zh_CN')
name = fake.name_male()
name = loginAction.sign + name
idcard = fake.ssn(min_age=18, max_age=20)
email = fake.email()
phone = fake.phone_number()


# 修改用户信息
name3 = fake.name_male()
name3 = loginAction.sign + 'modify' + name3
phone3 = fake.phone_number()
email3 = fake.email()

# 新增用户测试--非email
name4 = fake.name_male()
name4 = loginAction.sign + 'mail' + name4
예제 #13
0
"""
@Time       :2019-03-20 下午 3:10
@Author     : 罗林
@File       : loginAction.py
@desc       : 
"""

import requests
import json
from common.myConfig import ConfigUtils as conf
from common.myConfig import MysqlConfig
from common.mydb import MysqlClent
from faker import Factory

fake = Factory().create('zh_CN')
nameadmin = fake.name_male() + 'stream管理员'
phoneadmin = fake.ean8()
emailadmin = fake.email()
phoneadmin = '135' + phoneadmin
DB = MysqlClent.get_conn('192.168.15.129', 3306, 'cgi78dkv23', 'cgi78dk', 'dfljlcl39*33$@e')
# baseUrl = "http://test.jtlservice.78dk.cgi78dkom"
baseUrl = MysqlConfig.get('platform_apiURL', 'reborn')
sign = conf.get('report', 'sign')


def login():
    # 管理员用户
    # 新增用户测试--非email
    url = baseUrl + '/api/78dk/platform/sys/user/login'
    payload = {"email": "*****@*****.**", "password": "******"}
    headers = {'content-type': 'application/json'}