diff --git a/Upload/ready b/Upload/ready deleted file mode 100644 index aeb6083b..00000000 --- a/Upload/ready +++ /dev/null @@ -1,2076 +0,0 @@ - - - - - - - - - 0 - Get - - - url - http://133.133.12.2:8080/bench4q-web/homepage.jsp - - - - queryParams - - - - headers - header=Accept|value= - text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|; - - - - USERBEHAVIOR - http - - - -1 - 0 - -1 - - - - - 0 - Sleep - - - time - 15 - - - TIMERBEHAVIOR - timer - - - -1 - 1 - -1 - - - - - 1 - Get - - - url - http://133.133.12.2:8080/bench4q-web/index.jsp - - - queryParams - - - - headers - header=Accept|value= - text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|; - - - - USERBEHAVIOR - http - - - 4 - 2 - -1 - - - - - 0 - Sleep - - - time - 133 - - - TIMERBEHAVIOR - timer - - - -1 - 3 - -1 - - - - - 2 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/bootstrap-cerulean.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - 3 - Get - - - url - http://133.133.12.2:8080/bench4q-web/script/login.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - 4 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/jquery-1.7.2.min.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - 5 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/jquery.i18n.properties-1.0.9.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - 6 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/charisma-app.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 4 - 2 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 5 - -1 - - - - - 0 - Sleep - - - time - 72 - - - TIMERBEHAVIOR - timer - - - -1 - 6 - -1 - - - - - 0 - Sleep - - - time - 24 - - - TIMERBEHAVIOR - timer - - - -1 - 7 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 8 - -1 - - - - - 0 - Sleep - - - time - 211 - - - TIMERBEHAVIOR - timer - - - -1 - 9 - -1 - - - - - 7 - Get - - - url - http://fonts.googleapis.com/css - - - queryParams - family=Karla|Ubuntu - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 10 - -1 - - - - - 0 - Sleep - - - time - 3 - - - TIMERBEHAVIOR - timer - - - -1 - 11 - -1 - - - - - 8 - Get - - - url - http://fonts.googleapis.com/css - - - queryParams - family=Shojumaru - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 12 - -1 - - - - - 0 - Sleep - - - time - 82 - - - TIMERBEHAVIOR - timer - - - -1 - 13 - -1 - - - - - 9 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/glyphicons-halflings.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 14 - -1 - - - - - 0 - Sleep - - - time - 2 - - - TIMERBEHAVIOR - timer - - - -1 - 15 - -1 - - - - - 10 - Get - - - url - http://133.133.12.2:8080/bench4q-web/i18n/i18n.properties - - - - queryParams - _=1389777175541 - - - headers - header=Content-Type|value=text/plain;charset=UTF-8|;header=Accept|value= - text/plain, */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 16 - -1 - - - - - 0 - Sleep - - - time - 10 - - - TIMERBEHAVIOR - timer - - - -1 - 17 - -1 - - - - - 11 - Get - - - url - http://133.133.12.2:8080/bench4q-web/i18n/i18n_zh.properties - - - - queryParams - _=1389777175572 - - - headers - header=Content-Type|value=text/plain;charset=UTF-8|;header=Accept|value= - text/plain, */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 18 - -1 - - - - - 0 - Sleep - - - time - 8 - - - TIMERBEHAVIOR - timer - - - -1 - 19 - -1 - - - - - 12 - Get - - - url - http://133.133.12.2:8080/bench4q-web/i18n/i18n_zh-CN.properties - - - - queryParams - _=1389777175587 - - - headers - header=Content-Type|value=text/plain;charset=UTF-8|;header=Accept|value= - text/plain, */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 20 - -1 - - - - - 0 - Sleep - - - time - 52 - - - TIMERBEHAVIOR - timer - - - -1 - 21 - -1 - - - - - 13 - Get - - - url - http://themes.googleusercontent.com/static/fonts/karla/v3/azR40LUJrT4HaWK28zHmVA.woff - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 22 - -1 - - - - - 0 - Sleep - - - time - 16442 - - - TIMERBEHAVIOR - timer - - - -1 - 23 - -1 - - - - - 14 - Get - - - url - http://themes.googleusercontent.com/static/fonts/ubuntu/v5/_xyN3apAT_yRRDeqB3sPRg.woff - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 24 - -1 - - - - - - - - - 0 - Sleep - - - time - 9 - - - TIMERBEHAVIOR - timer - - - 3 - 25 - -1 - - - - - 15 - Get - - - url - http://133.133.12.2:8080/bench4q-web/homepage.jsp - - - - queryParams - - - - headers - header=Accept|value= - text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 26 - -1 - - - - - 0 - Sleep - - - time - 25 - - - TIMERBEHAVIOR - timer - - - -1 - 27 - -1 - - - - - 16 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/bootstrap-responsive.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 17 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/noty_theme_default.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 18 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/jquery-1.8.2.min.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 19 - Get - - - url - http://133.133.12.2:8080/bench4q-web/bench4q-css/bench4q.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 20 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/jquery-ui-1.8.21.custom.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 21 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/opa-icons.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 22 - Get - - - url - http://133.133.12.2:8080/bench4q-web/css/colorbox.css - - - - queryParams - - - - headers - header=Accept|value= - text/css,*/*;q=0.1|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 23 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/jquery.cookie.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 24 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/jquery.dataTables.min.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 25 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/theme.js - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 26 - Get - - - url - http://133.133.12.2:8080/bench4q-web/script/base.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 27 - Get - - - url - http://133.133.12.2:8080/bench4q-web/script/bench4q.table.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 28 - Get - - - url - http://133.133.12.2:8080/bench4q-web/script/loadTestPlans.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 29 - Get - - - url - http://133.133.12.2:8080/bench4q-web/script/scriptTable.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 30 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/jquery-ui-1.8.21.custom.min.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 31 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/bench4q.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 32 - Get - - - url - http://133.133.12.2:8080/bench4q-web/js/bootstrap-dropdown.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - 36 - Get - - - url - http://133.133.12.2:8080/bench4q-web/script/home.js - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 28 - 0 - - - - - 0 - Sleep - - - time - 10 - - - TIMERBEHAVIOR - timer - - - -1 - 29 - -1 - - - - - 0 - Sleep - - - time - 25 - - - TIMERBEHAVIOR - timer - - - -1 - 30 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 31 - -1 - - - - - 0 - Sleep - - - time - 4 - - - TIMERBEHAVIOR - timer - - - -1 - 32 - -1 - - - - - 0 - Sleep - - - time - 4 - - - TIMERBEHAVIOR - timer - - - -1 - 33 - -1 - - - - - 0 - Sleep - - - time - 0 - - - TIMERBEHAVIOR - timer - - - -1 - 34 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 35 - -1 - - - - - 0 - Sleep - - - time - 6 - - - TIMERBEHAVIOR - timer - - - -1 - 36 - -1 - - - - - 0 - Sleep - - - time - 27 - - - TIMERBEHAVIOR - timer - - - -1 - 37 - -1 - - - - - 0 - Sleep - - - time - 9 - - - TIMERBEHAVIOR - timer - - - -1 - 38 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 39 - -1 - - - - - 0 - Sleep - - - time - 0 - - - TIMERBEHAVIOR - timer - - - -1 - 40 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 41 - -1 - - - - - 0 - Sleep - - - time - 36 - - - TIMERBEHAVIOR - timer - - - -1 - 42 - -1 - - - - - 0 - Sleep - - - time - 5 - - - TIMERBEHAVIOR - timer - - - -1 - 43 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 44 - -1 - - - - - 0 - Sleep - - - time - 75 - - - TIMERBEHAVIOR - timer - - - -1 - 45 - -1 - - - - - 33 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/opa-icons-blue32.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 46 - -1 - - - - - 0 - Sleep - - - time - 30 - - - TIMERBEHAVIOR - timer - - - -1 - 47 - -1 - - - - - 34 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/opa-icons-color32.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 48 - -1 - - - - - 0 - Sleep - - - time - 27 - - - TIMERBEHAVIOR - timer - - - -1 - 49 - -1 - - - - - 35 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/opa-icons-red32.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 50 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 51 - -1 - - - - - 0 - Sleep - - - time - 24 - - - TIMERBEHAVIOR - timer - - - -1 - 52 - -1 - - - - - 37 - Get - - - url - http://themes.googleusercontent.com/static/fonts/shojumaru/v2/pYVcIM206l3F7GUKEvtB3T8E0i7KZn-EPnyo3HZu7kw.woff - - - - queryParams - - - - headers - header=Accept|value= - */*|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/index.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 53 - -1 - - - - - 0 - Sleep - - - time - 145 - - - TIMERBEHAVIOR - timer - - - -1 - 54 - -1 - - - - - 38 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/opa-icons-green32.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 55 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 56 - -1 - - - - - 39 - Get - - - url - http://133.133.12.2:8080/bench4q-web/i18n/i18n.properties - - - - queryParams - _=1389777196041 - - - headers - header=Content-Type|value=text/plain;charset=UTF-8|;header=Accept|value= - text/plain, */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 57 - -1 - - - - - 0 - Sleep - - - time - 8 - - - TIMERBEHAVIOR - timer - - - -1 - 58 - -1 - - - - - 40 - Get - - - url - http://133.133.12.2:8080/bench4q-web/i18n/i18n_zh.properties - - - - queryParams - _=1389777196134 - - - headers - header=Content-Type|value=text/plain;charset=UTF-8|;header=Accept|value= - text/plain, */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 59 - -1 - - - - - 0 - Sleep - - - time - 7 - - - TIMERBEHAVIOR - timer - - - -1 - 60 - -1 - - - - - 41 - Get - - - url - http://133.133.12.2:8080/bench4q-web/i18n/i18n_zh-CN.properties - - - - queryParams - _=1389777196150 - - - headers - header=Content-Type|value=text/plain;charset=UTF-8|;header=Accept|value= - text/plain, */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 61 - -1 - - - - - 0 - Sleep - - - time - 163 - - - TIMERBEHAVIOR - timer - - - -1 - 62 - -1 - - - - - 42 - Post - - - url - http://133.133.12.2:8080/bench4q-web/loadTestPlans - - - - queryParams - - - - headers - header=Accept|value= application/json, text/javascript, - */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - bodyparameters - - - - USERBEHAVIOR - http - - - -1 - 63 - -1 - - - - - 0 - Sleep - - - time - 1 - - - TIMERBEHAVIOR - timer - - - -1 - 64 - -1 - - - - - 43 - Post - - - url - http://133.133.12.2:8080/bench4q-web/loadScript - - - queryParams - - - - headers - header=Accept|value= application/json, text/javascript, - */*; - q=0.01|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - bodyparameters - - - - USERBEHAVIOR - http - - - -1 - 65 - -1 - - - - - 0 - Sleep - - - time - 27 - - - TIMERBEHAVIOR - timer - - - -1 - 66 - -1 - - - - - 44 - Get - - - url - http://133.133.12.2:8080/bench4q-web/img/glyphicons-halflings-white.png - - - - queryParams - - - - headers - header=Accept|value= - image/webp,*/*;q=0.8|;header=Referer|value=http://133.133.12.2:8080/bench4q-web/homepage.jsp|; - - - - USERBEHAVIOR - http - - - -1 - 67 - -1 - - - - - 0 - - - http - Http - - - - timer - ConstantTimer - - - - \ No newline at end of file diff --git a/Upload/test b/Upload/test deleted file mode 100644 index 3b1ab089..00000000 --- a/Upload/test +++ /dev/null @@ -1,11 +0,0 @@ --- Adminer 3.7.1 MySQL dump - -SET NAMES utf8; -SET foreign_key_checks = 0; -SET time_zone = '+08:00'; -SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; - -CREATE DATABASE `bench4q-master-yvAxaJI0` /*!40100 DEFAULT CHARACTER SET utf8 */; -USE `bench4q-master-yvAxaJI0`; - --- 2014-01-20 15:37:24 diff --git a/src/main/java/org/bench4q/agent/api/TestController.java b/src/main/java/org/bench4q/agent/api/TestController.java index 6850905d..701c4df4 100644 --- a/src/main/java/org/bench4q/agent/api/TestController.java +++ b/src/main/java/org/bench4q/agent/api/TestController.java @@ -45,6 +45,8 @@ import org.springframework.web.multipart.MultipartFile; @Controller @RequestMapping("/test") public class TestController { + private static final String FILE_SEPARATOR = System + .getProperty("file.separator"); private ScenarioEngine scenarioEngine; private Logger logger = Logger.getLogger(TestController.class); @@ -61,16 +63,18 @@ public class TestController { this.scenarioEngine = scenarioEngine; } - @RequestMapping(value = "/prepare/{fileName}", method = RequestMethod.POST) + @RequestMapping(value = "/submit", method = RequestMethod.POST) @ResponseBody - public String prepare(@RequestParam("file") MultipartFile file, - @PathVariable String fileName) { + public String submitParams( + @RequestParam("files[]") List files) { RunScenarioResultModel result = new RunScenarioResultModel(); try { - File receiveFile = new File("Upload" - + System.getProperty("file.separator") + fileName); - file.transferTo(receiveFile); - result.setRunId(UUID.randomUUID()); + UUID runId = UUID.randomUUID(); + for (MultipartFile file : files) { + file.transferTo(new File(guardDirExists(runId) + + file.getOriginalFilename())); + } + result.setRunId(runId); return MarshalHelper.tryMarshal(result); } catch (IOException e) { logger.error("/prepare/fileName", e); @@ -78,6 +82,16 @@ public class TestController { } } + private String guardDirExists(UUID runId) { + String dirPath = "ScenarioParameters" + FILE_SEPARATOR + + runId.toString() + FILE_SEPARATOR; + File dirFile = new File(dirPath); + if (!dirFile.exists()) { + dirFile.mkdirs(); + } + return dirPath; + } + @RequestMapping(value = "/run", method = RequestMethod.POST) @ResponseBody public RunScenarioResultModel run( diff --git a/src/main/resources/org/bench4q/agent/config/application-context.xml b/src/main/resources/org/bench4q/agent/config/application-context.xml index fb1938d9..48c14bb0 100644 --- a/src/main/resources/org/bench4q/agent/config/application-context.xml +++ b/src/main/resources/org/bench4q/agent/config/application-context.xml @@ -12,6 +12,7 @@ + diff --git a/src/test/java/org/bench4q/agent/test/TestWithScriptFile.java b/src/test/java/org/bench4q/agent/test/TestWithScriptFile.java index c61cb343..115e4f9e 100644 --- a/src/test/java/org/bench4q/agent/test/TestWithScriptFile.java +++ b/src/test/java/org/bench4q/agent/test/TestWithScriptFile.java @@ -4,6 +4,8 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; import static org.junit.Assert.*; @@ -176,11 +178,14 @@ public class TestWithScriptFile { } @Test - public void testPrepare() throws IOException { - HttpResponse httpResponse = this.getHttpRequester().postMultiFile( - url + "/prepare/" + "ready.txt", - "Scripts" + System.getProperty("file.separator") - + "forGoodRecord.xml"); + public void testSubmitParams() throws IOException { + List files = new ArrayList(); + files.add(new File("Scripts" + System.getProperty("file.separator") + + "forGoodRecord.xml")); + files.add(new File("Scripts" + System.getProperty("file.separator") + + "testJD.xml")); + HttpResponse httpResponse = this.getHttpRequester().postFiles( + url + "/submit", "files[]", files); assertNotNull(httpResponse); assertNotNull(httpResponse.getContent()); assertEquals(200, httpResponse.getCode());