对代码注释进行优化

This commit is contained in:
seagull 2020-03-10 18:55:27 +08:00
parent 709b2b6b83
commit c3eeb50cc6
23 changed files with 2866 additions and 2865 deletions

View File

@ -42,11 +42,9 @@ import luckyclient.utils.config.AppiumConfig;
public class AppTestControl {
/**
* @param args
* @throws ClassNotFoundException
* 控制台模式调度计划执行用例
* @param planname
*/
public static void manualExecutionPlan(String planname) {
// 不记日志到数据库
serverOperation.exetype = 1;

View File

@ -62,10 +62,11 @@ public class AndroidBaseAppium {
}
/**
* @param args
* @throws IOException
* appium不支持中文输入 参考了robotium的以js方式为元素直接设置value的做法
* 利用Selenium中Webdriver执行js方法实现中文输入
* @param appium
* @param preferences
* @param value
*/
public static void sendChinese(AndroidDriver<AndroidElement> appium, String preferences, String value) {
org.openqa.selenium.JavascriptExecutor jse = (org.openqa.selenium.JavascriptExecutor) appium;
@ -73,8 +74,14 @@ public class AndroidBaseAppium {
}
/**
* @param args
* js webview 支持4.14.4
* @param appium
* @param sX
* @param sY
* @param eX
* @param eY
* @param duration
* @throws Exception
*/
public static void webViewSwipe(AndroidDriver<AndroidElement> appium, Double sX, Double sY, Double eX, Double eY,
Double duration) throws Exception {
@ -100,8 +107,13 @@ public class AndroidBaseAppium {
}
/**
* @param args
* 调用 ADB直接滑动 支持4.14.4
* @param appium
* @param sX
* @param sY
* @param eX
* @param eY
* @throws Exception
*/
public static void adbSwipe(AndroidDriver<AndroidElement> appium, Double sX, Double sY, Double eX, Double eY)
throws Exception {
@ -133,8 +145,11 @@ public class AndroidBaseAppium {
}
/**
* @param args
* 屏幕点击事件
* @param drivers
* @param x
* @param y
* @param duration
*/
public static void clickScreenForJs(AndroidDriver<AndroidElement> drivers, int x, int y, int duration) {
JavascriptExecutor js = (JavascriptExecutor) drivers;

View File

@ -68,8 +68,4 @@ public class AndroidCaseLocalDebug {
androiddriver.closeApp();
}
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
}
}

View File

@ -14,7 +14,7 @@ public class GetJsonActionParser implements ActionKeyWordParser {
/**
* 获取JSON字符串指定Key的值是
* @param actionKeyWord 动作关键字
* @param actionParams 动作关键字
* @param testResult 测试结果
*/
@Override

View File

@ -15,7 +15,10 @@ public class HeaderParser implements ActionKeyWordParser {
/**
* @param actionorder 动作关键字
* 动作关键字
* @param actionParams
* @param testResult
* @return
*/
@Override
public String parse(String actionParams, String testResult) {

View File

@ -19,7 +19,7 @@ public class JsonPathActionParser implements ActionKeyWordParser {
/**
* 通过jsonPath表达式获取JSON字符串指定值
* 仅支持返回值是String类型不支持List,如果jsonPath表达式返回的是List将抛出异常
* @param actionKeyWord 动作关键字
* @param actionParams 动作关键字
* @param testResult 测试结果
*/
@Override

View File

@ -15,7 +15,7 @@ public class SubCentreNumActionParser implements ActionKeyWordParser {
/**
* ½ØÈ¡²âÊÔ½á¹ûÖ¸¨¿ªÊ¼¼°½áÊøλÖÃ×Ö·û´®
* @param actionKeyWord 动作关键字
* @param actionParams 动作关键字
* @param testResult ²âÊÔ½á¹û
*/
@Override

View File

@ -14,7 +14,7 @@ public class SubCentresStrActionParser implements ActionKeyWordParser {
/**
* ½ØÈ¡²âÊÔ½á¹ûÖ¸¨¿ªÊ¼¼°½áÊøλÖÃ×Ö·û´®
* @param actionKeyWord 动作关键字
* @param actionParams 动作关键字
* @param testResult ²âÊÔ½á¹û
*/
@Override

View File

@ -14,7 +14,7 @@ public class SubStrRegxActionParser implements ActionKeyWordParser {
/**
* 获取JSON字符串指定Key的值采用正则匹配
* @param actionKeyWord 动作关键字
* @param actionParams 动作关键字
* @param testResult 测试结果
*/
@Override

View File

@ -14,7 +14,10 @@ public class ThreadWaitAction implements ActionKeyWordParser {
/**
* @param actionorder 动作关键字
* 动作关键字
* @param actionParams
* @param testResult
* @return
*/
@Override
public String parse(String actionParams, String testResult) {

View File

@ -24,9 +24,11 @@ import luckyclient.utils.LogUtil;
public class BatchTestCaseExecution {
/**
* @param args
* @throws ClassNotFoundException
* 创建线程池多线程执行用例
* @param projectname
* @param taskid
* @param batchcase
* @throws Exception
*/
public static void batchCaseExecuteForTast(String projectname,String taskid,String batchcase) throws Exception{

View File

@ -37,11 +37,10 @@ public class TestControl {
public static int THREAD_COUNT = 0;
/**
* @param args
* @throws ClassNotFoundException
* 控制台模式调度计划执行用例
* @param planname
* @throws Exception
*/
public static void manualExecutionPlan(String planname) throws Exception {
serverOperation.exetype = 1;
int threadcount = 10;
@ -82,11 +81,10 @@ public class TestControl {
}
/**
* @param args
* @throws ClassNotFoundException
* 计划任务模式调度计划执行用例
* @param task
* @throws Exception
*/
public static void taskExecutionPlan(TaskExecute task) throws Exception {
serverOperation.exetype = 0;
String taskid = task.getTaskId().toString();

View File

@ -33,8 +33,9 @@ import luckyclient.utils.LogUtil;
*/
public class WebTestCaseDebug {
/**
* @param executor
* @param sign 用于在WEB页面上调试用例时提供的接口
* 用于在WEB页面上调试用例时提供的接口
* @param caseIdStr
* @param userIdStr
*/
public static void oneCaseDebug(String caseIdStr, String userIdStr) {
Map<String, String> variable = new HashMap<>(0);

View File

@ -30,9 +30,10 @@ import luckyclient.utils.config.SysConfig;
public class BaseWebDrive {
/**
* @param args
* @throws IOException
* @throws IOException
* 进测试结果进行截图
* @param driver
* @param imgname
* @return
*/
public static Boolean webScreenShot(WebDriver driver,String imgname) {
Boolean result = false;

View File

@ -38,11 +38,9 @@ import luckyclient.utils.LogUtil;
public class WebTestControl {
/**
* @param args
* @throws ClassNotFoundException
* 控制台模式调度计划执行用例
* @param planname
*/
public static void manualExecutionPlan(String planname) {
// 不记日志到数据库
serverOperation.exetype = 1;

View File

@ -49,7 +49,7 @@ public class Ocr {
/**
* 读取生成的TXT文件中的验证码
* @param filePath
* @return
*/
private static String readTextFile() {
String lineTxt = "";

View File

@ -30,9 +30,10 @@ import luckyclient.utils.httputils.HttpRequest;
public class GetServerApi {
private static final String PREFIX = "/openGetApi";
/**
* 通过计划ID获取测试用例对象集
* @param planid
* @param planId
* @return
*/
public static List<ProjectCase> getCasesbyplanId(int planId) {
@ -98,7 +99,7 @@ public class GetServerApi {
/**
* 通过用例ID获取对象
* @param sign
* @param caseId
* @return
*/
public static ProjectCase cGetCaseByCaseId(Integer caseId) {
@ -124,7 +125,7 @@ public class GetServerApi {
/**
* 通过计划ID获取测试用例对象集
* @param planid
* @param taskId
* @return
*/
public static List<Integer> clientGetCaseListForUnSucByTaskId(Integer taskId) {

View File

@ -24,10 +24,11 @@ public class PostServerApi {
/**
* put web界面的数据到服务端
* @param sign
* @param executor
* @param loglevel
* @param detail
* @param userId
* @param caseId
* @param logLevel
* @param logDetail
* @param debugIsend
*/
public static void cPostDebugLog(Integer userId, Integer caseId, String logLevel, String logDetail,Integer debugIsend){
ProjectCaseDebug projectCaseDebug = new ProjectCaseDebug();
@ -107,9 +108,9 @@ public class PostServerApi {
/**
* 更新任务执行数据
* @param taskId
* @param casecount
* @author Seagull
* @date 2019年4月22日
* @param caseCount
* @param taskStatus
* @return
*/
public static String clientUpdateTaskExecuteData(Integer taskId, Integer caseCount, Integer taskStatus){
String str = "{\"taskId\":"+taskId+",\"caseCount\":"+caseCount+",\"taskStatus\":"+taskStatus+"}";
@ -120,9 +121,8 @@ public class PostServerApi {
/**
* 更新任务执行数据
* @param taskId
* @param casecount
* @author Seagull
* @date 2019年4月22日
* @param caseId
* @return
*/
public static String clientDeleteTaskCaseLog(Integer taskId, Integer caseId){
String str = "{\"taskId\":"+taskId+",\"caseId\":"+caseId+"}";
@ -132,10 +132,9 @@ public class PostServerApi {
/**
* 提取测试用例的详细日志以及结果
* @param taskId
* @param casecount
* @author Seagull
* @date 2019年4月22日
* @param taskName
* @param caseSign
* @return
*/
public static String getLogDetailResult(String taskName, String caseSign){
String str = "{\"taskName\":\""+taskName+"\",\"caseSign\":\""+caseSign+"\"}";

View File

@ -19,8 +19,6 @@ public class RmtShellExecutor {
* @param user 主机登陆用户名
* @param psw 主机登陆密码
* @param port 主机ssh2登陆端口如果取默认值-1
* @param privateKey 密钥文件路径
* @param passphrase 密钥的密码
* @param command Shell命令 cd /home/pospsettle/tomcat-7.0-7080/bin&&./restart.sh
*/
public static String sshShell(String ip, String user, String psw

View File

@ -29,8 +29,7 @@ public class DbOperation {
/**
* 执行SQL
* @param request
* @param response
* @param sql
* @throws Exception
*/
public String executeSql(String sql) throws Exception{
@ -54,8 +53,7 @@ public class DbOperation {
/**
* 执行SQL流水查询
* @param request
* @param response
* @param sql
* @throws SQLException
*/
public String executeQuery(String sql) throws Exception{

View File

@ -41,8 +41,7 @@ public class HttpRequest {
/**
* 字符串参数
*
* @param url
* @param repath
* @return
*/
public static String loadJSON(String repath) {
@ -80,9 +79,6 @@ public class HttpRequest {
/**
* 向指定 URL 发送POST方法的请求
*
* @param url
* 发送请求的 URL
* @param param
* 请求参数请求参数应该是 name1=value1&name2=value2 的形式
* @return 所代表远程资源的响应结果
@ -139,12 +135,7 @@ public class HttpRequest {
* 使用HttpClient以JSON格式发送post请求
* @param urlParam
* @param params
* @param charset
* @param headmsg
* @param cerpath
* @return
* @throws NoSuchAlgorithmException
* @throws KeyManagementException
*/
public static String httpClientPostJson(String urlParam, String params){
StringBuffer resultBuffer = null;

View File

@ -52,7 +52,6 @@ public class HttpImpl {
/**
* 运行自动化任务
* @param req
* @param res
* @return
* @throws RemoteException
*/