znt/module/testcase/test/zen/getmindexport.php

41 lines
1.7 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 testcaseZen::getMindExport();
timeout=0
cid=19093
- 步骤1正常情况xmind格式全模块验证返回数组有6个键 @6
- 步骤2freemind格式全模块验证返回数组有6个键 @6
- 步骤3特定模块ID验证返回数组有6个键 @6
- 步骤4无效产品ID验证返回数组有6个键 @6
- 步骤5指定分支参数验证返回数组有6个键 @6
*/
// 1. 导入依赖(路径固定,不可修改)
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/testcasezen.unittest.class.php';
// 2. zendata数据准备重用现有测试数据生成方式
zenData('case')->loadYaml('modulescenecase')->gen('200');
zenData('product')->gen('50');
zenData('scene')->gen('50');
zenData('module')->gen('1830');
zenData('casestep')->gen('200');
zenData('user')->gen('1');
// 3. 用户登录
su('admin');
// 4. 创建测试实例
$testcaseZenTest = new testcaseZenTest();
// 5. 强制要求必须包含至少5个测试步骤
r($testcaseZenTest->getMindExportTest('xmind', 1, 0, '')) && p() && e('6'); // 步骤1正常情况xmind格式全模块验证返回数组有6个键
r($testcaseZenTest->getMindExportTest('freemind', 1, 0, '')) && p() && e('6'); // 步骤2freemind格式全模块验证返回数组有6个键
r($testcaseZenTest->getMindExportTest('xmind', 1, 1821, '')) && p() && e('6'); // 步骤3特定模块ID验证返回数组有6个键
r($testcaseZenTest->getMindExportTest('xmind', 999, 0, '')) && p() && e('6'); // 步骤4无效产品ID验证返回数组有6个键
r($testcaseZenTest->getMindExportTest('xmind', 2, 1825, 'main')) && p() && e('6'); // 步骤5指定分支参数验证返回数组有6个键