Commit 60b8852fbf90e0311cf42f1a44c6c655fd86bd3c
1 parent
09fdf50f
test
Showing
23 changed files
with
411 additions
and
198 deletions
Show diff stats
pom.xml
@@ -96,6 +96,17 @@ | @@ -96,6 +96,17 @@ | ||
96 | <artifactId>commons-io</artifactId> | 96 | <artifactId>commons-io</artifactId> |
97 | <version>1.3.2</version> | 97 | <version>1.3.2</version> |
98 | </dependency> | 98 | </dependency> |
99 | + | ||
100 | + <dependency> | ||
101 | + <groupId>mysql</groupId> | ||
102 | + <artifactId>mysql-connector-java</artifactId> | ||
103 | + <version>6.0.6</version> | ||
104 | + </dependency> | ||
105 | + <dependency> | ||
106 | + <groupId>org.dbunit</groupId> | ||
107 | + <artifactId>dbunit</artifactId> | ||
108 | + <version>2.5.4</version> | ||
109 | + </dependency> | ||
99 | </dependencies> | 110 | </dependencies> |
100 | 111 | ||
101 | <build> | 112 | <build> |
@@ -107,7 +118,7 @@ | @@ -107,7 +118,7 @@ | ||
107 | <configuration> | 118 | <configuration> |
108 | <!--<testFailureIgnore>true</testFailureIgnore>--> | 119 | <!--<testFailureIgnore>true</testFailureIgnore>--> |
109 | <suiteXmlFiles> | 120 | <suiteXmlFiles> |
110 | - <suiteXmlFile>suites/testng.xml</suiteXmlFile> | 121 | + <suiteXmlFile>resources/suites/testng.xml</suiteXmlFile> |
111 | <!--此处testng.xml即为要运行的testng.xml文件--> | 122 | <!--此处testng.xml即为要运行的testng.xml文件--> |
112 | </suiteXmlFiles> | 123 | </suiteXmlFiles> |
113 | </configuration> | 124 | </configuration> |
src/main/resources/chromedriver.exe renamed to resources/chromedriver.exe
No preview for this file type
src/main/resources/TestConfig/config.properties renamed to resources/config.properties
suites/addOriginalGoods.xml renamed to resources/suites/addOriginalGoods.xml
src/test/java/com/essa/framework/BasePage.java
@@ -7,6 +7,8 @@ import java.awt.event.KeyEvent; | @@ -7,6 +7,8 @@ import java.awt.event.KeyEvent; | ||
7 | import java.io.File; | 7 | import java.io.File; |
8 | import java.io.FileInputStream; | 8 | import java.io.FileInputStream; |
9 | import java.io.IOException; | 9 | import java.io.IOException; |
10 | +import java.sql.Connection; | ||
11 | +import java.sql.ResultSet; | ||
10 | import java.text.SimpleDateFormat; | 12 | import java.text.SimpleDateFormat; |
11 | import java.util.ArrayList; | 13 | import java.util.ArrayList; |
12 | import java.util.Date; | 14 | import java.util.Date; |
@@ -38,6 +40,7 @@ import org.openqa.selenium.support.ui.WebDriverWait; | @@ -38,6 +40,7 @@ import org.openqa.selenium.support.ui.WebDriverWait; | ||
38 | import com.essa.framework.BasePage; | 40 | import com.essa.framework.BasePage; |
39 | import com.essa.framework.LogType; | 41 | import com.essa.framework.LogType; |
40 | import com.essa.framework.Logger; | 42 | import com.essa.framework.Logger; |
43 | +import com.mysql.cj.jdbc.PreparedStatement; | ||
41 | 44 | ||
42 | public class BasePage { | 45 | public class BasePage { |
43 | 46 | ||
@@ -229,21 +232,21 @@ public class BasePage { | @@ -229,21 +232,21 @@ public class BasePage { | ||
229 | } | 232 | } |
230 | 233 | ||
231 | /** | 234 | /** |
232 | - * 元素在页面上是否可见 | 235 | + * 元素在页面上是否可见,不建议用此方法,有时会报错,找不出原因 |
233 | * @param element | 236 | * @param element |
234 | * @return boolean | 237 | * @return boolean |
235 | */ | 238 | */ |
236 | protected boolean isVisibility(WebElement element) { | 239 | protected boolean isVisibility(WebElement element) { |
237 | try { | 240 | try { |
238 | if(ExpectedConditions.visibilityOf(element) != null) { | 241 | if(ExpectedConditions.visibilityOf(element) != null) { |
239 | - Logger.Output(LogType.LogTypeName.INFO, "元素在页面上可见:" +partialStr(element.toString(), "xpath:")); | 242 | + Logger.Output(LogType.LogTypeName.INFO, "元素在页面上可见"); |
240 | return true; | 243 | return true; |
241 | } | 244 | } |
242 | } catch (NoSuchElementException e) { | 245 | } catch (NoSuchElementException e) { |
243 | - Logger.Output(LogType.LogTypeName.ERROR, "无法页面上是否有此元素:"+partialStr(element.toString(), "xpath:")+ e.getMessage()); | 246 | + Logger.Output(LogType.LogTypeName.ERROR, "无法页面上是否有此元素"); |
244 | return false; | 247 | return false; |
245 | } | 248 | } |
246 | - Logger.Output(LogType.LogTypeName.INFO, "元素在页面不可见:" +partialStr(element.toString(), "xpath:")); | 249 | + Logger.Output(LogType.LogTypeName.INFO, "元素在页面不可见"); |
247 | return false; | 250 | return false; |
248 | } | 251 | } |
249 | 252 | ||
@@ -270,16 +273,17 @@ public class BasePage { | @@ -270,16 +273,17 @@ public class BasePage { | ||
270 | * 获取元素的文本值 | 273 | * 获取元素的文本值 |
271 | * @param element | 274 | * @param element |
272 | */ | 275 | */ |
273 | - protected void getText(WebElement element) { | 276 | + protected String getText(WebElement element) { |
274 | 277 | ||
275 | try { | 278 | try { |
276 | if (element.isEnabled()) { | 279 | if (element.isEnabled()) { |
277 | - element.getText(); | ||
278 | Logger.Output(LogType.LogTypeName.INFO, "获取当前元素的文本值:" + element.getText()); | 280 | Logger.Output(LogType.LogTypeName.INFO, "获取当前元素的文本值:" + element.getText()); |
281 | + return element.getText(); | ||
279 | } | 282 | } |
280 | } catch (Exception e) { | 283 | } catch (Exception e) { |
281 | Logger.Output(LogType.LogTypeName.ERROR, e.getMessage() + "."); | 284 | Logger.Output(LogType.LogTypeName.ERROR, e.getMessage() + "."); |
282 | } | 285 | } |
286 | + return null; | ||
283 | } | 287 | } |
284 | 288 | ||
285 | /** | 289 | /** |
@@ -291,7 +295,7 @@ public class BasePage { | @@ -291,7 +295,7 @@ public class BasePage { | ||
291 | mywait(element); | 295 | mywait(element); |
292 | JavascriptExecutor jsExecutor = (JavascriptExecutor) driver; | 296 | JavascriptExecutor jsExecutor = (JavascriptExecutor) driver; |
293 | jsExecutor.executeScript("arguments[0].click();", element); | 297 | jsExecutor.executeScript("arguments[0].click();", element); |
294 | - Logger.Output(LogType.LogTypeName.INFO, "调用JavaScript点击元素:" + element.getText()); | 298 | + Logger.Output(LogType.LogTypeName.INFO, "调用JavaScript点击元素:" + partialStr(element.toString(), "xpath:")); |
295 | } catch (Exception e) { | 299 | } catch (Exception e) { |
296 | Logger.Output(LogType.LogTypeName.ERROR, e.getMessage() + "."); | 300 | Logger.Output(LogType.LogTypeName.ERROR, e.getMessage() + "."); |
297 | } | 301 | } |
@@ -625,6 +629,35 @@ public class BasePage { | @@ -625,6 +629,35 @@ public class BasePage { | ||
625 | Logger.Output(LogType.LogTypeName.ERROR, "强行等待失败"); | 629 | Logger.Output(LogType.LogTypeName.ERROR, "强行等待失败"); |
626 | } | 630 | } |
627 | } | 631 | } |
632 | + /** | ||
633 | + * 动态等待,如果元素不存在,等待一秒直到元素出现 | ||
634 | + * @param by | ||
635 | + */ | ||
636 | + protected void dynamicWait(By by) { | ||
637 | + while (!(isVisibility(by))) { | ||
638 | + forceWait(1000); | ||
639 | + } | ||
640 | + } | ||
641 | + /** | ||
642 | + * 连接数据库查询数据 | ||
643 | + * @param sql 查询sql | ||
644 | + * @param field 需要的字段,这个方法只支持一个字段查询 | ||
645 | + * @return 返回字段值 | ||
646 | + */ | ||
647 | + protected String DBSqlSearch(String sql,String field) { | ||
648 | + try { | ||
649 | + Connection conn = DButil.getCon(); | ||
650 | + PreparedStatement pstmt = (PreparedStatement) conn.prepareStatement(sql); | ||
651 | + ResultSet rs = pstmt.executeQuery(); | ||
652 | + while (rs.next()) { | ||
653 | + return rs.getString(field); | ||
654 | + } | ||
655 | + DButil.close(rs, pstmt, conn); | ||
656 | + } catch (Exception e) { | ||
657 | + e.printStackTrace(); | ||
658 | + } | ||
659 | + return null; | ||
660 | + } | ||
628 | 661 | ||
629 | /** | 662 | /** |
630 | * 获取当前系统时间,得到格式化时间字符串 | 663 | * 获取当前系统时间,得到格式化时间字符串 |
src/test/java/com/essa/framework/BrowserEngine.java
@@ -9,7 +9,6 @@ import java.util.concurrent.TimeUnit; | @@ -9,7 +9,6 @@ import java.util.concurrent.TimeUnit; | ||
9 | import org.openqa.selenium.WebDriver; | 9 | import org.openqa.selenium.WebDriver; |
10 | import org.openqa.selenium.chrome.ChromeDriver; | 10 | import org.openqa.selenium.chrome.ChromeDriver; |
11 | import org.openqa.selenium.firefox.FirefoxDriver; | 11 | import org.openqa.selenium.firefox.FirefoxDriver; |
12 | -import org.openqa.selenium.firefox.FirefoxProfile; | ||
13 | import org.openqa.selenium.ie.InternetExplorerDriver; | 12 | import org.openqa.selenium.ie.InternetExplorerDriver; |
14 | import org.openqa.selenium.remote.CapabilityType; | 13 | import org.openqa.selenium.remote.CapabilityType; |
15 | import org.openqa.selenium.remote.DesiredCapabilities; | 14 | import org.openqa.selenium.remote.DesiredCapabilities; |
@@ -20,33 +19,31 @@ public class BrowserEngine { | @@ -20,33 +19,31 @@ public class BrowserEngine { | ||
20 | private String serverURL; | 19 | private String serverURL; |
21 | private String buyerURL; | 20 | private String buyerURL; |
22 | private static WebDriver driver; | 21 | private static WebDriver driver; |
23 | - private static String env; | 22 | + private static String env1; |
24 | 23 | ||
25 | public void initConfigData() throws IOException{ | 24 | public void initConfigData() throws IOException{ |
26 | - | ||
27 | Properties p = new Properties(); | 25 | Properties p = new Properties(); |
28 | // 加载配置文件 | 26 | // 加载配置文件 |
29 | -// InputStream ips = new FileInputStream(".\\src\\main\\resources\\TestConfig\\config.properties"); | ||
30 | - InputStream ips = new FileInputStream(".\\config.properties"); | 27 | + InputStream ips = new FileInputStream(".\\resources\\config.properties"); |
31 | p.load(ips); | 28 | p.load(ips); |
32 | - | ||
33 | Logger.Output(LogType.LogTypeName.INFO, "开始从配置文件中选择浏览器"); | 29 | Logger.Output(LogType.LogTypeName.INFO, "开始从配置文件中选择浏览器"); |
34 | -// browserName=p.getProperty("browserName");//使用jframe要注释 | 30 | + browserName=p.getProperty("browserName");//使用jframe要注释 |
35 | Logger.Output(LogType.LogTypeName.INFO, "所选择的浏览器类型为: "+ browserName); | 31 | Logger.Output(LogType.LogTypeName.INFO, "所选择的浏览器类型为: "+ browserName); |
36 | - if (env=="DIT") { | 32 | + if (env1=="DIT") { |
37 | serverURL = p.getProperty("DIT"); | 33 | serverURL = p.getProperty("DIT"); |
38 | buyerURL = p.getProperty("BDIT"); | 34 | buyerURL = p.getProperty("BDIT"); |
39 | - }else if (env =="HOTFIX") { | 35 | + }else if (env1 =="HOTFIX") { |
40 | serverURL = p.getProperty("HOTFIX"); | 36 | serverURL = p.getProperty("HOTFIX"); |
41 | buyerURL = p.getProperty("BHOTFIX"); | 37 | buyerURL = p.getProperty("BHOTFIX"); |
42 | - }else if (env == "UAT") { | 38 | + }else if (env1 == "UAT") { |
43 | serverURL = p.getProperty("UAT"); | 39 | serverURL = p.getProperty("UAT"); |
44 | buyerURL = p.getProperty("BUAT"); | 40 | buyerURL = p.getProperty("BUAT"); |
45 | }else { | 41 | }else { |
46 | serverURL = p.getProperty("SIT"); | 42 | serverURL = p.getProperty("SIT"); |
47 | buyerURL = p.getProperty("BSIT"); | 43 | buyerURL = p.getProperty("BSIT"); |
48 | } | 44 | } |
49 | - Logger.Output(LogType.LogTypeName.INFO, "所测试的环境为:"+ env); | 45 | + Logger.Output(LogType.LogTypeName.INFO, "所测试的环境为:"+ env1); |
46 | + Model.setEnv(env1);//我也不知道为什么执行完上面的代码后,env会变为sit | ||
50 | ips.close(); | 47 | ips.close(); |
51 | } | 48 | } |
52 | /** | 49 | /** |
@@ -56,7 +53,7 @@ public class BrowserEngine { | @@ -56,7 +53,7 @@ public class BrowserEngine { | ||
56 | */ | 53 | */ |
57 | public static void setInit(String environment,String browser) { | 54 | public static void setInit(String environment,String browser) { |
58 | browserName = browser; | 55 | browserName = browser; |
59 | - env = environment; | 56 | + env1 = environment; |
60 | } | 57 | } |
61 | 58 | ||
62 | /** | 59 | /** |
@@ -66,20 +63,15 @@ public class BrowserEngine { | @@ -66,20 +63,15 @@ public class BrowserEngine { | ||
66 | public WebDriver getBrowser(){ | 63 | public WebDriver getBrowser(){ |
67 | 64 | ||
68 | if(browserName.equalsIgnoreCase("Firefox")){ | 65 | if(browserName.equalsIgnoreCase("Firefox")){ |
69 | - | ||
70 | - System.setProperty("webdriver.gecko.driver", ".\\src\\main\\resources\\geckodriver.exe"); | ||
71 | - driver = createFireFoxDriver(); | 66 | + System.setProperty("webdriver.gecko.driver", ".\\resources\\geckodriver.exe"); |
67 | + driver = new FirefoxDriver(); | ||
72 | Logger.Output(LogType.LogTypeName.INFO, "正在启动FireFox浏览器"); | 68 | Logger.Output(LogType.LogTypeName.INFO, "正在启动FireFox浏览器"); |
73 | - | ||
74 | } | 69 | } |
75 | else if(browserName.equals("Chrome")){ | 70 | else if(browserName.equals("Chrome")){ |
76 | -// System.setProperty("webdriver.chrome.driver", ".\\src\\main\\resources\\chromedriver.exe"); | ||
77 | - System.setProperty("webdriver.chrome.driver", ".\\chromedriver.exe"); | 71 | + System.setProperty("webdriver.chrome.driver", ".\\resources\\chromedriver.exe"); //图形界面 |
78 | driver= new ChromeDriver(); | 72 | driver= new ChromeDriver(); |
79 | Logger.Output(LogType.LogTypeName.INFO, "正在启动Chrome浏览器"); | 73 | Logger.Output(LogType.LogTypeName.INFO, "正在启动Chrome浏览器"); |
80 | - | ||
81 | }else if(browserName.equalsIgnoreCase("IE")){ | 74 | }else if(browserName.equalsIgnoreCase("IE")){ |
82 | - | ||
83 | System.setProperty("webdriver.ie.driver", ".\\src\\main\resources\\IEDriverServer.exe"); | 75 | System.setProperty("webdriver.ie.driver", ".\\src\\main\resources\\IEDriverServer.exe"); |
84 | driver= new InternetExplorerDriver(); | 76 | driver= new InternetExplorerDriver(); |
85 | Logger.Output(LogType.LogTypeName.INFO, "正在启动IE浏览器"); | 77 | Logger.Output(LogType.LogTypeName.INFO, "正在启动IE浏览器"); |
@@ -98,10 +90,13 @@ public class BrowserEngine { | @@ -98,10 +90,13 @@ public class BrowserEngine { | ||
98 | */ | 90 | */ |
99 | public WebDriver buyerGetBrowser() { | 91 | public WebDriver buyerGetBrowser() { |
100 | if (browserName.equals("Chrome")) { | 92 | if (browserName.equals("Chrome")) { |
101 | -// System.setProperty("webdriver.chrome.driver", ".\\src\\main\\resources\\chromedriver.exe"); | ||
102 | - System.setProperty("webdriver.chrome.driver", ".\\chromedriver.exe"); | 93 | + System.setProperty("webdriver.chrome.driver", ".\\resources\\chromedriver.exe"); //图形界面 |
103 | driver= new ChromeDriver(); | 94 | driver= new ChromeDriver(); |
104 | Logger.Output(LogType.LogTypeName.INFO, "正在启动Chrome浏览器"); | 95 | Logger.Output(LogType.LogTypeName.INFO, "正在启动Chrome浏览器"); |
96 | + }else if (browserName.equals("Firefox")) { | ||
97 | + System.setProperty("webdriver.gecko.driver", ".\\resources\\geckodriver.exe"); | ||
98 | + driver = new FirefoxDriver(); | ||
99 | + Logger.Output(LogType.LogTypeName.INFO, "正在启动FireFox浏览器"); | ||
105 | } | 100 | } |
106 | driver.manage().window().maximize(); | 101 | driver.manage().window().maximize(); |
107 | Logger.Output(LogType.LogTypeName.INFO, "窗口最大化"); | 102 | Logger.Output(LogType.LogTypeName.INFO, "窗口最大化"); |
@@ -111,51 +106,29 @@ public class BrowserEngine { | @@ -111,51 +106,29 @@ public class BrowserEngine { | ||
111 | return driver; | 106 | return driver; |
112 | } | 107 | } |
113 | 108 | ||
114 | - /* | ||
115 | - * 关闭浏览器并退出方法 | ||
116 | - */ | ||
117 | 109 | ||
110 | + /** | ||
111 | + * 退出驱动 | ||
112 | + * @throws InterruptedException | ||
113 | + */ | ||
118 | public void tearDown() throws InterruptedException{ | 114 | public void tearDown() throws InterruptedException{ |
119 | - | ||
120 | Logger.Output(LogType.LogTypeName.INFO, "关闭浏览器"); | 115 | Logger.Output(LogType.LogTypeName.INFO, "关闭浏览器"); |
121 | driver.quit(); | 116 | driver.quit(); |
122 | Thread.sleep(3000); | 117 | Thread.sleep(3000); |
123 | } | 118 | } |
124 | 119 | ||
125 | - /* | 120 | + /** |
126 | * 隐式时间等待方法 | 121 | * 隐式时间等待方法 |
127 | - */ | 122 | + * @param time |
123 | + */ | ||
128 | public void callWait(int time){ | 124 | public void callWait(int time){ |
129 | 125 | ||
130 | driver.manage().timeouts().implicitlyWait(time, TimeUnit.SECONDS); | 126 | driver.manage().timeouts().implicitlyWait(time, TimeUnit.SECONDS); |
131 | Logger.Output(LogType.LogTypeName.INFO, "设置隐性等待"+time+" 秒"); | 127 | Logger.Output(LogType.LogTypeName.INFO, "设置隐性等待"+time+" 秒"); |
132 | } | 128 | } |
133 | - | ||
134 | - | ||
135 | - /* | ||
136 | - * createFireFox Driver | ||
137 | - * @Param: null | ||
138 | - * @return: WebDriver | ||
139 | - */ | ||
140 | - | ||
141 | - private WebDriver createFireFoxDriver() { | ||
142 | - | ||
143 | - WebDriver driver = null; | ||
144 | - FirefoxProfile firefoxProfile = new FirefoxProfile(); | ||
145 | - | ||
146 | - firefoxProfile.setPreference("prefs.converted-to-utf8", true); | ||
147 | - //set download folder to default folder: TestDownload | ||
148 | - firefoxProfile.setPreference("browser.download.folderList", 2); | ||
149 | - firefoxProfile.setPreference("browser.download.dir", ".\\TestDownload"); | ||
150 | - | ||
151 | - try { | ||
152 | - driver = new FirefoxDriver(); | ||
153 | - } catch (Exception e) { | ||
154 | - Logger.Output(LogType.LogTypeName.ERROR, e.getMessage()); | ||
155 | - Logger.Output(LogType.LogTypeName.ERROR, "Failed to initilize the Firefox driver"); | ||
156 | - } | ||
157 | - return driver; | ||
158 | - } | 129 | + /** |
130 | + *跳过安全链接 | ||
131 | + */ | ||
159 | public void anQuan() { | 132 | public void anQuan() { |
160 | // 创建DesiredCapabilities类的一个对象实例 | 133 | // 创建DesiredCapabilities类的一个对象实例 |
161 | DesiredCapabilities cap=DesiredCapabilities.chrome(); | 134 | DesiredCapabilities cap=DesiredCapabilities.chrome(); |
src/test/java/com/essa/framework/Logger.java
@@ -8,8 +8,6 @@ import java.util.Date; | @@ -8,8 +8,6 @@ import java.util.Date; | ||
8 | 8 | ||
9 | import com.essa.framework.LogType; | 9 | import com.essa.framework.LogType; |
10 | 10 | ||
11 | -import demo.firstDemo; | ||
12 | - | ||
13 | public class Logger { | 11 | public class Logger { |
14 | 12 | ||
15 | public static String OutputFileName = getDateTimeByFormat(new Date(), "yyyyMMdd"); | 13 | public static String OutputFileName = getDateTimeByFormat(new Date(), "yyyyMMdd"); |
@@ -58,8 +56,7 @@ public class Logger { | @@ -58,8 +56,7 @@ public class Logger { | ||
58 | } | 56 | } |
59 | 57 | ||
60 | public static void Output(LogType.LogTypeName logTypeName, String logMessage) { | 58 | public static void Output(LogType.LogTypeName logTypeName, String logMessage) { |
61 | - firstDemo aa = new firstDemo(); | ||
62 | - Date date = new Date(); | 59 | + Date date = new Date(); |
63 | String logTime = getDateTimeByFormat(date, "yyyy-MM-dd HH:mm:ss.SSS"); | 60 | String logTime = getDateTimeByFormat(date, "yyyy-MM-dd HH:mm:ss.SSS"); |
64 | String logEntry = logTime + " " + logTypeName.name() + ": " + logMessage + "\r\n"; | 61 | String logEntry = logTime + " " + logTypeName.name() + ": " + logMessage + "\r\n"; |
65 | System.out.print(logEntry); | 62 | System.out.print(logEntry); |
src/test/java/com/essa/pageObject/BaseTest.java
@@ -4,9 +4,16 @@ import java.io.IOException; | @@ -4,9 +4,16 @@ import java.io.IOException; | ||
4 | 4 | ||
5 | import org.openqa.selenium.WebDriver; | 5 | import org.openqa.selenium.WebDriver; |
6 | import org.openqa.selenium.support.PageFactory; | 6 | import org.openqa.selenium.support.PageFactory; |
7 | + | ||
8 | +import com.buyer.pageObject.BuyerLoginPage; | ||
9 | +import com.buyer.pageObject.IndexPage; | ||
7 | import com.essa.framework.BrowserEngine; | 10 | import com.essa.framework.BrowserEngine; |
8 | import com.essa.pageObject.LoginPage; | 11 | import com.essa.pageObject.LoginPage; |
9 | 12 | ||
13 | +/** | ||
14 | + * @author Administrator | ||
15 | + *测试用例的基类,主要是有登录和调用浏览器的方法 | ||
16 | + */ | ||
10 | public class BaseTest { | 17 | public class BaseTest { |
11 | public WebDriver driver; | 18 | public WebDriver driver; |
12 | 19 | ||
@@ -48,5 +55,15 @@ public class BaseTest { | @@ -48,5 +55,15 @@ public class BaseTest { | ||
48 | LoginPage loginPage = PageFactory.initElements(driver, LoginPage.class); | 55 | LoginPage loginPage = PageFactory.initElements(driver, LoginPage.class); |
49 | loginPage.login(account, "essa123"); | 56 | loginPage.login(account, "essa123"); |
50 | } | 57 | } |
58 | + /** | ||
59 | + * buyer初始化登录 | ||
60 | + * @param account | ||
61 | + */ | ||
62 | + public void loginBuyerValid(String account,String password) { | ||
63 | + IndexPage indexPage = PageFactory.initElements(driver, IndexPage.class); | ||
64 | + indexPage.toLoginPage(); | ||
65 | + BuyerLoginPage loginPage = PageFactory.initElements(driver, BuyerLoginPage.class); | ||
66 | + loginPage.login(account, password); | ||
67 | + } | ||
51 | } | 68 | } |
52 | 69 |
src/test/java/com/essa/pageObject/HomePage.java
@@ -11,9 +11,15 @@ import com.essa.pageObject.GoodsManage.GoodsBankPage; | @@ -11,9 +11,15 @@ import com.essa.pageObject.GoodsManage.GoodsBankPage; | ||
11 | import com.essa.pageObject.GoodsManage.GoodsRelesePage; | 11 | import com.essa.pageObject.GoodsManage.GoodsRelesePage; |
12 | import com.essa.pageObject.GoodsManage.MarketGoodsRelesePage; | 12 | import com.essa.pageObject.GoodsManage.MarketGoodsRelesePage; |
13 | import com.essa.pageObject.buyPlaneManage.SkuCategoryManagerCongfigPage; | 13 | import com.essa.pageObject.buyPlaneManage.SkuCategoryManagerCongfigPage; |
14 | +import com.essa.pageObject.buyerManage.InvateCodePage; | ||
15 | +import com.essa.pageObject.inquiryManage.ProductInquiryTask; | ||
14 | import com.essa.pageObject.marketingManage.GroupControlPage; | 16 | import com.essa.pageObject.marketingManage.GroupControlPage; |
15 | import com.essa.pageObject.marketingManage.GroupSettingPage; | 17 | import com.essa.pageObject.marketingManage.GroupSettingPage; |
16 | 18 | ||
19 | +/** | ||
20 | + * @author Administrator | ||
21 | + *bpms后台首页 | ||
22 | + */ | ||
17 | public class HomePage extends BasePage{ | 23 | public class HomePage extends BasePage{ |
18 | public HomePage(WebDriver driver) { | 24 | public HomePage(WebDriver driver) { |
19 | super(driver); | 25 | super(driver); |
@@ -91,13 +97,43 @@ public class HomePage extends BasePage{ | @@ -91,13 +97,43 @@ public class HomePage extends BasePage{ | ||
91 | @FindBy (xpath="//*[text()='团购控制']/..") | 97 | @FindBy (xpath="//*[text()='团购控制']/..") |
92 | WebElement groupControl; | 98 | WebElement groupControl; |
93 | 99 | ||
100 | + //采购商管理 | ||
101 | + @FindBy (xpath="//*[text()='采购商管理']") | ||
102 | + WebElement buyerManage; | ||
103 | + | ||
104 | + //生成邀请码 | ||
105 | + @FindBy (xpath="//*[text()='生成邀请码']" ) | ||
106 | + WebElement inviteCode; | ||
107 | + | ||
108 | + //询价管理 | ||
109 | + @FindBy (xpath ="//span[text()='询价管理']") | ||
110 | + WebElement inquiryManage; | ||
111 | + | ||
112 | + //成品询价任务列表 | ||
113 | + @FindBy (xpath = "//*[text()='成品询价任务列表']") | ||
114 | + WebElement productInquiryTask; | ||
115 | + | ||
116 | + //产品开发 | ||
117 | + @FindBy (xpath ="//*[text()='产品开发']") | ||
118 | + WebElement productDev; | ||
119 | + | ||
120 | + //项目立项书新增 | ||
121 | + @FindBy (xpath ="//*[text()='项目立项书新增']") | ||
122 | + WebElement addProject; | ||
123 | + | ||
124 | + //项目立项书查询 | ||
125 | + @FindBy (xpath ="//*[text()='项目立项书查询']") | ||
126 | + WebElement quiryProject; | ||
127 | + | ||
128 | + | ||
129 | + | ||
94 | /* | 130 | /* |
95 | * 方法 | 131 | * 方法 |
96 | */ | 132 | */ |
97 | 133 | ||
98 | /** | 134 | /** |
99 | * 进入运营跟进管理页面 | 135 | * 进入运营跟进管理页面 |
100 | - * @return | 136 | + * @return SupplierOperationsTrackPage |
101 | */ | 137 | */ |
102 | public SupplierOperationsTrackPage goToSupplierOperationsTrack() { | 138 | public SupplierOperationsTrackPage goToSupplierOperationsTrack() { |
103 | 139 | ||
@@ -114,7 +150,7 @@ public class HomePage extends BasePage{ | @@ -114,7 +150,7 @@ public class HomePage extends BasePage{ | ||
114 | 150 | ||
115 | /** | 151 | /** |
116 | * 进入原厂商品发布 | 152 | * 进入原厂商品发布 |
117 | - * @return | 153 | + * @return AddOriginalGoodsPage |
118 | */ | 154 | */ |
119 | public AddOriginalGoodsPage tOriginalGoodsPage() { | 155 | public AddOriginalGoodsPage tOriginalGoodsPage() { |
120 | click(goodsManage); | 156 | click(goodsManage); |
@@ -125,7 +161,7 @@ public class HomePage extends BasePage{ | @@ -125,7 +161,7 @@ public class HomePage extends BasePage{ | ||
125 | 161 | ||
126 | /** | 162 | /** |
127 | * 进入商品发布管理 | 163 | * 进入商品发布管理 |
128 | - * @return | 164 | + * @return GoodsRelesePage |
129 | */ | 165 | */ |
130 | public GoodsRelesePage tGoodsRelesePage() { | 166 | public GoodsRelesePage tGoodsRelesePage() { |
131 | click(goodsManage); | 167 | click(goodsManage); |
@@ -135,7 +171,7 @@ public class HomePage extends BasePage{ | @@ -135,7 +171,7 @@ public class HomePage extends BasePage{ | ||
135 | 171 | ||
136 | /** | 172 | /** |
137 | * 进入原厂商品发布审核 | 173 | * 进入原厂商品发布审核 |
138 | - * @return | 174 | + * @return AuditOriginalGoodsPage |
139 | */ | 175 | */ |
140 | public AuditOriginalGoodsPage toAuditOriginalGoodsPage() { | 176 | public AuditOriginalGoodsPage toAuditOriginalGoodsPage() { |
141 | mywait(logout); | 177 | mywait(logout); |
@@ -146,7 +182,7 @@ public class HomePage extends BasePage{ | @@ -146,7 +182,7 @@ public class HomePage extends BasePage{ | ||
146 | 182 | ||
147 | /** | 183 | /** |
148 | * 进入商品库 | 184 | * 进入商品库 |
149 | - * @return | 185 | + * @return GoodsBankPage |
150 | */ | 186 | */ |
151 | public GoodsBankPage toGoodsBankPage() { | 187 | public GoodsBankPage toGoodsBankPage() { |
152 | click(goodsManage); | 188 | click(goodsManage); |
@@ -156,7 +192,7 @@ public class HomePage extends BasePage{ | @@ -156,7 +192,7 @@ public class HomePage extends BasePage{ | ||
156 | 192 | ||
157 | /** | 193 | /** |
158 | * 进入市场商品发布 | 194 | * 进入市场商品发布 |
159 | - * @return | 195 | + * @return MarketGoodsRelesePage |
160 | */ | 196 | */ |
161 | public MarketGoodsRelesePage toMarketGoodsRelesePage() { | 197 | public MarketGoodsRelesePage toMarketGoodsRelesePage() { |
162 | click(goodsManage); | 198 | click(goodsManage); |
@@ -164,8 +200,8 @@ public class HomePage extends BasePage{ | @@ -164,8 +200,8 @@ public class HomePage extends BasePage{ | ||
164 | return new MarketGoodsRelesePage(driver); | 200 | return new MarketGoodsRelesePage(driver); |
165 | } | 201 | } |
166 | /** | 202 | /** |
167 | - * 进入市场商品发布审核 | ||
168 | - * @return | 203 | + * 进入市场商品发布审核 |
204 | + * @return AuditMarketGoodsPage | ||
169 | */ | 205 | */ |
170 | public AuditMarketGoodsPage toAuditMarketGoodsPage() { | 206 | public AuditMarketGoodsPage toAuditMarketGoodsPage() { |
171 | click(goodsManage); | 207 | click(goodsManage); |
@@ -174,7 +210,7 @@ public class HomePage extends BasePage{ | @@ -174,7 +210,7 @@ public class HomePage extends BasePage{ | ||
174 | } | 210 | } |
175 | /** | 211 | /** |
176 | * 进入商品类目经理分配配置 | 212 | * 进入商品类目经理分配配置 |
177 | - * @return | 213 | + * @return SkuCategoryManagerCongfigPage |
178 | */ | 214 | */ |
179 | public SkuCategoryManagerCongfigPage toSkuCategoryManagerCongfig() { | 215 | public SkuCategoryManagerCongfigPage toSkuCategoryManagerCongfig() { |
180 | mywait(logout); | 216 | mywait(logout); |
@@ -184,7 +220,7 @@ public class HomePage extends BasePage{ | @@ -184,7 +220,7 @@ public class HomePage extends BasePage{ | ||
184 | } | 220 | } |
185 | /** | 221 | /** |
186 | * 进入团购设置 | 222 | * 进入团购设置 |
187 | - * @return | 223 | + * @return GroupSettingPage |
188 | */ | 224 | */ |
189 | public GroupSettingPage toGroupSettingPage() { | 225 | public GroupSettingPage toGroupSettingPage() { |
190 | getHome(); | 226 | getHome(); |
@@ -194,27 +230,50 @@ public class HomePage extends BasePage{ | @@ -194,27 +230,50 @@ public class HomePage extends BasePage{ | ||
194 | } | 230 | } |
195 | /** | 231 | /** |
196 | * 进入团购控制 | 232 | * 进入团购控制 |
197 | - * @return | 233 | + * @return GroupControlPage |
198 | */ | 234 | */ |
199 | public GroupControlPage toGroupControlPage() { | 235 | public GroupControlPage toGroupControlPage() { |
200 | // getHome(); | 236 | // getHome(); |
237 | + jsExecutorClick(essaIcon); | ||
201 | click(marketingManage); | 238 | click(marketingManage); |
202 | click(groupControl); | 239 | click(groupControl); |
203 | return new GroupControlPage(driver); | 240 | return new GroupControlPage(driver); |
204 | } | 241 | } |
205 | - //判断是否存在退出按钮 | 242 | + /** |
243 | + * 进入生成邀请码 | ||
244 | + * @return InvateCodePage | ||
245 | + */ | ||
246 | + public InvateCodePage toInvateCodePage() { | ||
247 | + click(buyerManage); | ||
248 | + moveHeightScroll("100"); | ||
249 | + click(inviteCode); | ||
250 | + return new InvateCodePage(driver); | ||
251 | + } | ||
252 | + /** | ||
253 | + * 进入成品询价任务列表 | ||
254 | + * @return ProductInquiryTask | ||
255 | + */ | ||
256 | + public ProductInquiryTask toProductInquiryTask() { | ||
257 | + click(inquiryManage); | ||
258 | + click(productInquiryTask); | ||
259 | + return new ProductInquiryTask(driver); | ||
260 | + } | ||
261 | + | ||
262 | + | ||
263 | + /** | ||
264 | + * 判断是否进入后台首页 | ||
265 | + * @return boolean | ||
266 | + */ | ||
206 | public boolean isSucceed() { | 267 | public boolean isSucceed() { |
207 | - | ||
208 | - //判断退出按钮是否存在,存在则表示成功进入首页 | ||
209 | return isThisPage("退出", logout); | 268 | return isThisPage("退出", logout); |
210 | - | ||
211 | } | 269 | } |
212 | 270 | ||
213 | - //判断是否选中“供应商管理” | 271 | + /** |
272 | + * 判断是否选中“供应商管理” | ||
273 | + * @return | ||
274 | + */ | ||
214 | public boolean isSearchSuppliers() { | 275 | public boolean isSearchSuppliers() { |
215 | - | ||
216 | return isElementExist(searchSuppliers); | 276 | return isElementExist(searchSuppliers); |
217 | - | ||
218 | } | 277 | } |
219 | 278 | ||
220 | /** | 279 | /** |
@@ -225,10 +284,10 @@ public class HomePage extends BasePage{ | @@ -225,10 +284,10 @@ public class HomePage extends BasePage{ | ||
225 | jsExecutorClick(essaIcon); | 284 | jsExecutorClick(essaIcon); |
226 | forceWait(1000); | 285 | forceWait(1000); |
227 | } | 286 | } |
228 | - //退出登录 | 287 | + /** |
288 | + * 退出登录 | ||
289 | + */ | ||
229 | public void logout() { | 290 | public void logout() { |
230 | - | ||
231 | click(logout); | 291 | click(logout); |
232 | - | ||
233 | } | 292 | } |
234 | } | 293 | } |
235 | \ No newline at end of file | 294 | \ No newline at end of file |
src/test/java/com/essa/pageObject/LoginPage.java
@@ -6,11 +6,14 @@ import org.openqa.selenium.support.FindBy; | @@ -6,11 +6,14 @@ import org.openqa.selenium.support.FindBy; | ||
6 | 6 | ||
7 | import com.essa.framework.BasePage; | 7 | import com.essa.framework.BasePage; |
8 | 8 | ||
9 | +/** | ||
10 | + * @author Administrator | ||
11 | + *bpms登录页 | ||
12 | + */ | ||
9 | public class LoginPage extends BasePage{ | 13 | public class LoginPage extends BasePage{ |
10 | 14 | ||
11 | public LoginPage(WebDriver driver) { | 15 | public LoginPage(WebDriver driver) { |
12 | super(driver); | 16 | super(driver); |
13 | - // TODO Auto-generated constructor stub | ||
14 | } | 17 | } |
15 | 18 | ||
16 | /* | 19 | /* |
@@ -33,21 +36,19 @@ public class LoginPage extends BasePage{ | @@ -33,21 +36,19 @@ public class LoginPage extends BasePage{ | ||
33 | * 页面方法 | 36 | * 页面方法 |
34 | */ | 37 | */ |
35 | 38 | ||
36 | - /* | 39 | + /** |
37 | * 1.输入帐号 | 40 | * 1.输入帐号 |
38 | * 2.输入密码 | 41 | * 2.输入密码 |
39 | * 3.点击登录 | 42 | * 3.点击登录 |
40 | * 4.将driver返回 | 43 | * 4.将driver返回 |
44 | + * @param account | ||
45 | + * @param password | ||
46 | + * @return HomePage | ||
41 | */ | 47 | */ |
42 | public HomePage login(String account,String password) { | 48 | public HomePage login(String account,String password) { |
43 | - | ||
44 | sendKeys(login_account, account); | 49 | sendKeys(login_account, account); |
45 | - | ||
46 | sendKeys(login_password, password); | 50 | sendKeys(login_password, password); |
47 | - | ||
48 | click(login_submit); | 51 | click(login_submit); |
49 | - | ||
50 | return new HomePage(driver); | 52 | return new HomePage(driver); |
51 | - | ||
52 | } | 53 | } |
53 | } | 54 | } |
src/test/java/com/essa/testSuite/TestLogin.java
@@ -14,6 +14,10 @@ import com.essa.framework.BrowserEngine; | @@ -14,6 +14,10 @@ import com.essa.framework.BrowserEngine; | ||
14 | import com.essa.pageObject.HomePage; | 14 | import com.essa.pageObject.HomePage; |
15 | import com.essa.pageObject.LoginPage; | 15 | import com.essa.pageObject.LoginPage; |
16 | 16 | ||
17 | +/** | ||
18 | + * @author Administrator | ||
19 | + *测试用例:登录测试 | ||
20 | + */ | ||
17 | public class TestLogin { | 21 | public class TestLogin { |
18 | WebDriver driver; | 22 | WebDriver driver; |
19 | 23 |
target/classes/META-INF/maven/com.essatest/essa/pom.properties
1 | #Generated by Maven Integration for Eclipse | 1 | #Generated by Maven Integration for Eclipse |
2 | -#Sat Aug 18 18:12:23 CST 2018 | 2 | +#Thu Aug 30 10:15:43 CST 2018 |
3 | m2e.projectLocation=D\:\\workspace\\demo | 3 | m2e.projectLocation=D\:\\workspace\\demo |
4 | m2e.projectName=demo | 4 | m2e.projectName=demo |
5 | groupId=com.essatest | 5 | groupId=com.essatest |
target/classes/META-INF/maven/com.essatest/essa/pom.xml
@@ -96,6 +96,17 @@ | @@ -96,6 +96,17 @@ | ||
96 | <artifactId>commons-io</artifactId> | 96 | <artifactId>commons-io</artifactId> |
97 | <version>1.3.2</version> | 97 | <version>1.3.2</version> |
98 | </dependency> | 98 | </dependency> |
99 | + | ||
100 | + <dependency> | ||
101 | + <groupId>mysql</groupId> | ||
102 | + <artifactId>mysql-connector-java</artifactId> | ||
103 | + <version>6.0.6</version> | ||
104 | + </dependency> | ||
105 | + <dependency> | ||
106 | + <groupId>org.dbunit</groupId> | ||
107 | + <artifactId>dbunit</artifactId> | ||
108 | + <version>2.5.4</version> | ||
109 | + </dependency> | ||
99 | </dependencies> | 110 | </dependencies> |
100 | 111 | ||
101 | <build> | 112 | <build> |
@@ -107,7 +118,7 @@ | @@ -107,7 +118,7 @@ | ||
107 | <configuration> | 118 | <configuration> |
108 | <!--<testFailureIgnore>true</testFailureIgnore>--> | 119 | <!--<testFailureIgnore>true</testFailureIgnore>--> |
109 | <suiteXmlFiles> | 120 | <suiteXmlFiles> |
110 | - <suiteXmlFile>suites/testng.xml</suiteXmlFile> | 121 | + <suiteXmlFile>resources/suites/testng.xml</suiteXmlFile> |
111 | <!--此处testng.xml即为要运行的testng.xml文件--> | 122 | <!--此处testng.xml即为要运行的testng.xml文件--> |
112 | </suiteXmlFiles> | 123 | </suiteXmlFiles> |
113 | </configuration> | 124 | </configuration> |
target/test-classes/com/essa/framework/BasePage.class
No preview for this file type
target/test-classes/com/essa/framework/BrowserEngine.class
No preview for this file type
target/test-classes/com/essa/framework/Logger.class
No preview for this file type
target/test-classes/com/essa/pageObject/BaseTest.class
No preview for this file type
target/test-classes/com/essa/pageObject/HomePage.class
No preview for this file type
target/test-classes/com/essa/pageObject/LoginPage.class
No preview for this file type
test-output/emailable-report.html
@@ -8,13 +8,14 @@ | @@ -8,13 +8,14 @@ | ||
8 | <body> | 8 | <body> |
9 | <table> | 9 | <table> |
10 | <tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr> | 10 | <tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr> |
11 | -<tr><th colspan="7">新增市场商品</th></tr> | ||
12 | -<tr><td><a href="#t0">addMarketGoods</a></td><td class="num">3</td><td class="num">0</td><td class="num">0</td><td class="num">71,013</td><td></td><td></td></tr> | 11 | +<tr><th colspan="7">提交PO</th></tr> |
12 | +<tr><td><a href="#t0">sendPO</a></td><td class="num">4</td><td class="num">0</td><td class="num">0</td><td class="num">99,569</td><td></td><td></td></tr> | ||
13 | </table> | 13 | </table> |
14 | -<table id='summary'><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">新增市场商品</th></tr></tbody><tbody id="t0"><tr><th colspan="4">addMarketGoods — passed</th></tr><tr class="passedeven"><td rowspan="3">com.essa.testSuite.TestAddMarketGoods</td><td><a href="#m0">addMarketGoods</a></td><td rowspan="1">1535079590155</td><td rowspan="1">37865</td></tr><tr class="passedeven"><td><a href="#m1">auditMarketGoods</a></td><td rowspan="1">1535079628021</td><td rowspan="1">16655</td></tr><tr class="passedeven"><td><a href="#m2">toMarketGoodsRelesePage</a></td><td rowspan="1">1535079583878</td><td rowspan="1">6275</td></tr></tbody> | 14 | +<table id='summary'><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">提交PO</th></tr></tbody><tbody id="t0"><tr><th colspan="4">sendPO — passed</th></tr><tr class="passedeven"><td rowspan="1">com.buyer.testSuite.TestAddToCart</td><td><a href="#m0">addSku</a></td><td rowspan="1">1535963243569</td><td rowspan="1">12739</td></tr><tr class="passedodd"><td rowspan="2">com.buyer.testSuite.TestSendPO</td><td><a href="#m1">conslidation</a></td><td rowspan="1">1535963290476</td><td rowspan="1">29695</td></tr><tr class="passedodd"><td><a href="#m2">sendPO</a></td><td rowspan="1">1535963320172</td><td rowspan="1">12651</td></tr><tr class="passedeven"><td rowspan="1">com.essa.testSuite.TestProductInquiry</td><td><a href="#m3">productInquiry</a></td><td rowspan="1">1535963265590</td><td rowspan="1">15888</td></tr></tbody> |
15 | </table> | 15 | </table> |
16 | -<h2>addMarketGoods</h2><h3 id="m0">com.essa.testSuite.TestAddMarketGoods#addMarketGoods</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | ||
17 | -<h3 id="m1">com.essa.testSuite.TestAddMarketGoods#auditMarketGoods</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | ||
18 | -<h3 id="m2">com.essa.testSuite.TestAddMarketGoods#toMarketGoodsRelesePage</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | 16 | +<h2>sendPO</h2><h3 id="m0">com.buyer.testSuite.TestAddToCart#addSku</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> |
17 | +<h3 id="m1">com.buyer.testSuite.TestSendPO#conslidation</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | ||
18 | +<h3 id="m2">com.buyer.testSuite.TestSendPO#sendPO</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | ||
19 | +<h3 id="m3">com.essa.testSuite.TestProductInquiry#productInquiry</h3><table class="result"><tr><th class="invisible"/></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | ||
19 | </body> | 20 | </body> |
20 | </html> | 21 | </html> |
test-output/index.html
@@ -37,8 +37,8 @@ | @@ -37,8 +37,8 @@ | ||
37 | <div class="suite"> | 37 | <div class="suite"> |
38 | <div class="rounded-window"> | 38 | <div class="rounded-window"> |
39 | <div class="suite-header light-rounded-window-top"> | 39 | <div class="suite-header light-rounded-window-top"> |
40 | - <a href="#" panel-name="suite-新增市场商品" class="navigator-link"> | ||
41 | - <span class="suite-name border-passed">新增市场商品</span> | 40 | + <a href="#" panel-name="suite-提交PO" class="navigator-link"> |
41 | + <span class="suite-name border-passed">提交PO</span> | ||
42 | </a> <!-- navigator-link --> | 42 | </a> <!-- navigator-link --> |
43 | </div> <!-- suite-header light-rounded-window-top --> | 43 | </div> <!-- suite-header light-rounded-window-top --> |
44 | <div class="navigator-suite-content"> | 44 | <div class="navigator-suite-content"> |
@@ -48,37 +48,37 @@ | @@ -48,37 +48,37 @@ | ||
48 | <div class="suite-section-content"> | 48 | <div class="suite-section-content"> |
49 | <ul> | 49 | <ul> |
50 | <li> | 50 | <li> |
51 | - <a href="#" panel-name="test-xml-新增市场商品" class="navigator-link "> | ||
52 | - <span>D:\workspace\demo\suites\addMarketGoods.xml</span> | 51 | + <a href="#" panel-name="test-xml-提交PO" class="navigator-link "> |
52 | + <span>D:\workspace\demo\resources\suites\sendPO.xml</span> | ||
53 | </a> <!-- navigator-link --> | 53 | </a> <!-- navigator-link --> |
54 | </li> | 54 | </li> |
55 | <li> | 55 | <li> |
56 | - <a href="#" panel-name="testlist-新增市场商品" class="navigator-link "> | 56 | + <a href="#" panel-name="testlist-提交PO" class="navigator-link "> |
57 | <span class="test-stats">1 test</span> | 57 | <span class="test-stats">1 test</span> |
58 | </a> <!-- navigator-link --> | 58 | </a> <!-- navigator-link --> |
59 | </li> | 59 | </li> |
60 | <li> | 60 | <li> |
61 | - <a href="#" panel-name="group-新增市场商品" class="navigator-link "> | 61 | + <a href="#" panel-name="group-提交PO" class="navigator-link "> |
62 | <span>0 groups</span> | 62 | <span>0 groups</span> |
63 | </a> <!-- navigator-link --> | 63 | </a> <!-- navigator-link --> |
64 | </li> | 64 | </li> |
65 | <li> | 65 | <li> |
66 | - <a href="#" panel-name="times-新增市场商品" class="navigator-link "> | 66 | + <a href="#" panel-name="times-提交PO" class="navigator-link "> |
67 | <span>Times</span> | 67 | <span>Times</span> |
68 | </a> <!-- navigator-link --> | 68 | </a> <!-- navigator-link --> |
69 | </li> | 69 | </li> |
70 | <li> | 70 | <li> |
71 | - <a href="#" panel-name="reporter-新增市场商品" class="navigator-link "> | 71 | + <a href="#" panel-name="reporter-提交PO" class="navigator-link "> |
72 | <span>Reporter output</span> | 72 | <span>Reporter output</span> |
73 | </a> <!-- navigator-link --> | 73 | </a> <!-- navigator-link --> |
74 | </li> | 74 | </li> |
75 | <li> | 75 | <li> |
76 | - <a href="#" panel-name="ignored-methods-新增市场商品" class="navigator-link "> | 76 | + <a href="#" panel-name="ignored-methods-提交PO" class="navigator-link "> |
77 | <span>Ignored methods</span> | 77 | <span>Ignored methods</span> |
78 | </a> <!-- navigator-link --> | 78 | </a> <!-- navigator-link --> |
79 | </li> | 79 | </li> |
80 | <li> | 80 | <li> |
81 | - <a href="#" panel-name="chronological-新增市场商品" class="navigator-link "> | 81 | + <a href="#" panel-name="chronological-提交PO" class="navigator-link "> |
82 | <span>Chronological view</span> | 82 | <span>Chronological view</span> |
83 | </a> <!-- navigator-link --> | 83 | </a> <!-- navigator-link --> |
84 | </li> | 84 | </li> |
@@ -91,31 +91,36 @@ | @@ -91,31 +91,36 @@ | ||
91 | <div class="suite-section-content"> | 91 | <div class="suite-section-content"> |
92 | <ul> | 92 | <ul> |
93 | <li> | 93 | <li> |
94 | - <span class="method-stats">3 methods, 3 passed</span> | 94 | + <span class="method-stats">4 methods, 4 passed</span> |
95 | </li> | 95 | </li> |
96 | <li> | 96 | <li> |
97 | <span class="method-list-title passed">Passed methods</span> | 97 | <span class="method-list-title passed">Passed methods</span> |
98 | <span class="show-or-hide-methods passed"> | 98 | <span class="show-or-hide-methods passed"> |
99 | - <a href="#" panel-name="suite-新增市场商品" class="hide-methods passed suite-新增市场商品"> (hide)</a> <!-- hide-methods passed suite-新增市场商品 --> | ||
100 | - <a href="#" panel-name="suite-新增市场商品" class="show-methods passed suite-新增市场商品"> (show)</a> <!-- show-methods passed suite-新增市场商品 --> | 99 | + <a href="#" panel-name="suite-提交PO" class="hide-methods passed suite-提交PO"> (hide)</a> <!-- hide-methods passed suite-提交PO --> |
100 | + <a href="#" panel-name="suite-提交PO" class="show-methods passed suite-提交PO"> (show)</a> <!-- show-methods passed suite-提交PO --> | ||
101 | </span> | 101 | </span> |
102 | - <div class="method-list-content passed suite-新增市场商品"> | 102 | + <div class="method-list-content passed suite-提交PO"> |
103 | <span> | 103 | <span> |
104 | <img src="passed.png" width="3%"/> | 104 | <img src="passed.png" width="3%"/> |
105 | - <a href="#" panel-name="suite-新增市场商品" title="com.essa.testSuite.TestAddMarketGoods" class="method navigator-link" hash-for-method="addMarketGoods">addMarketGoods</a> <!-- method navigator-link --> | 105 | + <a href="#" panel-name="suite-提交PO" title="com.buyer.testSuite.TestAddToCart" class="method navigator-link" hash-for-method="addSku">addSku</a> <!-- method navigator-link --> |
106 | </span> | 106 | </span> |
107 | <br/> | 107 | <br/> |
108 | <span> | 108 | <span> |
109 | <img src="passed.png" width="3%"/> | 109 | <img src="passed.png" width="3%"/> |
110 | - <a href="#" panel-name="suite-新增市场商品" title="com.essa.testSuite.TestAddMarketGoods" class="method navigator-link" hash-for-method="auditMarketGoods">auditMarketGoods</a> <!-- method navigator-link --> | 110 | + <a href="#" panel-name="suite-提交PO" title="com.buyer.testSuite.TestSendPO" class="method navigator-link" hash-for-method="conslidation">conslidation</a> <!-- method navigator-link --> |
111 | </span> | 111 | </span> |
112 | <br/> | 112 | <br/> |
113 | <span> | 113 | <span> |
114 | <img src="passed.png" width="3%"/> | 114 | <img src="passed.png" width="3%"/> |
115 | - <a href="#" panel-name="suite-新增市场商品" title="com.essa.testSuite.TestAddMarketGoods" class="method navigator-link" hash-for-method="toMarketGoodsRelesePage">toMarketGoodsRelesePage</a> <!-- method navigator-link --> | 115 | + <a href="#" panel-name="suite-提交PO" title="com.essa.testSuite.TestProductInquiry" class="method navigator-link" hash-for-method="productInquiry">productInquiry</a> <!-- method navigator-link --> |
116 | </span> | 116 | </span> |
117 | <br/> | 117 | <br/> |
118 | - </div> <!-- method-list-content passed suite-新增市场商品 --> | 118 | + <span> |
119 | + <img src="passed.png" width="3%"/> | ||
120 | + <a href="#" panel-name="suite-提交PO" title="com.buyer.testSuite.TestSendPO" class="method navigator-link" hash-for-method="sendPO">sendPO</a> <!-- method navigator-link --> | ||
121 | + </span> | ||
122 | + <br/> | ||
123 | + </div> <!-- method-list-content passed suite-提交PO --> | ||
119 | </li> | 124 | </li> |
120 | </ul> | 125 | </ul> |
121 | </div> <!-- suite-section-content --> | 126 | </div> <!-- suite-section-content --> |
@@ -126,157 +131,234 @@ | @@ -126,157 +131,234 @@ | ||
126 | </div> <!-- navigator-root --> | 131 | </div> <!-- navigator-root --> |
127 | <div class="wrapper"> | 132 | <div class="wrapper"> |
128 | <div class="main-panel-root"> | 133 | <div class="main-panel-root"> |
129 | - <div panel-name="suite-新增市场商品" class="panel 新增市场商品"> | ||
130 | - <div class="suite-新增市场商品-class-passed"> | 134 | + <div panel-name="suite-提交PO" class="panel 提交PO"> |
135 | + <div class="suite-提交PO-class-passed"> | ||
131 | <div class="main-panel-header rounded-window-top"> | 136 | <div class="main-panel-header rounded-window-top"> |
132 | <img src="passed.png"/> | 137 | <img src="passed.png"/> |
133 | - <span class="class-name">com.essa.testSuite.TestAddMarketGoods</span> | 138 | + <span class="class-name">com.buyer.testSuite.TestSendPO</span> |
134 | </div> <!-- main-panel-header rounded-window-top --> | 139 | </div> <!-- main-panel-header rounded-window-top --> |
135 | <div class="main-panel-content rounded-window-bottom"> | 140 | <div class="main-panel-content rounded-window-bottom"> |
136 | <div class="method"> | 141 | <div class="method"> |
137 | <div class="method-content"> | 142 | <div class="method-content"> |
138 | - <a name="addMarketGoods"> | ||
139 | - </a> <!-- addMarketGoods --> | ||
140 | - <span class="method-name">addMarketGoods</span> | 143 | + <a name="conslidation"> |
144 | + </a> <!-- conslidation --> | ||
145 | + <span class="method-name">conslidation</span> | ||
146 | + <em> | ||
147 | +(开始拼柜) </em> | ||
141 | </div> <!-- method-content --> | 148 | </div> <!-- method-content --> |
142 | </div> <!-- method --> | 149 | </div> <!-- method --> |
143 | <div class="method"> | 150 | <div class="method"> |
144 | <div class="method-content"> | 151 | <div class="method-content"> |
145 | - <a name="auditMarketGoods"> | ||
146 | - </a> <!-- auditMarketGoods --> | ||
147 | - <span class="method-name">auditMarketGoods</span> | 152 | + <a name="sendPO"> |
153 | + </a> <!-- sendPO --> | ||
154 | + <span class="method-name">sendPO</span> | ||
155 | + <em> | ||
156 | +(设置贴纸唛头,提交PO) </em> | ||
148 | </div> <!-- method-content --> | 157 | </div> <!-- method-content --> |
149 | </div> <!-- method --> | 158 | </div> <!-- method --> |
159 | + </div> <!-- main-panel-content rounded-window-bottom --> | ||
160 | + </div> <!-- suite-提交PO-class-passed --> | ||
161 | + <div class="suite-提交PO-class-passed"> | ||
162 | + <div class="main-panel-header rounded-window-top"> | ||
163 | + <img src="passed.png"/> | ||
164 | + <span class="class-name">com.essa.testSuite.TestProductInquiry</span> | ||
165 | + </div> <!-- main-panel-header rounded-window-top --> | ||
166 | + <div class="main-panel-content rounded-window-bottom"> | ||
150 | <div class="method"> | 167 | <div class="method"> |
151 | <div class="method-content"> | 168 | <div class="method-content"> |
152 | - <a name="toMarketGoodsRelesePage"> | ||
153 | - </a> <!-- toMarketGoodsRelesePage --> | ||
154 | - <span class="method-name">toMarketGoodsRelesePage</span> | 169 | + <a name="productInquiry"> |
170 | + </a> <!-- productInquiry --> | ||
171 | + <span class="method-name">productInquiry</span> | ||
172 | + <em> | ||
173 | +(成品询价流程) </em> | ||
155 | </div> <!-- method-content --> | 174 | </div> <!-- method-content --> |
156 | </div> <!-- method --> | 175 | </div> <!-- method --> |
157 | </div> <!-- main-panel-content rounded-window-bottom --> | 176 | </div> <!-- main-panel-content rounded-window-bottom --> |
158 | - </div> <!-- suite-新增市场商品-class-passed --> | ||
159 | - </div> <!-- panel 新增市场商品 --> | ||
160 | - <div panel-name="test-xml-新增市场商品" class="panel"> | 177 | + </div> <!-- suite-提交PO-class-passed --> |
178 | + <div class="suite-提交PO-class-passed"> | ||
179 | + <div class="main-panel-header rounded-window-top"> | ||
180 | + <img src="passed.png"/> | ||
181 | + <span class="class-name">com.buyer.testSuite.TestAddToCart</span> | ||
182 | + </div> <!-- main-panel-header rounded-window-top --> | ||
183 | + <div class="main-panel-content rounded-window-bottom"> | ||
184 | + <div class="method"> | ||
185 | + <div class="method-content"> | ||
186 | + <a name="addSku"> | ||
187 | + </a> <!-- addSku --> | ||
188 | + <span class="method-name">addSku</span> | ||
189 | + <em> | ||
190 | +(将sku加入购物车) </em> | ||
191 | + </div> <!-- method-content --> | ||
192 | + </div> <!-- method --> | ||
193 | + </div> <!-- main-panel-content rounded-window-bottom --> | ||
194 | + </div> <!-- suite-提交PO-class-passed --> | ||
195 | + </div> <!-- panel 提交PO --> | ||
196 | + <div panel-name="test-xml-提交PO" class="panel"> | ||
161 | <div class="main-panel-header rounded-window-top"> | 197 | <div class="main-panel-header rounded-window-top"> |
162 | - <span class="header-content">D:\workspace\demo\suites\addMarketGoods.xml</span> | 198 | + <span class="header-content">D:\workspace\demo\resources\suites\sendPO.xml</span> |
163 | </div> <!-- main-panel-header rounded-window-top --> | 199 | </div> <!-- main-panel-header rounded-window-top --> |
164 | <div class="main-panel-content rounded-window-bottom"> | 200 | <div class="main-panel-content rounded-window-bottom"> |
165 | <pre> | 201 | <pre> |
166 | <?xml version="1.0" encoding="UTF-8"?> | 202 | <?xml version="1.0" encoding="UTF-8"?> |
167 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> | 203 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> |
168 | -<suite name="新增市场商品" guice-stage="DEVELOPMENT"> | ||
169 | - <test thread-count="5" name="addMarketGoods"> | 204 | +<suite name="提交PO" guice-stage="DEVELOPMENT"> |
205 | + <test thread-count="5" name="sendPO"> | ||
170 | <classes> | 206 | <classes> |
171 | - <class name="com.essa.testSuite.TestAddMarketGoods"> | 207 | + <class name="com.buyer.testSuite.TestAddToCart"> |
208 | + <methods> | ||
209 | + <include name="addSku"/> | ||
210 | + </methods> | ||
211 | + </class> <!-- com.buyer.testSuite.TestAddToCart --> | ||
212 | + <class name="com.essa.testSuite.TestProductInquiry"> | ||
213 | + <methods> | ||
214 | + <include name="productInquiry"/> | ||
215 | + </methods> | ||
216 | + </class> <!-- com.essa.testSuite.TestProductInquiry --> | ||
217 | + <class name="com.buyer.testSuite.TestSendPO"> | ||
172 | <methods> | 218 | <methods> |
173 | - <include name="toMarketGoodsRelesePage"/> | ||
174 | - <include name="addMarketGoods"/> | ||
175 | - <include name="auditMarketGoods"/> | 219 | + <include name="conslidation"/> |
220 | + <include name="sendPO"/> | ||
176 | </methods> | 221 | </methods> |
177 | - </class> <!-- com.essa.testSuite.TestAddMarketGoods --> | 222 | + </class> <!-- com.buyer.testSuite.TestSendPO --> |
178 | </classes> | 223 | </classes> |
179 | - </test> <!-- addMarketGoods --> | ||
180 | -</suite> <!-- 新增市场商品 --> | 224 | + </test> <!-- sendPO --> |
225 | +</suite> <!-- 提交PO --> | ||
181 | </pre> | 226 | </pre> |
182 | </div> <!-- main-panel-content rounded-window-bottom --> | 227 | </div> <!-- main-panel-content rounded-window-bottom --> |
183 | </div> <!-- panel --> | 228 | </div> <!-- panel --> |
184 | - <div panel-name="testlist-新增市场商品" class="panel"> | 229 | + <div panel-name="testlist-提交PO" class="panel"> |
185 | <div class="main-panel-header rounded-window-top"> | 230 | <div class="main-panel-header rounded-window-top"> |
186 | - <span class="header-content">Tests for 新增市场商品</span> | 231 | + <span class="header-content">Tests for 提交PO</span> |
187 | </div> <!-- main-panel-header rounded-window-top --> | 232 | </div> <!-- main-panel-header rounded-window-top --> |
188 | <div class="main-panel-content rounded-window-bottom"> | 233 | <div class="main-panel-content rounded-window-bottom"> |
189 | <ul> | 234 | <ul> |
190 | <li> | 235 | <li> |
191 | - <span class="test-name">addMarketGoods (1 class)</span> | 236 | + <span class="test-name">sendPO (3 classes)</span> |
192 | </li> | 237 | </li> |
193 | </ul> | 238 | </ul> |
194 | </div> <!-- main-panel-content rounded-window-bottom --> | 239 | </div> <!-- main-panel-content rounded-window-bottom --> |
195 | </div> <!-- panel --> | 240 | </div> <!-- panel --> |
196 | - <div panel-name="group-新增市场商品" class="panel"> | 241 | + <div panel-name="group-提交PO" class="panel"> |
197 | <div class="main-panel-header rounded-window-top"> | 242 | <div class="main-panel-header rounded-window-top"> |
198 | - <span class="header-content">Groups for 新增市场商品</span> | 243 | + <span class="header-content">Groups for 提交PO</span> |
199 | </div> <!-- main-panel-header rounded-window-top --> | 244 | </div> <!-- main-panel-header rounded-window-top --> |
200 | <div class="main-panel-content rounded-window-bottom"> | 245 | <div class="main-panel-content rounded-window-bottom"> |
201 | </div> <!-- main-panel-content rounded-window-bottom --> | 246 | </div> <!-- main-panel-content rounded-window-bottom --> |
202 | </div> <!-- panel --> | 247 | </div> <!-- panel --> |
203 | - <div panel-name="times-新增市场商品" class="panel"> | 248 | + <div panel-name="times-提交PO" class="panel"> |
204 | <div class="main-panel-header rounded-window-top"> | 249 | <div class="main-panel-header rounded-window-top"> |
205 | - <span class="header-content">Times for 新增市场商品</span> | 250 | + <span class="header-content">Times for 提交PO</span> |
206 | </div> <!-- main-panel-header rounded-window-top --> | 251 | </div> <!-- main-panel-header rounded-window-top --> |
207 | <div class="main-panel-content rounded-window-bottom"> | 252 | <div class="main-panel-content rounded-window-bottom"> |
208 | <div class="times-div"> | 253 | <div class="times-div"> |
209 | <script type="text/javascript"> | 254 | <script type="text/javascript"> |
210 | -suiteTableInitFunctions.push('tableData_新增市场商品'); | ||
211 | -function tableData_新增市场商品() { | 255 | +suiteTableInitFunctions.push('tableData_提交PO'); |
256 | +function tableData_提交PO() { | ||
212 | var data = new google.visualization.DataTable(); | 257 | var data = new google.visualization.DataTable(); |
213 | data.addColumn('number', 'Number'); | 258 | data.addColumn('number', 'Number'); |
214 | data.addColumn('string', 'Method'); | 259 | data.addColumn('string', 'Method'); |
215 | data.addColumn('string', 'Class'); | 260 | data.addColumn('string', 'Class'); |
216 | data.addColumn('number', 'Time (ms)'); | 261 | data.addColumn('number', 'Time (ms)'); |
217 | -data.addRows(3); | 262 | +data.addRows(4); |
218 | data.setCell(0, 0, 0) | 263 | data.setCell(0, 0, 0) |
219 | -data.setCell(0, 1, 'addMarketGoods') | ||
220 | -data.setCell(0, 2, 'com.essa.testSuite.TestAddMarketGoods') | ||
221 | -data.setCell(0, 3, 37865); | 264 | +data.setCell(0, 1, 'conslidation') |
265 | +data.setCell(0, 2, 'com.buyer.testSuite.TestSendPO') | ||
266 | +data.setCell(0, 3, 29695); | ||
222 | data.setCell(1, 0, 1) | 267 | data.setCell(1, 0, 1) |
223 | -data.setCell(1, 1, 'auditMarketGoods') | ||
224 | -data.setCell(1, 2, 'com.essa.testSuite.TestAddMarketGoods') | ||
225 | -data.setCell(1, 3, 16655); | 268 | +data.setCell(1, 1, 'productInquiry') |
269 | +data.setCell(1, 2, 'com.essa.testSuite.TestProductInquiry') | ||
270 | +data.setCell(1, 3, 15888); | ||
226 | data.setCell(2, 0, 2) | 271 | data.setCell(2, 0, 2) |
227 | -data.setCell(2, 1, 'toMarketGoodsRelesePage') | ||
228 | -data.setCell(2, 2, 'com.essa.testSuite.TestAddMarketGoods') | ||
229 | -data.setCell(2, 3, 6275); | ||
230 | -window.suiteTableData['新增市场商品']= { tableData: data, tableDiv: 'times-div-新增市场商品'} | 272 | +data.setCell(2, 1, 'addSku') |
273 | +data.setCell(2, 2, 'com.buyer.testSuite.TestAddToCart') | ||
274 | +data.setCell(2, 3, 12739); | ||
275 | +data.setCell(3, 0, 3) | ||
276 | +data.setCell(3, 1, 'sendPO') | ||
277 | +data.setCell(3, 2, 'com.buyer.testSuite.TestSendPO') | ||
278 | +data.setCell(3, 3, 12651); | ||
279 | +window.suiteTableData['提交PO']= { tableData: data, tableDiv: 'times-div-提交PO'} | ||
231 | return data; | 280 | return data; |
232 | } | 281 | } |
233 | </script> | 282 | </script> |
234 | <span class="suite-total-time">Total running time: 1 minutes</span> | 283 | <span class="suite-total-time">Total running time: 1 minutes</span> |
235 | - <div id="times-div-新增市场商品"> | ||
236 | - </div> <!-- times-div-新增市场商品 --> | 284 | + <div id="times-div-提交PO"> |
285 | + </div> <!-- times-div-提交PO --> | ||
237 | </div> <!-- times-div --> | 286 | </div> <!-- times-div --> |
238 | </div> <!-- main-panel-content rounded-window-bottom --> | 287 | </div> <!-- main-panel-content rounded-window-bottom --> |
239 | </div> <!-- panel --> | 288 | </div> <!-- panel --> |
240 | - <div panel-name="reporter-新增市场商品" class="panel"> | 289 | + <div panel-name="reporter-提交PO" class="panel"> |
241 | <div class="main-panel-header rounded-window-top"> | 290 | <div class="main-panel-header rounded-window-top"> |
242 | - <span class="header-content">Reporter output for 新增市场商品</span> | 291 | + <span class="header-content">Reporter output for 提交PO</span> |
243 | </div> <!-- main-panel-header rounded-window-top --> | 292 | </div> <!-- main-panel-header rounded-window-top --> |
244 | <div class="main-panel-content rounded-window-bottom"> | 293 | <div class="main-panel-content rounded-window-bottom"> |
245 | </div> <!-- main-panel-content rounded-window-bottom --> | 294 | </div> <!-- main-panel-content rounded-window-bottom --> |
246 | </div> <!-- panel --> | 295 | </div> <!-- panel --> |
247 | - <div panel-name="ignored-methods-新增市场商品" class="panel"> | 296 | + <div panel-name="ignored-methods-提交PO" class="panel"> |
248 | <div class="main-panel-header rounded-window-top"> | 297 | <div class="main-panel-header rounded-window-top"> |
249 | - <span class="header-content">0 ignored methods</span> | 298 | + <span class="header-content">1 ignored method</span> |
250 | </div> <!-- main-panel-header rounded-window-top --> | 299 | </div> <!-- main-panel-header rounded-window-top --> |
251 | <div class="main-panel-content rounded-window-bottom"> | 300 | <div class="main-panel-content rounded-window-bottom"> |
301 | + <div class="ignored-class-div"> | ||
302 | + <span class="ignored-class-name">com.buyer.testSuite.TestAddToCart</span> | ||
303 | + <div class="ignored-methods-div"> | ||
304 | + <span class="ignored-method-name">keywordToCart</span> | ||
305 | + <br/> | ||
306 | + </div> <!-- ignored-methods-div --> | ||
307 | + </div> <!-- ignored-class-div --> | ||
252 | </div> <!-- main-panel-content rounded-window-bottom --> | 308 | </div> <!-- main-panel-content rounded-window-bottom --> |
253 | </div> <!-- panel --> | 309 | </div> <!-- panel --> |
254 | - <div panel-name="chronological-新增市场商品" class="panel"> | 310 | + <div panel-name="chronological-提交PO" class="panel"> |
255 | <div class="main-panel-header rounded-window-top"> | 311 | <div class="main-panel-header rounded-window-top"> |
256 | <span class="header-content">Methods in chronological order</span> | 312 | <span class="header-content">Methods in chronological order</span> |
257 | </div> <!-- main-panel-header rounded-window-top --> | 313 | </div> <!-- main-panel-header rounded-window-top --> |
258 | <div class="main-panel-content rounded-window-bottom"> | 314 | <div class="main-panel-content rounded-window-bottom"> |
259 | <div class="chronological-class"> | 315 | <div class="chronological-class"> |
260 | - <div class="chronological-class-name">com.essa.testSuite.TestAddMarketGoods</div> <!-- chronological-class-name --> | 316 | + <div class="chronological-class-name">com.buyer.testSuite.TestAddToCart</div> <!-- chronological-class-name --> |
261 | <div class="configuration-class before"> | 317 | <div class="configuration-class before"> |
262 | <span class="method-name">setUp</span> | 318 | <span class="method-name">setUp</span> |
263 | <span class="method-start">0 ms</span> | 319 | <span class="method-start">0 ms</span> |
264 | </div> <!-- configuration-class before --> | 320 | </div> <!-- configuration-class before --> |
265 | <div class="test-method"> | 321 | <div class="test-method"> |
266 | - <span class="method-name">toMarketGoodsRelesePage</span> | ||
267 | - <span class="method-start">9401 ms</span> | 322 | + <span class="method-name">addSku</span> |
323 | + <span class="method-start">9513 ms</span> | ||
268 | </div> <!-- test-method --> | 324 | </div> <!-- test-method --> |
325 | + <div class="configuration-class after"> | ||
326 | + <span class="method-name">tearDown</span> | ||
327 | + <span class="method-start">22254 ms</span> | ||
328 | + </div> <!-- configuration-class after --> | ||
329 | + </div> <!-- chronological-class --> | ||
330 | + <div class="chronological-class"> | ||
331 | + <div class="chronological-class-name">com.essa.testSuite.TestProductInquiry</div> <!-- chronological-class-name --> | ||
332 | + <div class="configuration-class before"> | ||
333 | + <span class="method-name">setUp</span> | ||
334 | + <span class="method-start">23031 ms</span> | ||
335 | + </div> <!-- configuration-class before --> | ||
336 | + <div class="test-method"> | ||
337 | + <span class="method-name">productInquiry</span> | ||
338 | + <span class="method-start">31534 ms</span> | ||
339 | + </div> <!-- test-method --> | ||
340 | + <div class="configuration-class after"> | ||
341 | + <span class="method-name">tearDown</span> | ||
342 | + <span class="method-start">47422 ms</span> | ||
343 | + </div> <!-- configuration-class after --> | ||
344 | + </div> <!-- chronological-class --> | ||
345 | + <div class="chronological-class"> | ||
346 | + <div class="chronological-class-name">com.buyer.testSuite.TestSendPO</div> <!-- chronological-class-name --> | ||
347 | + <div class="configuration-class before"> | ||
348 | + <span class="method-name">setUp</span> | ||
349 | + <span class="method-start">48238 ms</span> | ||
350 | + </div> <!-- configuration-class before --> | ||
269 | <div class="test-method"> | 351 | <div class="test-method"> |
270 | - <span class="method-name">addMarketGoods</span> | ||
271 | - <span class="method-start">15678 ms</span> | 352 | + <span class="method-name">conslidation</span> |
353 | + <span class="method-start">56420 ms</span> | ||
272 | </div> <!-- test-method --> | 354 | </div> <!-- test-method --> |
273 | <div class="test-method"> | 355 | <div class="test-method"> |
274 | - <span class="method-name">auditMarketGoods</span> | ||
275 | - <span class="method-start">53544 ms</span> | 356 | + <span class="method-name">sendPO</span> |
357 | + <span class="method-start">86116 ms</span> | ||
276 | </div> <!-- test-method --> | 358 | </div> <!-- test-method --> |
277 | <div class="configuration-class after"> | 359 | <div class="configuration-class after"> |
278 | <span class="method-name">tearDown</span> | 360 | <span class="method-name">tearDown</span> |
279 | - <span class="method-start">70199 ms</span> | 361 | + <span class="method-start">98767 ms</span> |
280 | </div> <!-- configuration-class after --> | 362 | </div> <!-- configuration-class after --> |
281 | </div> <!-- main-panel-content rounded-window-bottom --> | 363 | </div> <!-- main-panel-content rounded-window-bottom --> |
282 | </div> <!-- panel --> | 364 | </div> <!-- panel --> |
test-output/old/index.html
@@ -4,6 +4,6 @@ | @@ -4,6 +4,6 @@ | ||
4 | </head><body> | 4 | </head><body> |
5 | <h2><p align='center'>Test results</p></h2> | 5 | <h2><p align='center'>Test results</p></h2> |
6 | <table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr> | 6 | <table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr> |
7 | -<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>3</em></td><td><em>0</em></td><td><em>0</em></td><td> </td></tr> | ||
8 | -<tr align='center' class='invocation-passed'><td><a href='新增市场商品/index.html'>新增市场商品</a></td> | ||
9 | -<td>3</td><td>0</td><td>0</td><td><a href='新增市场商品/testng.xml.html'>Link</a></td></tr></table></body></html> | 7 | +<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>4</em></td><td><em>0</em></td><td><em>0</em></td><td> </td></tr> |
8 | +<tr align='center' class='invocation-passed'><td><a href='提交PO/index.html'>提交PO</a></td> | ||
9 | +<td>4</td><td>0</td><td>0</td><td><a href='提交PO/testng.xml.html'>Link</a></td></tr></table></body></html> |
test-output/testng-results.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | -<testng-results ignored="0" total="3" passed="3" failed="0" skipped="0"> | 2 | +<testng-results ignored="1" total="5" passed="4" failed="0" skipped="0"> |
3 | <reporter-output> | 3 | <reporter-output> |
4 | </reporter-output> | 4 | </reporter-output> |
5 | - <suite started-at="2018-08-24T02:59:34Z" name="新增市场商品" finished-at="2018-08-24T03:00:45Z" duration-ms="71013"> | 5 | + <suite started-at="2018-09-03T08:27:14Z" name="提交PO" finished-at="2018-09-03T08:28:53Z" duration-ms="99569"> |
6 | <groups> | 6 | <groups> |
7 | </groups> | 7 | </groups> |
8 | - <test started-at="2018-08-24T02:59:34Z" name="addMarketGoods" finished-at="2018-08-24T03:00:45Z" duration-ms="71013"> | ||
9 | - <class name="com.essa.testSuite.TestAddMarketGoods"> | ||
10 | - <test-method is-config="true" signature="setUp()[pri:0, instance:com.essa.testSuite.TestAddMarketGoods@656d9a07]" started-at="2018-08-24T02:59:34Z" name="setUp" finished-at="2018-08-24T02:59:43Z" duration-ms="9388" status="PASS"> | 8 | + <test started-at="2018-09-03T08:27:14Z" name="sendPO" finished-at="2018-09-03T08:28:53Z" duration-ms="99569"> |
9 | + <class name="com.essa.testSuite.TestProductInquiry"> | ||
10 | + <test-method is-config="true" signature="setUp()[pri:0, instance:com.essa.testSuite.TestProductInquiry@14485d7]" started-at="2018-09-03T08:27:37Z" name="setUp" finished-at="2018-09-03T08:27:45Z" duration-ms="8503" status="PASS"> | ||
11 | <reporter-output> | 11 | <reporter-output> |
12 | </reporter-output> | 12 | </reporter-output> |
13 | </test-method> <!-- setUp --> | 13 | </test-method> <!-- setUp --> |
14 | - <test-method signature="toMarketGoodsRelesePage()[pri:0, instance:com.essa.testSuite.TestAddMarketGoods@656d9a07]" started-at="2018-08-24T02:59:43Z" name="toMarketGoodsRelesePage" finished-at="2018-08-24T02:59:50Z" duration-ms="6275" status="PASS"> | 14 | + <test-method signature="productInquiry()[pri:0, instance:com.essa.testSuite.TestProductInquiry@14485d7]" started-at="2018-09-03T08:27:45Z" name="productInquiry" description="成品询价流程" finished-at="2018-09-03T08:28:01Z" duration-ms="15888" status="PASS"> |
15 | <reporter-output> | 15 | <reporter-output> |
16 | </reporter-output> | 16 | </reporter-output> |
17 | - </test-method> <!-- toMarketGoodsRelesePage --> | ||
18 | - <test-method signature="addMarketGoods()[pri:0, instance:com.essa.testSuite.TestAddMarketGoods@656d9a07]" started-at="2018-08-24T02:59:50Z" name="addMarketGoods" finished-at="2018-08-24T03:00:28Z" duration-ms="37865" status="PASS"> | 17 | + </test-method> <!-- productInquiry --> |
18 | + <test-method is-config="true" signature="tearDown()[pri:0, instance:com.essa.testSuite.TestProductInquiry@14485d7]" started-at="2018-09-03T08:28:01Z" name="tearDown" finished-at="2018-09-03T08:28:02Z" duration-ms="815" status="PASS"> | ||
19 | <reporter-output> | 19 | <reporter-output> |
20 | </reporter-output> | 20 | </reporter-output> |
21 | - </test-method> <!-- addMarketGoods --> | ||
22 | - <test-method signature="auditMarketGoods()[pri:0, instance:com.essa.testSuite.TestAddMarketGoods@656d9a07]" started-at="2018-08-24T03:00:28Z" name="auditMarketGoods" finished-at="2018-08-24T03:00:44Z" duration-ms="16655" status="PASS"> | 21 | + </test-method> <!-- tearDown --> |
22 | + </class> <!-- com.essa.testSuite.TestProductInquiry --> | ||
23 | + <class name="com.buyer.testSuite.TestSendPO"> | ||
24 | + <test-method is-config="true" signature="setUp()[pri:0, instance:com.buyer.testSuite.TestSendPO@47b60fe8]" started-at="2018-09-03T08:28:02Z" name="setUp" finished-at="2018-09-03T08:28:10Z" duration-ms="8182" status="PASS"> | ||
25 | + <reporter-output> | ||
26 | + </reporter-output> | ||
27 | + </test-method> <!-- setUp --> | ||
28 | + <test-method signature="conslidation()[pri:0, instance:com.buyer.testSuite.TestSendPO@47b60fe8]" started-at="2018-09-03T08:28:10Z" name="conslidation" description="开始拼柜" finished-at="2018-09-03T08:28:40Z" duration-ms="29695" status="PASS"> | ||
29 | + <reporter-output> | ||
30 | + </reporter-output> | ||
31 | + </test-method> <!-- conslidation --> | ||
32 | + <test-method signature="sendPO()[pri:0, instance:com.buyer.testSuite.TestSendPO@47b60fe8]" started-at="2018-09-03T08:28:40Z" name="sendPO" description="设置贴纸唛头,提交PO" finished-at="2018-09-03T08:28:52Z" duration-ms="12651" status="PASS"> | ||
33 | + <reporter-output> | ||
34 | + </reporter-output> | ||
35 | + </test-method> <!-- sendPO --> | ||
36 | + <test-method is-config="true" signature="tearDown()[pri:0, instance:com.buyer.testSuite.TestSendPO@47b60fe8]" started-at="2018-09-03T08:28:52Z" name="tearDown" finished-at="2018-09-03T08:28:53Z" duration-ms="795" status="PASS"> | ||
37 | + <reporter-output> | ||
38 | + </reporter-output> | ||
39 | + </test-method> <!-- tearDown --> | ||
40 | + </class> <!-- com.buyer.testSuite.TestSendPO --> | ||
41 | + <class name="com.buyer.testSuite.TestAddToCart"> | ||
42 | + <test-method is-config="true" signature="setUp()[pri:0, instance:com.buyer.testSuite.TestAddToCart@14b27f40]" started-at="2018-09-03T08:27:14Z" name="setUp" finished-at="2018-09-03T08:27:23Z" duration-ms="9503" status="PASS"> | ||
43 | + <reporter-output> | ||
44 | + </reporter-output> | ||
45 | + </test-method> <!-- setUp --> | ||
46 | + <test-method signature="addSku()[pri:0, instance:com.buyer.testSuite.TestAddToCart@14b27f40]" started-at="2018-09-03T08:27:23Z" name="addSku" description="将sku加入购物车" finished-at="2018-09-03T08:27:36Z" duration-ms="12739" status="PASS"> | ||
23 | <reporter-output> | 47 | <reporter-output> |
24 | </reporter-output> | 48 | </reporter-output> |
25 | - </test-method> <!-- auditMarketGoods --> | ||
26 | - <test-method is-config="true" signature="tearDown()[pri:0, instance:com.essa.testSuite.TestAddMarketGoods@656d9a07]" started-at="2018-08-24T03:00:44Z" name="tearDown" finished-at="2018-08-24T03:00:45Z" duration-ms="800" status="PASS"> | 49 | + </test-method> <!-- addSku --> |
50 | + <test-method is-config="true" signature="tearDown()[pri:0, instance:com.buyer.testSuite.TestAddToCart@14b27f40]" started-at="2018-09-03T08:27:36Z" name="tearDown" finished-at="2018-09-03T08:27:37Z" duration-ms="775" status="PASS"> | ||
27 | <reporter-output> | 51 | <reporter-output> |
28 | </reporter-output> | 52 | </reporter-output> |
29 | </test-method> <!-- tearDown --> | 53 | </test-method> <!-- tearDown --> |
30 | - </class> <!-- com.essa.testSuite.TestAddMarketGoods --> | ||
31 | - </test> <!-- addMarketGoods --> | ||
32 | - </suite> <!-- 新增市场商品 --> | 54 | + </class> <!-- com.buyer.testSuite.TestAddToCart --> |
55 | + </test> <!-- sendPO --> | ||
56 | + </suite> <!-- 提交PO --> | ||
33 | </testng-results> | 57 | </testng-results> |