提交 09df3de8 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

i118

上级 cd610bc6
......@@ -3,21 +3,80 @@ export default {
'app.global.menu.notfound': 'Not Found',
'app.global.form.validatefields.catch': 'The validation did not pass, please check the input',
'independent_expect': 'Save Expect Result in Independent File',
'ztf_name_full': 'ZTF Automated Tool',
'scope': 'Scope', //
'name': 'Name', //
'start_time': 'Start Time', //
'end_time': 'End Time', //
'result': 'Result', //
'opt': 'opt', //
'title': 'Title', //
'category': 'Category', //
'version': 'Version', //
'severity': 'Severity', //
'priority': 'Priority', //
'step': 'Step', //
'status': 'Status', //
'all': 'All', //
'only_failed': 'Only Failed', //
'index': 'Index', //
'duration': 'Duration', //
'duration_sec': 'Duration(sec)', //
'sec': 'Sec', //
'info': 'Info', //
'checkpoint': 'Checkpoint(NO. Status Expect and Actual Result)', //
'product': 'Product',
'case': 'Test Case',
'module': 'Module',
'suite': 'Suite',
'task': 'Task',
'lang': 'Language',
'independent_expect': 'Save Expect Result in Independent File.',
'unit_test': 'Unit Test', //
'framework_tool': 'Framework/Tool', //
'case_detail': 'Case Info', //
'build_tool': 'Build Tool', //
'test_cmd': 'Test Command', //
'test_result': 'Result Detail', //
're_exec': 'Retest', //
're_exec_all': 'Retest All Cases', //
're_exec_failed': 'Retest Failed Cases', //
'test_env': 'Test Environment', //
'test_type': 'Test Type', //
'exec_type': 'Execution Type', //
'case_num': 'Case Number', //
'ztf_name_full': 'ZTF Automated Tool',
'submit': 'Submit',
'cancel': 'Cancel',
'reset': 'Reset',
'confirm': 'Confirm',
'save': 'Save',
'create': 'Create',
'view': 'View', //
'delete': 'Delete', //
'pass': 'Pass', //
'fail': 'Fail', //
'ignore': 'Ignore', //
'back': 'Back', //
'stop': 'Stop', //
'exec': 'Execution', //
'test_exec': 'Test Execution', //
'execute_unit_or_automated': 'Execute Unit or Automated Testing', //
'submit_to_zentao': 'Submit to ZenTao', //
'submit_bug_to_zentao': 'Submit Bug to ZenTao', //
'submit_result_to_zentao': 'Submit Result to ZenTao', //
'confirm_to_delete_result': 'Confirm to delete test result?', //
'submit_success': 'Submit successfully.', //
'submit_failed': 'Submit failed.', //
'view_error': 'View Error', //
'error_detail': 'Error Detail', //
'save_success': 'Save successfully.',
'save_fail': 'Save failed.',
......@@ -26,4 +85,13 @@ export default {
'pls_lang': 'Please select language.',
'sync_success': 'Sync successfully.',
'sync_fail': 'Sync failed.',
'delete_success': 'Delete successfully.', //
'pls_title': 'Please input title.', //
'pls_select_case': 'Please select cases.', //
'pls_module': 'Please select module.', //
'pls_suite': 'Please select suite.', //
'pls_task': 'Please select task.', //
'pls_test_tool': 'Please test tool.', //
'pls_build_tool': 'Please build tool.', //
'pls_cmd': 'Please input the command.', //
};
\ No newline at end of file
......@@ -3,27 +3,97 @@ export default {
'app.global.menu.notfound': 'Not Found',
'app.global.form.validatefields.catch': '验证不通过,请检查输入',
'ztf_name_full': 'ZTF自动化测试工具',
'scope': '范围', //
'name': '名称', //
'start_time': '开始时间', //
'end_time': '结束时间', //
'result': '结果', //
'opt': '操作', //
'title': '标题', //
'category': '分类', //
'version': '版本', //
'severity': '严重程度', //
'priority': '优先级', //
'step': '步骤', //
'status': '状态', //
'all': '所有', //
'only_failed': '仅失败用例', //
'index': '序号', //
'duration': '耗时', //
'duration_sec': '耗时(秒)', //
'sec': '', //
'info': '信息', //
'checkpoint': '检查点(编号 状态 期待结果 实际结果)', //
'product': '产品',
'case': '用例',
'module': '模块',
'suite': '套件',
'task': '任务',
'lang': '语言',
'independent_expect': '期待结果为独立文件',
'ztf_name_full': 'ZTF自动化测试工具',
'unit_test': '单元测试', //
'framework_tool': '框架/工具', //
'case_detail': '用例详情', //
'build_tool': '构建工具', //
'test_cmd': '测试命令', //
'test_result': '执行结果详情', //
're_exec': '重新执行', //
're_exec_all': '重新执行所有用例', //
're_exec_failed': '重新执行失败用例', //
'test_env': '测试环境', //
'test_type': '测试类型', //
'exec_type': '执行类型', //
'case_num': '用例数', //
'submit': '提交',
'cancel': '取消',
'reset': '重置',
'confirm': '确定',
'save': '保存',
'create': '新建',
'view': '查看', //
'delete': '删除', //
'pass': '通过', //
'fail': '失败', //
'ignore': '忽略', //
'back': '返回', //
'stop': '停止', //
'exec': '执行', //
'test_exec': '测试执行', //
'execute_unit_or_automated': '执行单元或自动化测试', //
'submit_to_zentao': '提交到禅道', //
'submit_bug_to_zentao': '提交缺陷到禅道', //
'submit_result_to_zentao': '提交结果到禅道', //
'confirm_to_delete_result': '确定删除执行结果吗?', //
'submit_success': '提交成功', //
'submit_failed': '提交失败', //
'view_error': '查看错误', //
'error_detail': '错误详情', //
'save_success': '保存成功',
'save_fail': '保存失败',
'expand_all': '展开全部',
'collapse_all': '收缩全部',
'wrong_url': '请输入正确的的URL地址,以http或https开头。',
'pls_product': '请选择产品',
'pls_lang': '请选择语言',
'sync_success': '同步成功',
'sync_fail': '同步失败',
'delete_success': '删除成功', //
'pls_title': '请输入标题', //
'pls_select_case': '请选择需要执行的用例', //
'pls_module': '请选择模块', //
'pls_suite': '请选择套件', //
'pls_task': '请选择任务', //
'pls_test_tool': '请选择测试工具', //
'pls_build_tool': '请选择构建工具', //
'pls_cmd': '请输入所要执行的命令', //
};
\ No newline at end of file
......@@ -62,9 +62,9 @@ const StoreModel: ModuleType = {
return false;
}
},
async removeProject({ commit }, currProjectPath) {
async removeProject({ commit }, selectedProjectPath) {
try {
await deleteProject(currProjectPath);
await deleteProject(selectedProjectPath);
const response: ResponseData = await queryProject('');
const { data } = response;
......
......@@ -3,14 +3,15 @@
<a-card :bordered="false">
<template #title>
<span v-if="seq">重新</span>执行用例
{{t('exec')}}{{t('case')}}
</template>
<template #extra>
<div class="opt">
<a-button v-if="isRunning == 'false'" :disabled="checkedKeys.length == 0" @click="exec" type="primary">执行</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">停止</a-button>
<a-button v-if="isRunning == 'false'" :disabled="checkedKeys.length == 0" @click="exec" type="primary">{{ t('exec') }}</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">{{t('stop')}}</a-button>
<a-button @click="back" type="link">返回</a-button>
<a-button @click="back" type="link">{{ t('back') }}</a-button>
</div>
</template>
......@@ -20,8 +21,8 @@
<div class="left"></div>
<div class="right">
<a-button @click="expandAll" type="link">
<span v-if="!isExpand">展开全部</span>
<span v-if="isExpand">收缩全部</span>
<span v-if="!isExpand">{{ t('expand_all') }}</span>
<span v-if="isExpand">{{ t('collapse_all') }}</span>
</a-button>
</div>
</div>
......@@ -141,7 +142,6 @@ export default defineComponent({
get(seq).then((json) => {
setTimeout(() => { // wait tree init completed
checkedKeys.value = getCaseIdsFromReport(json.data, scope)
console.log('selectedKeys', checkedKeys.value)
}, 300)
})
}
......@@ -223,7 +223,7 @@ export default defineComponent({
const exec = (): void => {
console.log("exec")
if (checkedKeys.value.length == 0) {
wsMsg.out += '请选择需要执行的用例。\n'
wsMsg.out += t('pls_select_case') + '\n'
return
}
......
......@@ -2,14 +2,14 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
<span v-if="seq">重新</span>执行套件
{{t('exec')}}{{t('module')}}
</template>
<template #extra>
<div class="opt">
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">执行</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">停止</a-button>
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">{{t('exec')}}</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">{{t('stop')}}</a-button>
<a-button @click="back" type="link">返回</a-button>
<a-button @click="back" type="link">{{t('back')}}</a-button>
</div>
</template>
......@@ -17,24 +17,24 @@
<div id="left">
<a-form :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="产品" v-bind="validateInfos.productId">
<a-form-item :label="t('product')" v-bind="validateInfos.productId">
<a-select v-model:value="model.productId" @change="selectProduct">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in products" :key="item.id" :value="item.id+''">{{item.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="模块" v-bind="validateInfos.moduleId">
<a-form-item :label="t('module')" v-bind="validateInfos.moduleId">
<a-select v-model:value="model.moduleId">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in modules" :key="item.id" :value="item.id+''"><span v-html="item.name"></span></a-select-option>
</a-select>
</a-form-item>
<a-form-item label="范围" v-if="model.scope">
<a-form-item :label="t('scope')" v-if="model.scope">
<a-select v-model:value="model.scope">
<a-select-option key="all" value="all">所有</a-select-option>
<a-select-option key="fail" value="fail">仅失败用例</a-select-option>
<a-select-option key="all" value="all">{{t('all')}}</a-select-option>
<a-select-option key="fail" value="fail">{{t('only_failed')}}</a-select-option>
</a-select>
</a-form-item>
......@@ -139,10 +139,10 @@ export default defineComponent({
const rules = reactive({
productId: [
{ required: true, message: '请选择产品' },
{ required: true, message: t('pls_product') },
],
moduleId: [
{ required: true, message: '请选择模块' },
{ required: true, message: t('pls_module') },
],
});
......
......@@ -2,14 +2,14 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
<span v-if="model.scope">重新</span>执行套件
{{t('exec')}}{{t('suite')}}
</template>
<template #extra>
<div class="opt">
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">执行</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">停止</a-button>
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">{{t('exec')}}</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">{{t('stop')}}</a-button>
<a-button @click="back" type="link">返回</a-button>
<a-button @click="back" type="link">{{t('back')}}</a-button>
</div>
</template>
......@@ -17,24 +17,24 @@
<div id="left">
<a-form :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="产品" v-bind="validateInfos.productId">
<a-form-item :label="t('product')" v-bind="validateInfos.productId">
<a-select v-model:value="model.productId" @change="selectProduct">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in products" :key="item.id" :value="item.id+''">{{item.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="套件" v-bind="validateInfos.suiteId">
<a-form-item :label="t('suite')" v-bind="validateInfos.suiteId">
<a-select v-model:value="model.suiteId">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in suites" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="范围" v-if="model.productId">
<a-form-item :label="t('scope')" v-if="model.productId">
<a-select v-model:value="model.scope">
<a-select-option key="all" value="all">所有</a-select-option>
<a-select-option key="fail" value="fail">仅失败用例</a-select-option>
<a-select-option key="all" value="all">{{ t('all') }}</a-select-option>
<a-select-option key="fail" value="fail">{{ t('only_failed') }}</a-select-option>
</a-select>
</a-form-item>
......@@ -139,10 +139,10 @@ export default defineComponent({
const rules = reactive({
productId: [
{ required: true, message: '请选择产品' },
{ required: true, message: t('pls_product') },
],
suiteId: [
{ required: true, message: '请选择套件' },
{ required: true, message: t('pls_suite') },
],
});
......
......@@ -2,14 +2,14 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
<span v-if="model.scope">重新</span>执行任务
{{t('exec')}}{{t('task')}}
</template>
<template #extra>
<div class="opt">
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">执行</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">停止</a-button>
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">{{t('exec')}}</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">{{t('stop')}}</a-button>
<a-button @click="back" type="link">返回</a-button>
<a-button @click="back" type="link">{{t('back')}}</a-button>
</div>
</template>
......@@ -17,24 +17,24 @@
<div id="left">
<a-form :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="产品" v-bind="validateInfos.productId">
<a-form-item :label="t('product')" v-bind="validateInfos.productId">
<a-select v-model:value="model.productId" @change="selectProduct">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in products" :key="item.id" :value="item.id+''">{{item.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="任务" v-bind="validateInfos.taskId">
<a-form-item :label="t('task')" v-bind="validateInfos.taskId">
<a-select v-model:value="model.taskId">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in tasks" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="范围" v-if="model.productId">
<a-form-item :label="t('scope')" v-if="model.productId">
<a-select v-model:value="model.scope">
<a-select-option key="all" value="all">所有</a-select-option>
<a-select-option key="fail" value="fail">仅失败用例</a-select-option>
<a-select-option key="all" value="all">{{t('all')}}</a-select-option>
<a-select-option key="fail" value="fail">{{t('only_failed')}}</a-select-option>
</a-select>
</a-form-item>
......@@ -138,10 +138,10 @@ export default defineComponent({
const rules = reactive({
productId: [
{ required: true, message: '请选择产品' },
{ required: true, message: t('pls_product') },
],
taskId: [
{ required: true, message: '请选择任务' },
{ required: true, message: t('pls_task') },
],
});
......
......@@ -2,14 +2,14 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
执行单元测试
{{t('exec')}}{{t('unit_test')}}
</template>
<template #extra>
<div class="opt">
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">执行</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">停止</a-button>
<a-button v-if="isRunning == 'false'" @click="exec" type="primary">{{t('exec')}}</a-button>
<a-button v-if="isRunning == 'true'" @click="stop" type="primary">{{t('stop')}}</a-button>
<a-button @click="back" type="link">返回</a-button>
<a-button @click="back" type="link">{{t('back')}}</a-button>
</div>
</template>
......@@ -17,14 +17,14 @@
<div id="left">
<a-form :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="产品" v-bind="validateInfos.productId">
<a-form-item :label="t('product')" v-bind="validateInfos.productId">
<a-select v-model:value="model.productId">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in products" :key="item.id" :value="item.id+''">{{item.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="框架/工具" v-bind="validateInfos.testTool">
<a-form-item :label="t('framework_tool')" v-bind="validateInfos.testTool">
<a-select v-model:value="model.testTool">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in unitTestFrameworks.list" :key="item" :value="item">
......@@ -33,7 +33,7 @@
</a-select>
</a-form-item>
<a-form-item label="构建工具" v-if="model.testTool=='junit' || model.testTool=='testng'"
<a-form-item :label="t('build_tool')" v-if="model.testTool=='junit' || model.testTool=='testng'"
v-bind="validateInfos.buildTool">
<a-select v-model:value="model.buildTool">
<a-select-option key="" value="">&nbsp;</a-select-option>
......@@ -43,12 +43,12 @@
</a-select>
</a-form-item>
<a-form-item label="测试命令" v-bind="validateInfos.cmd">
<a-form-item :label="t('test_cmd')" v-bind="validateInfos.cmd">
<a-textarea v-model:value="model.cmd" placeholder="mvn clean package test"
:auto-size="{ minRows: 3, maxRows: 6 }" />
</a-form-item>
<a-form-item label="提交到禅道" v-bind="validateInfos.submitResult">
<a-form-item :label="t('submit_to_zentao')" v-bind="validateInfos.submitResult">
<a-switch v-model:checked="model.submitResult" />
</a-form-item>
......@@ -177,16 +177,16 @@ export default defineComponent({
const rules = reactive({
productId: [
{ required: true, message: '请选择产品' },
{ required: true, message: t('pls_product') },
],
testTool: [
{ required: true, message: '请选择测试工具' },
{ required: true, message: t('pls_test_tool') },
],
buildTool: [
{ required: true, message: '请选择构建工具' },
{ required: true, message: t('pls_build_tool') },
],
cmd: [
{ required: true, message: '请输入所要执行的命令' },
{ required: true, message: t('pls_cmd') },
],
});
......
<template>
<a-modal
title="提交缺陷到禅道"
:title="t('submit_bug_to_zentao')"
:destroy-on-close="true"
:mask-closable="false"
:visible="true"
......@@ -8,59 +8,59 @@
width="800px"
>
<template #footer>
<a-button key="back" @click="() => onCancel()">取消</a-button>
<a-button key="submit" type="primary" @click="onFinish">提交</a-button>
<a-button key="submit" type="primary" @click="onFinish">{{ t('submit') }}</a-button>
<a-button key="back" @click="() => onCancel()">{{ t('cancel') }}</a-button>
</template>
<div>
<a-form :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="标题" v-bind="validateInfos.title">
<a-form-item :label="t('title')" v-bind="validateInfos.title">
<a-input v-model:value="modelRef.title" />
</a-form-item>
<a-form-item label="产品" v-bind="validateInfos.product">
<a-form-item :label="t('product')" v-bind="validateInfos.product">
<a-select v-model:value="modelRef.product" @change="selectProduct">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in products" :key="item.id" :value="item.id+''">{{item.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="模块">
<a-form-item :label="t('module')">
<a-select v-model:value="modelRef.module">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in modules" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="分类">
<a-form-item :label="t('category')">
<a-select v-model:value="modelRef.type">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in categories" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="版本">
<a-form-item :label="t('version')">
<a-select v-model:value="modelRef.version">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in versions" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="严重程度">
<a-form-item :label="t('severity')">
<a-select v-model:value="modelRef.severity">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in severities" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="优先级">
<a-form-item :label="t('priority')">
<a-select v-model:value="modelRef.pri">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in priorities" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="步骤">
<a-form-item :label="t('step')">
<a-textarea v-model:value="modelRef.steps" :auto-size="{ minRows: 5, maxRows: 8 }" />
</a-form-item>
......@@ -127,10 +127,10 @@ export default defineComponent({
const rules = reactive({
title: [
{ required: true, message: '请输入标题' },
{ required: true, message: t('pls_title') },
],
product: [
{ required: true, message: '请选择产品' },
{ required: true, message: t('pls_product') },
],
});
......
<template>
<a-modal
title="提交结果到禅道"
:title="t('submit_result_to_zentao')"
:destroy-on-close="true"
:mask-closable="false"
:visible="true"
:onCancel="onCancel"
>
<template #footer>
<a-button key="back" @click="() => onCancel()">取消</a-button>
<a-button key="submit" type="primary" @click="onFinish">提交</a-button>
<a-button key="back" @click="() => onCancel()">{{t('cancel')}}</a-button>
<a-button key="submit" type="primary" @click="onFinish">t('submit')</a-button>
</template>
<div>
<a-form :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="产品" v-bind="validateInfos.productId">
<a-form-item :label="t('product')" v-bind="validateInfos.productId">
<a-select v-model:value="modelRef.productId" @change="selectProduct">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in products" :key="item.id" :value="item.id+''">{{item.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="任务">
<a-form-item :label="t('task')">
<a-select v-model:value="modelRef.taskId">
<a-select-option key="" value="">&nbsp;</a-select-option>
<a-select-option v-for="item in tasks" :key="item.id" :value="item.id+''">{{ item.name }}</a-select-option>
......@@ -78,7 +78,7 @@ export default defineComponent({
const rules = reactive({
productId: [
{ required: true, message: '请选择产品' },
{ required: true, message: t('pls_product') },
],
});
......
......@@ -2,19 +2,19 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
测试执行
{{ t('test_exec') }}
</template>
<template #extra>
<div class="opt">
<template v-if="currProject.type === 'func'">
<a-button @click="execCase" type="primary">执行用例</a-button>
<a-button @click="execModule" type="primary">执行模块</a-button>
<a-button @click="execSuite" type="primary">执行套件</a-button>
<a-button @click="execTask" type="primary">执行任务</a-button>
<a-button @click="execCase" type="primary">{{t('exec')}}{{t('case')}}</a-button>
<a-button @click="execModule" type="primary">{{t('exec')}}{{t('module')}}</a-button>
<a-button @click="execSuite" type="primary">{{t('exec')}}{{t('suite')}}</a-button>
<a-button @click="execTask" type="primary">{{t('exec')}}{{t('task')}}</a-button>
</template>
<template v-if="currProject.type === 'unit'">
<a-button @click="execUnit" type="primary">执行单元或自动化测试</a-button>
<a-button @click="execUnit" type="primary">{{t('execute_unit_or_automated')}}</a-button>
</template>
</div>
</template>
......@@ -41,14 +41,14 @@
</template>
<template #result="{ record }">
合计{{record.total}}
<span class="t-pass">{{record.pass}}{{percent(record.pass, record.total)}}通过</span>
<span class="t-fail">{{record.fail}}{{percent(record.fail, record.total)}}失败</span>
<span class="t-skip">{{record.skip}}{{percent(record.skip, record.total)}}忽略</span>
<span class="t-pass">{{record.pass}}{{percent(record.pass, record.total)}}{{ t('pass') }}</span>
<span class="t-fail">{{record.fail}}{{percent(record.fail, record.total)}}{{ t('fail') }}</span>
<span class="t-skip">{{record.skip}}{{percent(record.skip, record.total)}}{{ t('ignore') }}</span>
</template>
<template #action="{ record }">
<a-button @click="() => viewResult(record)" type="link" size="small">查看</a-button>
<a-button @click="() => viewResult(record)" type="link" size="small">{{ t('view') }}</a-button>
<a-button @click="() => deleteExec(record)" type="link" size="small"
:loading="deleteLoading.includes(record.seq)">删除</a-button>
:loading="deleteLoading.includes(record.seq)">{{ t('delete') }}</a-button>
</template>
</a-table>
......@@ -114,37 +114,37 @@ export default defineComponent({
const columns =[
{
title: '序号',
title: t('index'),
dataIndex: 'index',
width: 150,
customRender: ({text, index}: { text: any; index: number}) => index + 1,
},
{
title: '执行类型',
title: t('exec_type'),
dataIndex: 'execBy',
slots: { customRender: 'execBy' },
},
{
title: '名称',
title: t('exec_type'),
dataIndex: 'seq',
},
{
title: '开始时间',
title: t('start_time'),
dataIndex: 'startTime',
slots: { customRender: 'startTime' },
},
{
title: '耗时',
title: t('duration'),
dataIndex: 'duration',
slots: { customRender: 'duration' },
},
{
title: '结果',
title: t('result'),
dataIndex: 'result',
slots: { customRender: 'result' },
},
{
title: '操作',
title: t('opt'),
key: 'action',
width: 260,
slots: { customRender: 'action' },
......@@ -182,15 +182,14 @@ export default defineComponent({
const deleteLoading = ref<string[]>([]);
const deleteExec = (item) => {
Modal.confirm({
title: '删除脚本',
content: `确定删除编号"${item.seq}"的执行结果吗?`,
okText: '确认',
cancelText: '取消',
title: t('confirm_to_delete_result'),
okText: t('confirm'),
cancelText: t('cancel'),
onOk: async () => {
deleteLoading.value = [item.seq];
const res: boolean = await store.dispatch('History/delete', item.seq);
if (res === true) {
message.success('删除成功!');
message.success(t('delete_success'));
await list();
}
deleteLoading.value = [];
......
......@@ -2,48 +2,48 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
执行结果详情
{{t('test_result')}}
</template>
<template #extra>
<div class="opt">
<a-button @click="exec('all')" type="primary">重新执行所有用例</a-button>
<a-button @click="exec('fail')" type="primary">重新执行失败用例</a-button>
<a-button @click="exec('all')" type="primary">{{ t('re_exec_all') }}</a-button>
<a-button @click="exec('fail')" type="primary">{{ t('re_exec_failed') }}</a-button>
<a-button @click="openResultForm()">提交结果到禅道</a-button>
<a-button type="link" @click="() => back()">返回</a-button>
<a-button @click="openResultForm()">{{ t('submit_result_to_zentao') }}</a-button>
<a-button type="link" @click="() => back()">{{ t('back') }}</a-button>
</div>
</template>
<div class="main">
<a-row>
<a-col :span="2" class="t-bord t-label-right">测试环境</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('test_env') }}</a-col>
<a-col :span="4">{{ testEnv(report.testEnv) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">测试类型</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('test_type') }}</a-col>
<a-col :span="4">{{ testType(report.testType) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">执行类型</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('exec_type') }}</a-col>
<a-col :span="4">{{ execBy(report) }}</a-col>
</a-row>
<a-row>
<a-col :span="2" class="t-bord t-label-right">开始时间</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('start_time') }}</a-col>
<a-col :span="4">{{ momentTime(report.startTime) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">结束时间</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('end_time') }}</a-col>
<a-col :span="4">{{ momentTime(report.endTime) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">耗时</a-col>
<a-col :span="4">{{ report.duration }}</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('duration') }}</a-col>
<a-col :span="4">{{ report.duration }}{{ t('sec') }}</a-col>
</a-row>
<a-row>
<a-col :span="2" class="t-bord t-label-right">用例数</a-col>
<a-col :span="4">{{ momentTime(report.startTime) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">通过</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('case_num') }}</a-col>
<a-col :span="4">{{ report.startTime }}</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('pass') }}</a-col>
<a-col :span="4">{{ report.pass }}({{ percent(report.pass, report.total) }})</a-col>
<a-col :span="2" class="t-bord t-label-right">失败</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('fail') }}</a-col>
<a-col :span="4">{{ report.fail }}({{ percent(report.fail, report.total) }})</a-col>
<a-col :span="2" class="t-bord t-label-right">跳过</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('skip') }}</a-col>
<a-col :span="4">{{ report.skip }}({{ percent(report.skip, report.total) }})</a-col>
</a-row>
<a-row>
<a-col :span="2" class="t-bord t-label-right">用例详情</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('case_detail') }}</a-col>
</a-row>
<a-row>
<a-col :span="2"></a-col>
......@@ -56,7 +56,7 @@
<span :class="'t-'+cs.status">{{ resultStatus(cs.status) }}</span>
</div>
<div class="buttons" v-if="cs.status==='fail'">
<a-button @click="openBugForm(cs)">提交缺陷到禅道</a-button>
<a-button @click="openBugForm(cs)">{{ t('submit_bug_to_zentao') }}</a-button>
</div>
</div>
......@@ -169,23 +169,23 @@ export default defineComponent({
const columns = [
{
title: '序号',
title: t('index'),
dataIndex: 'seq',
width: 150,
customRender: ({text, index}: { text: any; index: number }) => index + 1,
},
{
title: '步骤',
title: t('step'),
dataIndex: 'name',
slots: {customRender: 'name'},
},
{
title: '状态',
title: t('status'),
dataIndex: 'status',
slots: {customRender: 'status'},
},
{
title: '检查点(编号 状态 期待结果 实际结果)',
title: t('checkpoint'),
dataIndex: 'checkPoints',
slots: {customRender: 'checkPoints'},
},
......@@ -232,12 +232,12 @@ export default defineComponent({
console.log('json', json)
if (json.code === 0) {
notification.success({
message: '提交成功',
message: t('submit_success'),
});
setResultFormVisible(false)
} else {
notification.error({
message: '提交失败',
message: t('submit_failed'),
description: json.msg,
});
}
......@@ -268,12 +268,12 @@ export default defineComponent({
console.log('json', json)
if (json.code === 0) {
notification.success({
message: '提交成功',
message: t('submit_success'),
});
setBugFormVisible(false)
} else {
notification.error({
message: '提交失败',
message: t('submit_failed'),
description: json.msg,
});
}
......
......@@ -2,46 +2,46 @@
<div class="indexlayout-main-conent">
<a-card :bordered="false">
<template #title>
执行结果详情
{{t('test_result')}}
</template>
<template #extra>
<div class="opt">
<a-button @click="openResultForm()" type="primary">提交结果到禅道</a-button>
<a-button @click="openResultForm()" type="primary">{{ t('submit_result_to_zentao') }}</a-button>
<a-button type="link" @click="() => back()">返回</a-button>
<a-button type="link" @click="() => back()">{{ t('back') }}</a-button>
</div>
</template>
<div class="main">
<a-row>
<a-col :span="2" class="t-bord t-label-right">测试环境</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('test_env') }}</a-col>
<a-col :span="4">{{ testEnv(report.testEnv) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">测试类型</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('test_type') }}</a-col>
<a-col :span="4">{{ testType(report.testType) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">执行类型</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('exec_type') }}</a-col>
<a-col :span="4">{{ execBy(report) }}</a-col>
</a-row>
<a-row>
<a-col :span="2" class="t-bord t-label-right">开始时间</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('start_time') }}</a-col>
<a-col :span="4">{{ momentTime(report.startTime) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">结束时间</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('end_time') }}</a-col>
<a-col :span="4">{{ momentTime(report.endTime) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">耗时</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('duration') }}</a-col>
<a-col :span="4">{{ report.duration }}秒</a-col>
</a-row>
<a-row>
<a-col :span="2" class="t-bord t-label-right">用例数</a-col>
<a-col :span="4">{{ momentTime(report.startTime) }}</a-col>
<a-col :span="2" class="t-bord t-label-right">通过</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('case_num') }}</a-col>
<a-col :span="4">{{ report.total }}</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('pass') }}</a-col>
<a-col :span="4">{{ report.pass }}({{ percent(report.pass, report.total) }})</a-col>
<a-col :span="2" class="t-bord t-label-right">失败</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('fail') }}</a-col>
<a-col :span="4">{{ report.fail }}({{ percent(report.fail, report.total) }})</a-col>
<a-col :span="2" class="t-bord t-label-right">跳过</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('skip') }}</a-col>
<a-col :span="4">{{ report.skip }}({{ percent(report.skip, report.total) }})</a-col>
</a-row>
<a-row>
<a-col :span="2" class="t-bord t-label-right">用例详情</a-col>
<a-col :span="2" class="t-bord t-label-right">{{ t('case_detail') }}</a-col>
</a-row>
<a-row>
<a-col :span="2"></a-col>
......@@ -62,10 +62,10 @@
</template>
<template #info="{ record }">
<template v-if="record.failure">
<a-button type="link" @click="showInfo(record.id)">查看错误</a-button>
<a-button type="link" @click="showInfo(record.id)">{{t('view_error')}}</a-button>
<a-modal v-model:visible="visibleMap[record.id]"
:title="t('error_detail')"
@ok="closeInfo(record.id)"
title="错误信息"
width="1000px">
<p>{{ jsonStr(record.failure) }}</p>
</a-modal>
......@@ -158,26 +158,26 @@ export default defineComponent({
customRender: ({text, index}: { text: any; index: number }) => index + 1,
},
{
title: '用例',
title: t('index'),
dataIndex: 'title',
slots: {customRender: 'title'},
},
{
title: '套件',
title: t('suite'),
dataIndex: 'testSuite',
},
{
title: '耗时(秒)',
title: t('duration_sec'),
dataIndex: 'duration',
slots: {customRender: 'duration'},
},
{
title: '状态',
title: t('status'),
dataIndex: 'status',
slots: {customRender: 'status'},
},
{
title: '信息',
title: t('info'),
dataIndex: 'info',
slots: {customRender: 'info'},
},
......@@ -226,12 +226,12 @@ export default defineComponent({
console.log('json', json)
if (json.code === 0) {
notification.success({
message: '提交成功',
message: t('submit_success'),
});
setResultFormVisible(false)
} else {
notification.error({
message: '提交失败',
message: t('submit_failed'),
description: json.msg,
});
}
......
export default {
'index-layout.menu.execution': 'Execution',
};
export default {
'index-layout.menu.execution': '执行',
};
......@@ -3,7 +3,5 @@ export default {
'index-layout.menu.script.list': '脚本管理',
'no_script_for_unittest': '此为单元测试项目,无ZTF脚本。',
'expand_all': '展开全部',
'collapse_all': '收缩全部',
'extract_step': '提取步骤',
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册