Improvement #12 调整命名,.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
echo [INFO] run all functional test.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
|
||||
call mvn clean integration-test -Pintegration-test
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -5,7 +5,7 @@ cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS%
|
||||
call mvn antrun:run -Prefreshdb
|
||||
call mvn antrun:run -Prefresh-db
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -1,11 +1,11 @@
|
||||
@echo off
|
||||
echo [INFO] run daily functional test.
|
||||
echo [INFO] run smoking functional test.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
|
||||
call mvn clean integration-test
|
||||
call mvn clean integration-test -Psmoke-test
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -216,15 +216,6 @@
|
||||
<argLine>-Xmx256M</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>org.springside.examples.miniservice.functional.category.Daily</groups>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- cobertura插件, 设置不需要计算覆盖率的类 -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
@@ -292,7 +283,56 @@
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>refreshdb</id>
|
||||
<id>smoke-test</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 屏蔽单元测试执行 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 , 仅执行smoke test-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>org.springside.examples.miniservice.functional.category.Smoke</groups>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>integration-test</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 屏蔽单元测试执行 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 , 仅执行smoke test-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>refresh-db</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package org.springside.examples.miniservice.functional.category;
|
||||
|
||||
public class Daily {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package org.springside.examples.miniservice.functional.category;
|
||||
|
||||
/**
|
||||
* 冒烟测试标签, 标识快速运行的关键集成测试用例。
|
||||
*
|
||||
* @author calvin
|
||||
*/
|
||||
public class Smoke {
|
||||
}
|
||||
+4
-4
@@ -13,7 +13,7 @@ import org.springside.examples.miniservice.Start;
|
||||
import org.springside.examples.miniservice.data.AccountData;
|
||||
import org.springside.examples.miniservice.entity.User;
|
||||
import org.springside.examples.miniservice.functional.BaseFunctionalTestCase;
|
||||
import org.springside.examples.miniservice.functional.category.Daily;
|
||||
import org.springside.examples.miniservice.functional.category.Smoke;
|
||||
import org.springside.examples.miniservice.webservice.dto.DepartmentDTO;
|
||||
import org.springside.examples.miniservice.webservice.dto.UserDTO;
|
||||
import org.springside.examples.miniservice.webservice.rs.client.AccountResourceClient;
|
||||
@@ -31,7 +31,7 @@ public class AccountResourceServiceIT extends BaseFunctionalTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void getDeptartmentDetail() {
|
||||
DepartmentDTO department = client.getDepartmentDetail(1L);
|
||||
assertEquals("Development", department.getName());
|
||||
@@ -50,7 +50,7 @@ public class AccountResourceServiceIT extends BaseFunctionalTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void searchUser() {
|
||||
List<UserDTO> result = client.searchUser(null, null);
|
||||
assertTrue(result.size() > 1);
|
||||
@@ -60,7 +60,7 @@ public class AccountResourceServiceIT extends BaseFunctionalTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void createUser() {
|
||||
User user = AccountData.getRandomUser();
|
||||
UserDTO dto = new DozerBeanMapper().map(user, UserDTO.class);
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import org.springside.examples.miniservice.Start;
|
||||
import org.springside.examples.miniservice.data.AccountData;
|
||||
import org.springside.examples.miniservice.entity.User;
|
||||
import org.springside.examples.miniservice.functional.BaseFunctionalTestCase;
|
||||
import org.springside.examples.miniservice.functional.category.Daily;
|
||||
import org.springside.examples.miniservice.functional.category.Smoke;
|
||||
import org.springside.examples.miniservice.webservice.dto.UserDTO;
|
||||
import org.springside.examples.miniservice.webservice.ws.AccountWebService;
|
||||
import org.springside.examples.miniservice.webservice.ws.result.UserListResult;
|
||||
@@ -44,7 +44,7 @@ public class AccountWebServiceIT extends BaseFunctionalTestCase {
|
||||
* 测试创建用户,在Spring applicaitonContext.xml中用<jaxws:client/>创建Client.
|
||||
*/
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void createUser() {
|
||||
User user = AccountData.getRandomUser();
|
||||
|
||||
@@ -80,7 +80,7 @@ public class AccountWebServiceIT extends BaseFunctionalTestCase {
|
||||
* 测试搜索用户,使用CXF的API自行动态创建Client.
|
||||
*/
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void searchUser() {
|
||||
String address = Start.TEST_BASE_URL + "/ws/accountservice";
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
echo [INFO] run all functional test.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
|
||||
call mvn clean integration-test -Pintegration-test
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -5,7 +5,7 @@ cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS%
|
||||
call mvn antrun:run -Prefreshdb
|
||||
call mvn antrun:run -Prefresh-db
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -1,11 +1,11 @@
|
||||
@echo off
|
||||
echo [INFO] run daily functional test.
|
||||
echo [INFO] run smoking functional test.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
|
||||
call mvn clean integration-test
|
||||
call mvn clean integration-test -Psmoke-test
|
||||
|
||||
cd bin
|
||||
pause
|
||||
+50
-10
@@ -261,15 +261,6 @@
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>org.springside.examples.miniweb.functional.category.Daily</groups>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- cobertura插件, 设置不需要计算覆盖率的类 -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
@@ -311,7 +302,56 @@
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>refreshdb</id>
|
||||
<id>smoke-test</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 屏蔽单元测试执行 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 , 仅执行smoke test-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>org.springside.examples.miniservice.functional.category.Smoke</groups>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>integration-test</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 屏蔽单元测试执行 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 , 仅执行smoke test-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>refresh-db</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ import org.springside.examples.miniweb.entity.account.User;
|
||||
import org.springside.examples.miniweb.functional.BaseFunctionalTestCase;
|
||||
import org.springside.examples.miniweb.functional.Gui;
|
||||
import org.springside.examples.miniweb.functional.Gui.UserColumn;
|
||||
import org.springside.examples.miniweb.functional.category.Daily;
|
||||
import org.springside.examples.miniweb.functional.category.Smoke;
|
||||
import org.springside.modules.utils.Collections3;
|
||||
import org.springside.modules.utils.Threads;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class UserManagerIT extends BaseFunctionalTestCase {
|
||||
* 查看用户列表.
|
||||
*/
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void viewUserList() {
|
||||
s.click(By.linkText(Gui.MENU_USER));
|
||||
WebElement table = s.findElement(By.id("contentTable"));
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package org.springside.examples.miniweb.functional.category;
|
||||
|
||||
public class Daily {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package org.springside.examples.miniweb.functional.category;
|
||||
|
||||
/**
|
||||
* 冒烟测试标签, 标识快速运行的关键集成测试用例。
|
||||
*
|
||||
* @author calvin
|
||||
*/
|
||||
public class Smoke {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
echo [INFO] run all functional test.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
|
||||
call mvn clean integration-test -Pintegration-test
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -5,7 +5,7 @@ cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS%
|
||||
call mvn antrun:run -Prefreshdb
|
||||
call mvn antrun:run -Prefresh-db
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -1,11 +1,11 @@
|
||||
@echo off
|
||||
echo [INFO] run daily functional test.
|
||||
echo [INFO] run smoking functional test.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
|
||||
call mvn clean integration-test
|
||||
call mvn clean integration-test -Psmoke-test
|
||||
|
||||
cd bin
|
||||
pause
|
||||
+50
-10
@@ -405,15 +405,6 @@
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>org.springside.examples.showcase.functional.category.Daily</groups>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- cobertura插件 ,取消不需要计算覆盖率的类 -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
@@ -455,7 +446,56 @@
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>refreshdb</id>
|
||||
<id>smoke-test</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 屏蔽单元测试执行 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 , 仅执行smoke test-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>org.springside.examples.miniservice.functional.category.Smoke</groups>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>integration-test</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 屏蔽单元测试执行 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 运行integration-test的插件 , 仅执行smoke test-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>refresh-db</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package org.springside.examples.showcase.functional.category;
|
||||
|
||||
public class Daily {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package org.springside.examples.showcase.functional.category;
|
||||
|
||||
/**
|
||||
* 冒烟测试标签, 标识快速运行的关键集成测试用例。
|
||||
*
|
||||
* @author calvin
|
||||
*/
|
||||
public class Smoke {
|
||||
}
|
||||
+2
-2
@@ -6,7 +6,7 @@ import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.openqa.selenium.By;
|
||||
import org.springside.examples.showcase.functional.BaseSeleniumTestCase;
|
||||
import org.springside.examples.showcase.functional.category.Daily;
|
||||
import org.springside.examples.showcase.functional.category.Smoke;
|
||||
|
||||
/**
|
||||
* 用户管理的功能测试.
|
||||
@@ -16,7 +16,7 @@ import org.springside.examples.showcase.functional.category.Daily;
|
||||
public class UserManagerIT extends BaseSeleniumTestCase {
|
||||
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void list() {
|
||||
s.open("/");
|
||||
s.click(By.linkText("综合演示"));
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.springside.examples.showcase.Start;
|
||||
import org.springside.examples.showcase.functional.BaseFunctionalTestCase;
|
||||
import org.springside.examples.showcase.functional.category.Daily;
|
||||
import org.springside.examples.showcase.functional.category.Smoke;
|
||||
import org.springside.examples.showcase.webservice.rs.client.UserResourceClient;
|
||||
import org.springside.examples.showcase.webservice.rs.dto.UserDTO;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class UserResourceServiceIT extends BaseFunctionalTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Category(Daily.class)
|
||||
@Category(Smoke.class)
|
||||
public void getAllUser() {
|
||||
List<UserDTO> userList = client.getAllUser("admin", "admin");
|
||||
assertTrue(userList.size() >= 6);
|
||||
|
||||
Reference in New Issue
Block a user