Commit eb7c5de7 authored by 张艳玲's avatar 张艳玲

修改目录

parent f5e48399
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="kjj" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="1.8">
<module name="kejiji" target="1.8" />
</bytecodeTargetLevel>
......
......@@ -7,13 +7,6 @@
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
......@@ -488,4 +488,5 @@ public class Article {
network.agentCookies.put("tku",AGENT_TKU); //tku 切换为访客的
apiCount += 13;
}
}
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
......@@ -13,7 +13,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
public class Boss {
private static final NetworkUtils network = NetworkUtils.getInstance();
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import com.kjj.qa.utils.BaseUtils;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
......@@ -14,13 +14,13 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.BOSS_CREATE;
import static com.kjj.qa.config.BasicConfig.BOSS_DETAIL;
import static com.kjj.qa.config.BasicConfig.BOSS_EDITCONFIG;
import static com.kjj.qa.config.BasicConfig.BOSS_ISDEMO;
import static com.kjj.qa.config.BasicConfig.BOSS_PUBLISH;
import static com.kjj.qa.config.BasicConfig.BOSS_RECEIVERLIST;
import static com.kjj.qa.config.BasicConfig.BOSS_TEAMTASKLIST;
import static com.kjj.config.BasicConfig.BOSS_CREATE;
import static com.kjj.config.BasicConfig.BOSS_DETAIL;
import static com.kjj.config.BasicConfig.BOSS_EDITCONFIG;
import static com.kjj.config.BasicConfig.BOSS_ISDEMO;
import static com.kjj.config.BasicConfig.BOSS_PUBLISH;
import static com.kjj.config.BasicConfig.BOSS_RECEIVERLIST;
import static com.kjj.config.BasicConfig.BOSS_TEAMTASKLIST;
public class BossTest {
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
......@@ -12,7 +12,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
public class CircleFriends {
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import com.kjj.qa.utils.BaseUtils;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
......@@ -12,7 +12,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
public class GreetingCard {
private static final NetworkUtils network = NetworkUtils.getInstance();
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.NetworkUtils;
import org.testng.annotations.*;
public class Home {
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
import static io.restassured.RestAssured.given;
import com.kjj.qa.utils.BaseUtils;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.*;
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import com.kjj.qa.utils.NetworkUtils;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
......@@ -12,20 +12,20 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.ISVIPSUBSCRIBE;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_APPRAISELISTNEW;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_COMPANYLIST;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_EDITBASEINFO;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_EDITMAJORGOODAUTH;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_GETQUESTIONS;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_ISDISPLAYACTIVITY;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_PERSONALPROFILE;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_PRODUCTLIST;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_SELLERCARDCASENEW;
import static com.kjj.qa.config.BasicConfig.SELLERCARD_TOPOFDETAIL;
import static com.kjj.qa.config.BasicConfig.VERSION_INFO;
import static com.kjj.qa.config.BasicConfig.WECHAT_NAME;
import static com.kjj.qa.config.BasicConfig.apiCount;
import static com.kjj.config.BasicConfig.ISVIPSUBSCRIBE;
import static com.kjj.config.BasicConfig.SELLERCARD_APPRAISELISTNEW;
import static com.kjj.config.BasicConfig.SELLERCARD_COMPANYLIST;
import static com.kjj.config.BasicConfig.SELLERCARD_EDITBASEINFO;
import static com.kjj.config.BasicConfig.SELLERCARD_EDITMAJORGOODAUTH;
import static com.kjj.config.BasicConfig.SELLERCARD_GETQUESTIONS;
import static com.kjj.config.BasicConfig.SELLERCARD_ISDISPLAYACTIVITY;
import static com.kjj.config.BasicConfig.SELLERCARD_PERSONALPROFILE;
import static com.kjj.config.BasicConfig.SELLERCARD_PRODUCTLIST;
import static com.kjj.config.BasicConfig.SELLERCARD_SELLERCARDCASENEW;
import static com.kjj.config.BasicConfig.SELLERCARD_TOPOFDETAIL;
import static com.kjj.config.BasicConfig.VERSION_INFO;
import static com.kjj.config.BasicConfig.WECHAT_NAME;
import static com.kjj.config.BasicConfig.apiCount;
public class SellerCard {
private static final NetworkUtils network = NetworkUtils.getInstance();
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
import static com.kjj.qa.config.BasicConfig.*;
import com.kjj.qa.utils.NetworkUtils;
import static com.kjj.config.BasicConfig.*;
import com.kjj.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.*;
......@@ -117,7 +117,7 @@ public class Upload {
@Test(description = "上传_本地视频",priority = 5)
public void 上传_本地视频() throws IOException {
//1.上传视频到oss
String videoFile = "src/test/java/com/kjj/qa/resource/uploadCase.mp4";
String videoFile = "src/test/java/com/kjj/resource/uploadCase.mp4";
Response response = network.postFileResponse(videoFile, UPLOAD_UPLOADVEDIO);
String videoUrl = response.jsonPath().getString("data.videoUrl");
String firstFrameUrl = response.jsonPath().getString("data.firstFrameUrl");
......
package com.kjj.qa.cases;
package com.kjj.cases.basics;
public class Video {
......
package com.kjj.qa.config;
package com.kjj.config;
public class BasicConfig {
public static int apiCount; //接口数量统计
// 是否开启钉钉机器人推送
public static final boolean isPushReport = true; //true
public static final boolean isPushReport = false; //true
// 代理人微信昵称
public static final String WECHAT_NAME = "客集集-梦晨"; //true
......
package com.kjj.qa.config;
package com.kjj.config;
import com.aventstack.extentreports.ExtentReports;
......@@ -14,7 +14,7 @@ import org.testng.xml.XmlSuite;
import java.io.File;
import java.util.*;
import com.kjj.qa.utils.DingTalkUtils;
import com.kjj.utils.DingTalkUtils;
public class ExtentTestNGIReporterListener implements IReporter {
// 生成的路径以及文件名
......@@ -79,29 +79,29 @@ public class ExtentTestNGIReporterListener implements IReporter {
// 统计SuiteResult下的数据
int passSize = r.getTestContext().getPassedTests().size();
int failSize = r.getTestContext().getFailedTests().size();
int skipSize = r.getTestContext().getSkippedTests().size();
// int skipSize = r.getTestContext().getSkippedTests().size();
suitePassSize += passSize;
suiteFailSize += failSize;
suiteSkipSize += skipSize;
// suiteSkipSize += skipSize;
if (failSize > 0) {
resultNode.getModel().setStatus(Status.FAIL);
}
resultNode.getModel().setDescription(
String.format("Pass: %s ; Fail: %s ; Skip: %s ;", passSize, failSize, skipSize));
String.format("Pass: %s ; Fail: %s ;", passSize, failSize));
}
buildTestNodes(resultNode, context.getFailedTests(), Status.FAIL);
buildTestNodes(resultNode, context.getSkippedTests(), Status.SKIP);
// buildTestNodes(resultNode, context.getSkippedTests(), Status.SKIP);
buildTestNodes(resultNode, context.getPassedTests(), Status.PASS);
}
if (suiteTest != null) {
suiteTest.getModel().setDescription(
String.format("Pass: %s ; Fail: %s ; Skip: %s ;", suitePassSize, suiteFailSize, suiteSkipSize));
String.format("Pass: %s ; Fail: %s ;", suitePassSize, suiteFailSize));
if (suiteFailSize > 0) {
suiteTest.getModel().setStatus(Status.FAIL);
}
}
String context = String.format("通过的用例数: %s\n失败的用例数: %s\n跳过的用例数: %s\n", suitePassSize, suiteFailSize, suiteSkipSize);
String context = String.format("通过的用例数: %s\n失败的用例数: %s\n", suitePassSize, suiteFailSize, suiteSkipSize);
try {
DingTalkUtils.sendVal(context);
} catch (Exception e) {
......
This diff is collapsed.
package com.kjj.qa.utils;
package com.kjj.utils;
import java.io.UnsupportedEncodingException;
......
package com.kjj.qa.utils;
package com.kjj.utils;
import io.restassured.response.Response;
import org.testng.Assert;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
import java.io.IOException;
import java.util.HashMap;
......
package com.kjj.qa.utils;
package com.kjj.utils;
import java.util.HashMap;
import javax.crypto.Cipher;
......
package com.kjj.qa.utils;
package com.kjj.utils;
import io.restassured.response.Response;
import static com.kjj.qa.config.BasicConfig.*;
import static com.kjj.config.BasicConfig.*;
import java.util.HashMap;
import java.util.Map;
......@@ -17,7 +17,7 @@ public class DingTalkUtils {
+ context
+ "总接口数:"+ apiCount + "\n"
+ "报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n"
+ "@李浩弘 @张震 @别湘灵 @张艳玲 @张慧锋";
+ "@张慧锋 @张艳玲 @张震 @别湘灵";
System.out.println(context);
......
package com.kjj.qa.utils;
import static com.kjj.qa.config.BasicConfig.*;
package com.kjj.utils;
import static com.kjj.config.BasicConfig.*;
import static io.restassured.RestAssured.*;
import com.alibaba.fastjson.JSONObject;
......
......@@ -13,47 +13,47 @@
<!-- </test>-->
<test preserve-order="true" name="支付">
<classes>
<class name="com.kjj.qa.cases.Pay"/>
<class name="com.kjj.cases.basics.Pay"/>
</classes>
</test>
<test preserve-order="true" name="名片">
<classes>
<class name="com.kjj.qa.cases.SellerCard"/>
<class name="com.kjj.cases.basics.SellerCard"/>
</classes>
</test>
<test preserve-order="true" name="上传">
<classes>
<class name="com.kjj.qa.cases.Upload"/>
<class name="com.kjj.cases.basics.Upload"/>
</classes>
</test>
<test preserve-order="true" name="文章">
<classes>
<class name="com.kjj.qa.cases.Article"/>
<class name="com.kjj.cases.basics.Article"/>
</classes>
</test>
<test preserve-order="true" name="发圈">
<classes>
<class name="com.kjj.qa.cases.CircleFriends"/>
<class name="com.kjj.cases.basics.CircleFriends"/>
</classes>
</test>
<test preserve-order="true" name="boss看板">
<classes>
<class name="com.kjj.qa.cases.Boss"/>
<class name="com.kjj.cases.basics.Boss"/>
</classes>
</test>
<test preserve-order="true" name="boss看板演示版">
<classes>
<class name="com.kjj.qa.cases.BossTest"/>
<class name="com.kjj.cases.basics.BossTest"/>
</classes>
</test>
<test preserve-order="true" name="贺卡">
<classes>
<class name="com.kjj.qa.cases.GreetingCard"/>
<class name="com.kjj.cases.basics.GreetingCard"/>
</classes>
</test>
<!-- 监听器-->
<listeners>
<listener class-name="com.kjj.qa.config.ExtentTestNGIReporterListener"/>
<listener class-name="com.kjj.config.ExtentTestNGIReporterListener"/>
</listeners>
</suite>
<!-- Suite -->
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment