fix(性能测试): 避免出现配置错位
This commit is contained in:
parent
02e1ceca62
commit
5bff7a4e5f
|
@ -742,6 +742,23 @@ public class JmeterDocumentParser implements DocumentParser {
|
||||||
</ThreadGroup>
|
</ThreadGroup>
|
||||||
*/
|
*/
|
||||||
removeChildren(threadGroup);
|
removeChildren(threadGroup);
|
||||||
|
// 避免出现配置错位
|
||||||
|
Object iterateNum = context.getProperty("iterateNum");
|
||||||
|
if (iterateNum instanceof List) {
|
||||||
|
((List<?>) iterateNum).remove(0);
|
||||||
|
}
|
||||||
|
Object iterateRampUpTimes = context.getProperty("iterateRampUpTime");
|
||||||
|
if (iterateRampUpTimes instanceof List) {
|
||||||
|
((List<?>) iterateRampUpTimes).remove(0);
|
||||||
|
}
|
||||||
|
Object steps = context.getProperty("Steps");
|
||||||
|
if (steps instanceof List) {
|
||||||
|
((List<?>) steps).remove(0);
|
||||||
|
}
|
||||||
|
Object holds = context.getProperty("Hold");
|
||||||
|
if (holds instanceof List) {
|
||||||
|
((List<?>) holds).remove(0);
|
||||||
|
}
|
||||||
Object targetLevels = context.getProperty("TargetLevel");
|
Object targetLevels = context.getProperty("TargetLevel");
|
||||||
String threads = "10";
|
String threads = "10";
|
||||||
if (targetLevels instanceof List) {
|
if (targetLevels instanceof List) {
|
||||||
|
@ -838,6 +855,19 @@ public class JmeterDocumentParser implements DocumentParser {
|
||||||
<stringProp name="Unit">S</stringProp>
|
<stringProp name="Unit">S</stringProp>
|
||||||
*/
|
*/
|
||||||
removeChildren(threadGroup);
|
removeChildren(threadGroup);
|
||||||
|
// 避免出现配置错位
|
||||||
|
Object iterateNum = context.getProperty("iterateNum");
|
||||||
|
if (iterateNum instanceof List) {
|
||||||
|
((List<?>) iterateNum).remove(0);
|
||||||
|
}
|
||||||
|
Object iterateRampUpTimes = context.getProperty("iterateRampUpTime");
|
||||||
|
if (iterateRampUpTimes instanceof List) {
|
||||||
|
((List<?>) iterateRampUpTimes).remove(0);
|
||||||
|
}
|
||||||
|
Object durations = context.getProperty("duration");
|
||||||
|
if (durations instanceof List) {
|
||||||
|
((List<?>) durations).remove(0);
|
||||||
|
}
|
||||||
// elementProp
|
// elementProp
|
||||||
Object targetLevels = context.getProperty("TargetLevel");
|
Object targetLevels = context.getProperty("TargetLevel");
|
||||||
String threads = "10";
|
String threads = "10";
|
||||||
|
@ -970,6 +1000,27 @@ public class JmeterDocumentParser implements DocumentParser {
|
||||||
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
||||||
*/
|
*/
|
||||||
// elementProp
|
// elementProp
|
||||||
|
// 避免出现配置错位
|
||||||
|
Object durations = context.getProperty("duration");
|
||||||
|
if (durations instanceof List) {
|
||||||
|
((List<?>) durations).remove(0);
|
||||||
|
}
|
||||||
|
Object units = context.getProperty("unit");
|
||||||
|
if (units instanceof List) {
|
||||||
|
((List<?>) units).remove(0);
|
||||||
|
}
|
||||||
|
Object holds = context.getProperty("Hold");
|
||||||
|
if (holds instanceof List) {
|
||||||
|
((List<?>) holds).remove(0);
|
||||||
|
}
|
||||||
|
Object steps = context.getProperty("Steps");
|
||||||
|
if (steps instanceof List) {
|
||||||
|
((List<?>) steps).remove(0);
|
||||||
|
}
|
||||||
|
Object arampUps = context.getProperty("RampUp");
|
||||||
|
if (arampUps instanceof List) {
|
||||||
|
((List<?>) arampUps).remove(0);
|
||||||
|
}
|
||||||
Object targetLevels = context.getProperty("TargetLevel");
|
Object targetLevels = context.getProperty("TargetLevel");
|
||||||
String threads = "10";
|
String threads = "10";
|
||||||
if (targetLevels instanceof List) {
|
if (targetLevels instanceof List) {
|
||||||
|
|
Loading…
Reference in New Issue