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