fix:修复一键运行报错
This commit is contained in:
parent
6e2069e011
commit
4d374fcc4f
|
@ -198,10 +198,6 @@ public class MailService {
|
||||||
users = emails.toArray(new String[emails.size()]);
|
users = emails.toArray(new String[emails.size()]);
|
||||||
if (type.equals("reviewer")) {
|
if (type.equals("reviewer")) {
|
||||||
helper.setText(html1, true);
|
helper.setText(html1, true);
|
||||||
} else if (type.equals("reviewer")) {
|
|
||||||
helper.setText(html2, true);
|
|
||||||
} else {
|
|
||||||
helper.setText(html3, true);
|
|
||||||
}
|
}
|
||||||
helper.setTo(users);
|
helper.setTo(users);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsDialogFooter from '../../common/components/MsDialogFooter'
|
import MsDialogFooter from '../../common/components/MsDialogFooter'
|
||||||
import {Test} from "./model/ScenarioModel"
|
import {Scenario, Test} from "./model/ScenarioModel"
|
||||||
import MsApiScenarioConfig from "./components/ApiScenarioConfig";
|
import MsApiScenarioConfig from "./components/ApiScenarioConfig";
|
||||||
import MsApiReportStatus from "../report/ApiReportStatus";
|
import MsApiReportStatus from "../report/ApiReportStatus";
|
||||||
import MsApiReportDialog from "./ApiReportDialog";
|
import MsApiReportDialog from "./ApiReportDialog";
|
||||||
|
|
|
@ -1116,8 +1116,11 @@ class JMXGenerator {
|
||||||
|
|
||||||
addScenarioVariables(threadGroup, scenario) {
|
addScenarioVariables(threadGroup, scenario) {
|
||||||
if (scenario.environment) {
|
if (scenario.environment) {
|
||||||
let commonConfig = scenario.environment.config.commonConfig;
|
let config = scenario.environment.config;
|
||||||
this.addEnvironments(commonConfig.variables, scenario.variables)
|
if (!(scenario.environment.config instanceof Object)) {
|
||||||
|
config = JSON.parse(scenario.environment.config);
|
||||||
|
}
|
||||||
|
this.addEnvironments(config.commonConfig.variables, scenario.variables)
|
||||||
}
|
}
|
||||||
let args = this.filterKV(scenario.variables);
|
let args = this.filterKV(scenario.variables);
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
|
@ -1165,8 +1168,11 @@ class JMXGenerator {
|
||||||
databaseConfigMap.set(config.id, config.name);
|
databaseConfigMap.set(config.id, config.name);
|
||||||
});
|
});
|
||||||
if (scenario.environment) {
|
if (scenario.environment) {
|
||||||
let envDatabaseConfigs = scenario.environment.config.databaseConfigs;
|
let config = scenario.environment.config;
|
||||||
envDatabaseConfigs.forEach(config => {
|
if (!(scenario.environment.config instanceof Object)) {
|
||||||
|
config = JSON.parse(scenario.environment.config);
|
||||||
|
}
|
||||||
|
config.databaseConfigs.forEach(config => {
|
||||||
if (!names.has(config.name)) {
|
if (!names.has(config.name)) {
|
||||||
let name = config.name + "JDBCDataSource";
|
let name = config.name + "JDBCDataSource";
|
||||||
threadGroup.put(new JDBCDataSource(name, config));
|
threadGroup.put(new JDBCDataSource(name, config));
|
||||||
|
@ -1179,8 +1185,11 @@ class JMXGenerator {
|
||||||
|
|
||||||
addScenarioHeaders(threadGroup, scenario) {
|
addScenarioHeaders(threadGroup, scenario) {
|
||||||
if (scenario.environment) {
|
if (scenario.environment) {
|
||||||
let httpConfig = scenario.environment.config.httpConfig;
|
let config = scenario.environment.config;
|
||||||
this.addEnvironments(httpConfig.headers, scenario.headers)
|
if (!(scenario.environment.config instanceof Object)) {
|
||||||
|
config = JSON.parse(scenario.environment.config);
|
||||||
|
}
|
||||||
|
this.addEnvironments(config.httpConfig.headers, scenario.headers)
|
||||||
}
|
}
|
||||||
let headers = this.filterKV(scenario.headers);
|
let headers = this.filterKV(scenario.headers);
|
||||||
if (headers.length > 0) {
|
if (headers.length > 0) {
|
||||||
|
|
Loading…
Reference in New Issue