fix the bug in test :now the test can run when ip list is empty
This commit is contained in:
parent
8809feff0c
commit
4fad60f399
|
@ -108,12 +108,14 @@ public class TestPlanActionController extends BaseControllerService {
|
|||
System.out.println(FAIL);
|
||||
return "error.jsp";
|
||||
}
|
||||
logger.info(httpResponse.getContent());
|
||||
if (httpResponse.getCode() == HttpStatus.BAD_REQUEST_400) {
|
||||
this.getProcessHttpReponse().processBadRequest(httpResponse);
|
||||
// return "bad_request.jsp";
|
||||
return "error.jsp";
|
||||
}
|
||||
logger.info(httpResponse.getContent());
|
||||
|
||||
|
||||
TestPlanResultModel testPlanResultModel = (TestPlanResultModel) ObjectXmlExchange
|
||||
.fromXml(TestPlanResultModel.class,
|
||||
httpResponse.getContent());
|
||||
|
|
|
@ -490,6 +490,7 @@ public class TestPlanService extends BaseService {
|
|||
if (isValidateScriptModel(scriptModel))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ history=History
|
|||
creattestplanhead=Here you can run testplans and get the result!
|
||||
creattestplancontent1=1.Create new scripts or load scripts to organize a testplan.
|
||||
creattestplancontent2=2.Config the address of the systems under test.
|
||||
creattestplancontent3=3.Start run the testplan and view the result.
|
||||
startTest=Start Test
|
||||
scriptmanagementhead=Here you can manage the scripts!
|
||||
scriptmanagementcontent1=1.Create a new script and save it.
|
||||
scriptmanagementcontent2=2.Edit a script in the scripts pool.
|
||||
|
@ -99,7 +99,8 @@ latestTest=Latest Tests
|
|||
testName=Test Plan Name
|
||||
empty=Can not be empty!
|
||||
testPlanConfig=Load test execution plan
|
||||
warmup=Warm Up
|
||||
coolDown=Cool Down
|
||||
requiredLoad=Required Load
|
||||
executeRange=Execute Range
|
||||
allocation=Allocation
|
||||
total=Total
|
||||
sutIp=SUT IP
|
||||
addScript=Add Script
|
||||
addIp=Add IP
|
|
@ -98,4 +98,10 @@ uploadScript=\u4E0A\u4F20\u811A\u672C
|
|||
latestTest=\u6700\u8FD1\u6D4B\u8BD5
|
||||
testName=\u6D4B\u8BD5\u8BA1\u5212\u540D\u79F0
|
||||
empty=\u4E0D\u80FD\u4E3A\u7A7A
|
||||
testPlanConfig=\u914D\u7F6E\u6D4B\u8BD5\u8BA1\u5212
|
||||
testPlanConfig=\u914D\u7F6E\u6D4B\u8BD5\u8BA1\u5212
|
||||
allocation=\u6BD4\u4F8B
|
||||
total=\u603B\u5171
|
||||
sutIp=\u5F85\u6D4B\u7CFB\u7EDFIP
|
||||
addScript=\\u6DFB\u52A0\u811A\u672C
|
||||
addIp=\u6DFB\u52A0\IP
|
||||
startTest=\u5F00\u59CB\u6D4B\u8BD5
|
|
@ -23,6 +23,7 @@ $(document).ready(function(){
|
|||
|
||||
function toggleTestExecutionPlan(){
|
||||
$("#loadTestExecutionPlan").slideToggle();
|
||||
$('#loadConfigMessage').attr("class","hide");
|
||||
if(document.getElementById("icon-load").getAttribute("class")=="icon-plus")
|
||||
document.getElementById("icon-load").setAttribute("class", "icon-minus");
|
||||
else
|
||||
|
@ -30,6 +31,8 @@ function toggleTestExecutionPlan(){
|
|||
}
|
||||
function toggleUserScenarios(){
|
||||
$("#userScenarios").slideToggle();
|
||||
$('#alertMessage').attr("class","hide");
|
||||
$('#userConfigMessage').attr("class","hide");
|
||||
if(document.getElementById("icon-user").getAttribute("class")=="icon-plus")
|
||||
document.getElementById("icon-user").setAttribute("class", "icon-minus");
|
||||
else
|
||||
|
@ -37,7 +40,8 @@ function toggleUserScenarios(){
|
|||
}
|
||||
function toggleIpConfig(){
|
||||
$("#ipConfig").slideToggle();
|
||||
if(document.getElementById("icon-ip").getAttribute("class")=="icon-plus")
|
||||
$('#ipConfigMessage').attr("class","hide");
|
||||
if(document.getElementById("icon-ip").getAttribute("class").indexOf("icon-plus")>=0)
|
||||
document.getElementById("icon-ip").setAttribute("class", "icon-minus");
|
||||
else
|
||||
document.getElementById("icon-ip").setAttribute("class", "icon-plus");
|
||||
|
|
|
@ -125,14 +125,14 @@ body {
|
|||
<div class="title-frame">
|
||||
<a href="#"><i class="icon-minus" id="icon-user"
|
||||
onClick="toggleUserScenarios()"></i></a>
|
||||
<p class="title">User scenarios</p>
|
||||
<p class="title"><fmt:message key="script" /> </p>
|
||||
</div>
|
||||
<div id="userScenarios" class="content-frame">
|
||||
<table id="userConfig" class="table-margin-top">
|
||||
<tr>
|
||||
<th>Allocation %</th>
|
||||
<th>Script Name</th>
|
||||
<th>Operation</th>
|
||||
<th><fmt:message key="allocation" /> %</th>
|
||||
<th><fmt:message key="scriptname" /></th>
|
||||
<th><fmt:message key="actions" /></th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -153,7 +153,7 @@ body {
|
|||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Total:</th>
|
||||
<th><fmt:message key="total" />:</th>
|
||||
<th id="totalNumber" class="total-right">100%</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -161,33 +161,34 @@ body {
|
|||
needs to be 100%</div>
|
||||
<button type="submit" class="btn btn-primary add-button"
|
||||
id="userScenariosButton"
|
||||
onClick="addScenario();checkUserScenarios()">Add
|
||||
scenario</button>
|
||||
onClick="addScenario();checkUserScenarios()"><fmt:message key="addScript" />
|
||||
</button>
|
||||
<div id="userConfigMessage" class="hide">all input can not
|
||||
be empty and must be greater than zero!</div>
|
||||
</div>
|
||||
|
||||
<div class="title-frame">
|
||||
<a href="#"><i class="icon-minus float-left" id="icon-ip"
|
||||
<a href="#"><i class="icon-plus float-left" id="icon-ip"
|
||||
onClick="toggleIpConfig()"></i></a>
|
||||
<p class="title">IP config</p>
|
||||
<p class="title"><fmt:message key="sutIp" /></p>
|
||||
</div>
|
||||
<div id="ipConfig" class="content-frame">
|
||||
<div id="ipConfig" class="content-frame hide">
|
||||
<table id="ipConfigTable" class="table-margin-top">
|
||||
<tr>
|
||||
<!-- <tr>
|
||||
<th>IP:</th>
|
||||
<th><input type="text" class="ip-input" onblur="checkIP()" /></th>
|
||||
</tr>
|
||||
</tr> -->
|
||||
</table>
|
||||
<button type="submit" class="btn btn-primary add-button"
|
||||
onClick="addIP();checkIP()">Add IP</button>
|
||||
onClick="addIP();checkIP()"><fmt:message key="addIp" /></button>
|
||||
<div id="ipConfigMessage" class="hide">all IP address can
|
||||
not be empty and must be consistent with the format!</div>
|
||||
</div>
|
||||
<div class="span12 center">
|
||||
<button
|
||||
class="btn-large btn-primary"
|
||||
onClick="startTest()"><h4>Create test configuration and start Test</h4></button>
|
||||
|
||||
onClick="startTest()"><h4><fmt:message key="startTest" /></h4></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue