This commit is contained in:
coderfengyun 2013-12-18 15:55:02 +08:00
parent 9f879e427b
commit 4750a06c52
4 changed files with 76 additions and 19 deletions

View File

@ -1,17 +0,0 @@
<html>
<head>
<title>Bench4Q Test Case</title>
<link href="style/bootstrap-cerulean.css" />
<link href="style/bootstrap-classic.css" />
<link href="style/bootstrap-cerulean.css" />
</head>
<body>
<img src="images/1.jpg" alt="No this one" />
<img src="images/2.jpg" alt="No this one" />
<img src="images/3.jpg" alt="No this one" />
<script src="script/agentTable.js" type="text/javascript"></script>
<script src="script/base.js" type="text/javascript"></script>
</body>
</html

View File

@ -247,7 +247,7 @@ public class Bench4qCodeGenerator extends AbstractCodeGenerator {
private void saveToFile(String htmlContent) {
// For Test
try {
File storeFile = new File("Script/baidu.html");
File storeFile = new File("RecordScriptTestCase/baidu.html");
FileUtils.writeStringToFile(storeFile, htmlContent);
} catch (IOException e) {
// TODO Auto-generated catch block
@ -281,7 +281,6 @@ public class Bench4qCodeGenerator extends AbstractCodeGenerator {
}
private void appendUserPluginsToScenario(List<UsePluginModel> usePlugins) {
this.getScriptAdapter().appendUsePluginsToScenario(usePlugins);
}

View File

@ -0,0 +1,25 @@
package ModelTest;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import org.bench4q.share.models.agent.scriptrecord.BatchBehavior;
@XmlRootElement(name = "page")
public class Page {
private List<BatchBehavior> batches;
@XmlElementWrapper(name = "batches")
@XmlElement(name = "batch")
public List<BatchBehavior> getBatches() {
return batches;
}
public void setBatches(List<BatchBehavior> batches) {
this.batches = batches;
}
}

View File

@ -0,0 +1,50 @@
package ModelTest;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import org.bench4q.share.models.agent.scriptrecord.UsePluginModel;
@XmlRootElement(name = "runScenario")
public class RunScenarioModelTest {
private int poolSize;
private List<UsePluginModel> usePlugins;
private List<Page> pages;
@XmlElement
public int getPoolSize() {
return poolSize;
}
public void setPoolSize(int poolSize) {
this.poolSize = poolSize;
}
@XmlElementWrapper(name = "usePlugins")
@XmlElement(name = "usePlugin")
public List<UsePluginModel> getUsePlugins() {
return usePlugins;
}
public void setUsePlugins(List<UsePluginModel> usePlugins) {
this.usePlugins = usePlugins;
}
@XmlElementWrapper(name = "pages")
@XmlElement(name = "page")
public List<Page> getPages() {
return pages;
}
public void setPages(List<Page> pages) {
this.pages = pages;
}
public RunScenarioModelTest() {
this.setUsePlugins(new ArrayList<UsePluginModel>());
}
}