当前位置: 首页>>代码示例>>Python>>正文


Python TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue方法代码示例

本文整理汇总了Python中testlink.TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue方法的典型用法代码示例。如果您正苦于以下问题:Python TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue方法的具体用法?Python TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue怎么用?Python TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在testlink.TestLinkHelper的用法示例。


在下文中一共展示了TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestLinkAPIGenericOfflineTestCase

# 需要导入模块: from testlink import TestLinkHelper [as 别名]
# 或者: from testlink.TestLinkHelper import getTestCaseCustomFieldTestPlanDesignValue [as 别名]

#.........这里部分代码省略.........
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2', 
                            1, '7760', 'cf_valueEmpty', details='value') 
        self.assertEqual('', response)   
                
    def test_getTestCaseCustomFieldDesignValue_simple(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2', 
                            1, '7760', 'cf_simple', details='simple') 
        self.assertEqual('a custom spec design string', response['value'])           

    def test_updateTestCaseCustomFieldDesignValue_simple(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.updateTestCaseCustomFieldDesignValue('GPROAPI8-2', 
                            1, '7760', {'cf_field1'  : 'a_string'}) 
        self.assertEqual('', response)

    def test_getTestCaseCustomFieldExecutionValue_notAssigned(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestCaseCustomFieldExecutionValue(
                                    'cf_notAssigned', '7760', 1, '792', '7761') 
        self.assertEqual(None, response)
        self.assertEqual(self.api.devKey, self.api.callArgs['devKey'])

    def test_getTestCaseCustomFieldExecutionValue_full(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestCaseCustomFieldExecutionValue(
                                        'cf_full', '7760', 1, '792', '7761') 
        self.assertEqual('a custom exec string', response['value'])           
        self.assertEqual('0', response['enable_on_design']) 
        self.assertEqual('0', response['enable_on_testplan_design']) 
        self.assertEqual('1', response['enable_on_execution'])           

    def test_getTestCaseCustomFieldTestPlanDesignValue_notAssigned(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestCaseCustomFieldTestPlanDesignValue(
                                    'cf_notAssigned', '7760', 1, '7761', '779') 
        self.assertEqual(None, response)
        self.assertEqual(self.api.devKey, self.api.callArgs['devKey'])

    def test_getTestCaseCustomFieldTestPlanDesignValue_full(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestCaseCustomFieldTestPlanDesignValue(
                                        'cf_full', '7760', 1, '7761', '779') 
        self.assertEqual('a custom PlanDesign string', response['value'])           
        self.assertEqual('0', response['enable_on_design']) 
        self.assertEqual('1', response['enable_on_testplan_design']) 
        self.assertEqual('0', response['enable_on_execution'])           

    def test_getTestSuiteCustomFieldDesignValue_notAssigned(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestSuiteCustomFieldDesignValue(
                                            'cf_notAssigned', '7760', '7762') 
        self.assertEqual(None, response)
        self.assertEqual(self.api.devKey, self.api.callArgs['devKey'])

    def test_getTestSuiteCustomFieldDesignValue_full(self):
        self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
        response = self.api.getTestSuiteCustomFieldDesignValue(
                                                    'cf_full', '7760', '7762') 
        self.assertEqual('a custom TSuite string', response['value'])           
        self.assertEqual('1', response['enable_on_design']) 
        self.assertEqual('0', response['enable_on_testplan_design']) 
        self.assertEqual('0', response['enable_on_execution'])           

    def test_getTestPlanCustomFieldDesignValue_notAssigned(self):
开发者ID:manojpkr,项目名称:TestLink-API-Python-client,代码行数:70,代码来源:testlinkapigeneric_offline_test.py

示例2: TestLinkAPIGenericOnlineTestCase

# 需要导入模块: from testlink import TestLinkHelper [as 别名]
# 或者: from testlink.TestLinkHelper import getTestCaseCustomFieldTestPlanDesignValue [as 别名]

#.........这里部分代码省略.........
#         self.assertTrue(response)

    def test_deleteExecution_unknownKey(self):
        try:
            response = self.client.deleteExecution(40000711)
            # case: TL configuration allows deletion of executions
            # response returns Success, even if executionID is unkown
            self.assertEqual([{'status': True, 'message': 'Success!', 'id': 40000711, 
                               'operation': 'deleteExecution'}], response)
        except TLResponseError as tl_err:
            # case: TL configuration does not allow deletion of executions
            # Expects: 232: Configuration does not allow delete executions
            self.assertEqual(232, tl_err.code)

    def test_setTestCaseExecutionType_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000712'):
            self.client.setTestCaseExecutionType('N-40000711', 1, 40000712, 1)
            
    def test_assignRequirements_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000712'):
            self.client.assignRequirements('N-40000711', 40000712, 
                        [{'req_spec' : 40000713, 'requirements' : [40000714, 40000717]}, 
                         {'req_spec' : 4723, 'requirements' : [4725]}])
            
    def test_getExecCountersByBuild_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '3000.*40000711'):
            self.client.getExecCountersByBuild(40000711)
            
    def test_getTestCaseCustomFieldExecutionValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '236.*version/executionid'):
            self.client.getTestCaseCustomFieldExecutionValue(
                            'cf_full', '40000711', 1, '715', '40000713')
            
    def test_getTestCaseCustomFieldTestPlanDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
            self.client.getTestCaseCustomFieldTestPlanDesignValue(
                            'cf_full', '40000711', 1, '40000713', '615')
            
    def test_updateTestCaseCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
            self.client.updateTestCaseCustomFieldDesignValue(
                            'TC-40000712', 1, 40000711, {'cf_field1' : 'value1',
                                                 'cf_field2' : 'value2'})

    def test_getTestSuiteCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
            self.client.getTestSuiteCustomFieldDesignValue(
                                                    'cf_full', 40000711, 40000713) 
            
    def test_getTestPlanCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
            self.client.getTestPlanCustomFieldDesignValue(
                                                    'cf_full', 40000711, 40000712)             

    def test_getReqSpecCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
            self.client.getReqSpecCustomFieldDesignValue(
                                                    'cf_full', 40000711, 4732)             

    def test_getRequirementCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
            self.client.getRequirementCustomFieldDesignValue(
                                                    'cf_full', 40000711, 4734)  
            
    def test_assignTestCaseExecutionTask_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, '3000.*40000711'):
开发者ID:TommyXie1990,项目名称:TestLink-API-Python-client,代码行数:70,代码来源:testlinkapi_generic_online_test.py

示例3: TestLinkAPIOnlineTestCase

# 需要导入模块: from testlink import TestLinkHelper [as 别名]
# 或者: from testlink.TestLinkHelper import getTestCaseCustomFieldTestPlanDesignValue [as 别名]

#.........这里部分代码省略.........
            # case: TL configuration allows deletion of executions
            # response returns Success, even if executionID is unkown
            self.assertEqual(
                [{"status": True, "message": "Success!", "id": 40000711, "operation": "deleteExecution"}], response
            )
        except TLResponseError as tl_err:
            # case: TL configuration does not allow deletion of executions
            # Expects: 232: Configuration does not allow delete executions
            self.assertEqual(232, tl_err.code)

    def test_setTestCaseExecutionType_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000712"):
            self.client.setTestCaseExecutionType("N-40000711", 1, 40000712, 1)

    def test_assignRequirements_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000712"):
            self.client.assignRequirements(
                "N-40000711",
                40000712,
                [
                    {"req_spec": 40000713, "requirements": [40000714, 40000717]},
                    {"req_spec": 4723, "requirements": [4725]},
                ],
            )

    def test_getExecCountersByBuild_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "3000.*40000711"):
            self.client.getExecCountersByBuild(40000711)

    def test_getTestCaseCustomFieldExecutionValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "236.*version/executionid"):
            self.client.getTestCaseCustomFieldExecutionValue("cf_full", "40000711", 1, "715", "40000713")

    def test_getTestCaseCustomFieldTestPlanDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
            self.client.getTestCaseCustomFieldTestPlanDesignValue("cf_full", "40000711", 1, "40000713", "615")

    def test_updateTestCaseCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
            self.client.updateTestCaseCustomFieldDesignValue(
                "TC-40000712", 1, 40000711, {"cf_field1": "value1", "cf_field2": "value2"}
            )

    def test_getTestSuiteCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
            self.client.getTestSuiteCustomFieldDesignValue("cf_full", 40000711, 40000713)

    def test_getTestPlanCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
            self.client.getTestPlanCustomFieldDesignValue("cf_full", 40000711, 40000712)

    def test_getReqSpecCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
            self.client.getReqSpecCustomFieldDesignValue("cf_full", 40000711, 4732)

    def test_getRequirementCustomFieldDesignValue_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
            self.client.getRequirementCustomFieldDesignValue("cf_full", 40000711, 4734)

    def test_assignTestCaseExecutionTask_unknownID(self):
        with self.assertRaisesRegex(TLResponseError, "3000.*40000711"):
            self.client.assignTestCaseExecutionTask(
                "username", 40000711, "TC-40000712", buildname="build 40000713", platformname="platform 40000714"
            )

    def test_getTestCaseBugs_unknownID(self):
开发者ID:dkentw,项目名称:TestLink-API-Python-client,代码行数:70,代码来源:testlinkapi_online_test.py


注:本文中的testlink.TestLinkHelper.getTestCaseCustomFieldTestPlanDesignValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。