add new test, and remove the bug
This commit is contained in:
parent
95d89204cd
commit
e7297ac945
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<agentBriefStatusModel>
|
||||
<failCountFromBegin>0</failCountFromBegin>
|
||||
<failCountThisTime>0</failCountThisTime>
|
||||
<failThroughputThisTime>0</failThroughputThisTime>
|
||||
<maxResponseTime>1203</maxResponseTime>
|
||||
<minResponseTime>0</minResponseTime>
|
||||
<successCountFromBegin>28205</successCountFromBegin>
|
||||
<successCountThisTime>1774</successCountThisTime>
|
||||
<successThroughputThisTime>559</successThroughputThisTime>
|
||||
<timeFrame>3172</timeFrame>
|
||||
<totalResponseTimeThisTime>22154</totalResponseTimeThisTime>
|
||||
<totalSqureResponseTimeThisTime>5245392
|
||||
</totalSqureResponseTimeThisTime>
|
||||
<vUserCount>40</vUserCount>
|
||||
</agentBriefStatusModel>
|
|
@ -194,19 +194,29 @@ public class RunningScript {
|
|||
}
|
||||
|
||||
private DataStatistics getScriptBriefStatistics() {
|
||||
return new ScriptBriefStatistics();
|
||||
return getSpecificDataStatistics(ScriptBriefStatistics.class);
|
||||
}
|
||||
|
||||
private DataStatistics getPageBriefStatistics() {
|
||||
return new PageBriefStatistics();
|
||||
return getSpecificDataStatistics(PageBriefStatistics.class);
|
||||
}
|
||||
|
||||
private DataStatistics getBehaviorsBriefStatistics() {
|
||||
return new BehaviorsBriefStatistics();
|
||||
return getSpecificDataStatistics(BehaviorsBriefStatistics.class);
|
||||
}
|
||||
|
||||
private DataStatistics getSpecificDataStatistics(
|
||||
Class<? extends DataStatistics> dataStatisticsClass) {
|
||||
for (DataStatistics dataStatistics : this.getDataStatisticsList()) {
|
||||
if (dataStatistics.getClass().equals(dataStatisticsClass)) {
|
||||
return dataStatistics;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ScriptBriefResultModel getScriptBrief() {
|
||||
for (RunningAgent runningAgent : getRunningAgents()) {
|
||||
for (RunningAgent runningAgent : this.getRunningAgents()) {
|
||||
if (runningAgent.isBreakDown()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.bench4q.share.models.agent.statistics.DataStatisticsModel;
|
|||
public abstract class AbstractDataStatistics implements DataStatistics {
|
||||
private TestPlanScriptResultService testPlanScriptResultService;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private TestPlanScriptResultService getTestPlanScriptResultService() {
|
||||
return testPlanScriptResultService;
|
||||
}
|
||||
|
|
|
@ -124,4 +124,8 @@ public class ScriptBriefStatisticsTest {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddOneRealModel() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue