示例#1
0
# -*- coding: utf-8 -*-
# @Time    : 2019/06
# @Author  : XiaoXi
# @PROJECT : Aff_service

import allure
import pytest
import setupMain

from bin.unit.initializeCase import ini_case
from bin.unit.initializePremise import ini_request
from bin.unit.apiSendCheck import api_send_check

PATH = setupMain.PATH + "/aff/pages/blogpost"

case_dict = ini_case(PATH, "reco")


@allure.feature(case_dict["test_info"]["title"])
class TestReco:
    @pytest.mark.parametrize("case_data", case_dict["test_case"], ids=[])
    @allure.story("reco")
    @pytest.mark.flaky(reruns=3, reruns_delay=3)
    def test_reco(self, case_data):
        """

        :param case_data: 测试用例
        :return:
        """
        self.init_relevance = ini_request(case_dict, PATH)
        # 发送测试请求
示例#2
0
# -*- coding: utf-8 -*-
# @Time    : 2019/06
# @Author  : XiaoXi
# @PROJECT : Aff_service

import allure
import pytest
import setupMain

from bin.unit.initializeCase import ini_case
from bin.unit.initializePremise import ini_request
from bin.unit.apiSendCheck import api_send_check

PATH = setupMain.PATH + "/aff/page/offer"

case_dict = ini_case(PATH, "Template")


@allure.feature(case_dict["test_info"]["title"])
class TestTemplate:
    @pytest.mark.parametrize("case_data", case_dict["test_case"], ids=[])
    @allure.story("Template")
    @pytest.mark.flaky(reruns=3, reruns_delay=3)
    def test_template(self, case_data):
        """

        :param case_data: 测试用例
        :return:
        """
        self.init_relevance = ini_request(case_dict, PATH)
        # 发送测试请求
# -*- coding: utf-8 -*-
# @Time    : 2019/06
# @Author  : XiaoXi
# @PROJECT : Aff_service

import allure
import pytest
import setupMain

from bin.unit.initializeCase import ini_case
from bin.unit.initializePremise import ini_request
from bin.unit.apiSendCheck import api_send_check

PATH = setupMain.PATH + "/aff/pages/History"

case_dict = ini_case(PATH, "GetBrowseRecord")


@allure.feature(case_dict["test_info"]["title"])
class TestGetbrowserecord:
    @pytest.mark.parametrize("case_data", case_dict["test_case"], ids=[])
    @allure.story("GetBrowseRecord")
    @pytest.mark.flaky(reruns=3, reruns_delay=3)
    def test_getbrowserecord(self, case_data):
        """

        :param case_data: 测试用例
        :return:
        """
        self.init_relevance = ini_request(case_dict, PATH)
        # 发送测试请求
# -*- coding: utf-8 -*-
# @Time    : 2019/06
# @Author  : XiaoXi
# @PROJECT : Aff_service

import allure
import pytest
import setupMain

from bin.unit.initializeCase import ini_case
from bin.unit.initializePremise import ini_request
from bin.unit.apiSendCheck import api_send_check

PATH = setupMain.PATH + "/aff/pages/History"

case_dict = ini_case(PATH, "GetUserRecord")


@allure.feature(case_dict["test_info"]["title"])
class TestGetuserrecord:

    @pytest.mark.parametrize("case_data", case_dict["test_case"], ids=[])
    @allure.story("GetUserRecord")
    @pytest.mark.flaky(reruns=3, reruns_delay=3)
    def test_getuserrecord(self, case_data):
        """

        :param case_data: 测试用例
        :return:
        """
        self.init_relevance = ini_request(case_dict, PATH)
# -*- coding: utf-8 -*-
# @Time    : 2019/06
# @Author  : XiaoXi
# @PROJECT : Aff_service

import allure
import pytest
from setupMain import project_path
from bin.config.confManage import dir_manage
from bin.unit.initializeCase import ini_case
from bin.unit.initializePremise import ini_request
from bin.unit.apiSendCheck import api_send_check

PATH = project_path + dir_manage('${page_dir}$') + "api"

case_dict = ini_case(PATH, "registerFromThirdPart")


@allure.feature(case_dict["test_info"]["title"])
class TestRegisterfromthirdpart:
    @pytest.mark.parametrize("case_data", case_dict["test_case"], ids=[])
    @allure.story("registerFromThirdPart")
    @pytest.mark.flaky(reruns=3, reruns_delay=3)
    def test_registerfromthirdpart(self, case_data):
        """

        :param case_data: 测试用例
        :return:
        """
        self.init_relevance = ini_request(case_dict, PATH)
        # 发送测试请求
示例#6
0
# -*- coding: utf-8 -*-
# @Time    : 2019/06
# @Author  : XiaoXi
# @PROJECT : Aff_service

import allure
import pytest
import setupMain

from bin.unit.initializeCase import ini_case
from bin.unit.initializePremise import ini_request
from bin.unit.apiSendCheck import api_send_check

PATH = setupMain.PATH + "/aff/pages/Setting"

case_dict = ini_case(PATH, "Get")


@allure.feature(case_dict["test_info"]["title"])
class TestGet:
    @pytest.mark.parametrize("case_data", case_dict["test_case"], ids=[])
    @allure.story("Get")
    @pytest.mark.flaky(reruns=3, reruns_delay=3)
    def test_get(self, case_data):
        """

        :param case_data: 测试用例
        :return:
        """
        self.init_relevance = ini_request(case_dict, PATH)
        # 发送测试请求