fix(接口测试): 修复node执行时没有后缀的文件路径生成错我问题
--bug=1026446 --user=宋天阳 【接口测试】从2.9升级到2.10后,执行关联了没有后缀的文件的接口,提示找不到文件 https://www.tapd.cn/55049933/s/1374470
This commit is contained in:
parent
d7f6d2dbab
commit
ae8528241a
|
@ -31,7 +31,7 @@ public class ApiScenarioReportResultService {
|
|||
if (CollectionUtils.isNotEmpty(queue)) {
|
||||
if (queue.size() == 1) {
|
||||
queue.forEach(item -> {
|
||||
// 事物控制器出来的结果特殊处理
|
||||
// 事务控制器出来的结果特殊处理
|
||||
if (StringUtils.isNotEmpty(item.getName())
|
||||
&& item.getName().startsWith(CommonConstants.PRE_TRANSACTION)
|
||||
&& CollectionUtils.isEmpty(item.getSubRequestResults())) {
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { baseSocket } from '@/api/base-network';
|
||||
import {baseSocket} from '@/api/base-network';
|
||||
import MsRequestResult from './components/RequestResult';
|
||||
import MsRequestResultTail from './components/RequestResultTail';
|
||||
import MsScenarioResult from './components/ScenarioResult';
|
||||
|
@ -88,11 +88,11 @@ import MsContainer from 'metersphere-frontend/src/components/MsContainer';
|
|||
import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer';
|
||||
import MsApiReportExport from './ApiReportExport';
|
||||
import MsApiReportViewHeader from './ApiReportViewHeader';
|
||||
import { RequestFactory } from '../../definition/model/ApiTestModel';
|
||||
import { getCurrentProjectID } from 'metersphere-frontend/src/utils/token';
|
||||
import { windowPrint } from 'metersphere-frontend/src/utils';
|
||||
import { STEP } from '../scenario/Setting';
|
||||
import { getScenarioReport, updateReport } from '@/api/scenario-report';
|
||||
import {RequestFactory} from '../../definition/model/ApiTestModel';
|
||||
import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token';
|
||||
import {windowPrint} from 'metersphere-frontend/src/utils';
|
||||
import {STEP} from '../scenario/Setting';
|
||||
import {getScenarioReport, updateReport} from '@/api/scenario-report';
|
||||
|
||||
export default {
|
||||
name: 'SyncApiReportDetail',
|
||||
|
@ -187,13 +187,13 @@ export default {
|
|||
getType(type) {
|
||||
switch (type) {
|
||||
case 'LoopController':
|
||||
return '循环控制器';
|
||||
return this.$t('api_test.automation.loop_controller');
|
||||
case 'TransactionController':
|
||||
return '事物控制器';
|
||||
return this.$t('api_test.automation.transaction_controller');
|
||||
case 'ConstantTimer':
|
||||
return '等待控制器';
|
||||
return this.$t('api_test.automation.wait_controller');
|
||||
case 'IfController':
|
||||
return '条件控制器';
|
||||
return this.$t('api_test.automation.if_controller');
|
||||
}
|
||||
return type;
|
||||
},
|
||||
|
|
|
@ -53,7 +53,11 @@ public class TemporaryFileUtil {
|
|||
if (StringUtils.endsWithIgnoreCase(fileName, "." + fileSuffix)) {
|
||||
return fileName;
|
||||
} else {
|
||||
return StringUtils.join(fileName, ".", fileSuffix);
|
||||
if (StringUtils.isNotBlank(fileSuffix)) {
|
||||
return StringUtils.join(fileName, ".", fileSuffix);
|
||||
} else {
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue