diff --git a/module/testcase/test/lib/testcase.ui.class.php b/module/testcase/test/lib/testcase.ui.class.php index 5d7f79827f..e2a81cae86 100755 --- a/module/testcase/test/lib/testcase.ui.class.php +++ b/module/testcase/test/lib/testcase.ui.class.php @@ -184,6 +184,31 @@ class testcase extends tester return $this->failed('批量编辑测试用例失败'); } + /** + * 检查导出测试用例。 + * check testcase review. + * + * @param array $url + * @param array $testcases + * @access public + * @return object + */ + public function exportTestcase($url, $testcases) + { + $this->login(); + $form = $this->initForm('testcase', 'browse', $url, 'appIframe-qa'); + $form->dom->exportMenu->click(); + $this->webdriver->wait(1); + $form->dom->exportCaseButton->click(); + if(isset($testcases['fileName'])) $form->dom->fileName->setValue($testcases['fileName']); + if(isset($testcases['fileType'])) $form->dom->fileType->picker($testcases['fileType']); + if(isset($testcases['encode'])) $form->dom->encode->picker($testcases['encode']); + if(isset($testcases['exportType'])) $form->dom->exportType->picker($testcases['exportType']); + $form->dom->export->click(); + if($this->response('method') == 'browse') return $this->success('导出测试用例成功'); + return $this->failed('导出测试用例失败'); + } + /** * 添加测试用例步骤 * fill in case steps