盖楼 003
盖楼 002
盖楼 001
可以的,要有自信
# 我第一次听到 1024 的时候有强迫症被 “为什么是 1024 不是 1023 “这种问题逼出内伤。。。。#
科普一下:
转发截图(示例):
可以简历先发我看看
社区像一座灯塔、为很多测试人指明了前进的方向!
额,我的意思其实复杂场景下依靠全局样式去做聚类会有局限性,一旦页面持续变化区域较大分类算法精度就不够准确,就类似前后帧的对比算法一样控制阀值也不靠谱。
我个人认为要做这一类的加载过程的判断,真正核心要解决的是通过算法感知页面内容的变化, 不仅是全局且要细化到局部。
轮播不一致不会产生新的分类? 分类结果应该被拟合才对?
页面存在轮播切换 gif 等
这种方案针对一些动态加载场景如果有效的检测结束帧?
加下群吧
哥们
姓名:李 XXX
Testerhome 帐号:arthur
测试经验:10 年以上
管理经验:
华为无线产品线,PL,3 年多测试管理经验
携程金融,测试经理,3 年测试管理经验
学霸君 Ai 学,测试经理,1 年测试管理经验
工作经历:
08 年加入华为,曾经在华为做过 6 年多自动化测试,性能测试,知识管理专家。
14 年加入携程金融,在携程金服,利用测试设计方案落地,版本规范控制,知识地图等规范动作。
17 年加入学霸君,在 ai 学团队,推动自动化持续集成落地,推出版本控制规范,申请页面加载测试专利 1 起。
加油 恒捷 ~加油 行业劳模 ~
世事多变迁,生活多磨难
善待生活 善待他人 善待自己。加油 !
抱团取暖
为啥这边这么火 我发的贴下面评论的人都没有····~~~~~~~~~~不服
不知道生成的 @ TestCase 可用率怎么样?有效性如何?生成后需要人干预的程度高吗?
package Trigger;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import net.sf.json.JSONObject;
import org.apache.http.HeaderIterator;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.CookieStore;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.cookie.CookieSpecProvider;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.cookie.BasicClientCookie;
import org.apache.http.impl.cookie.BestMatchSpecFactory;
import org.apache.http.impl.cookie.BrowserCompatSpecFactory;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
public class httpclient {
public static CookieStore cookieStore = new BasicCookieStore();
public CloseableHttpClient httpclient = HttpClients.custom().setDefaultCookieStore(cookieStore).build();
public static HttpClientContext context = null;
/**
* get 请求
* @param url
* @param Parameter
* @return
* @throws Exception
* @throws ClientProtocolException
*/
public JSONObject sendGet(String url, String Parameter) throws Exception {
StringBuffer responseStr=new StringBuffer();
try {
if(Parameter.isEmpty()==false){url=url + "?" + Parameter;}
HttpGet httpget = new HttpGet(url);
HttpResponse response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
System.out.println("----------------------------------------");
System.out.println(response.getStatusLine());
if (entity != null) {
System.out.println("Response content length: " + entity.getContentLength());
}
System.out.println("----------------------------------------");
InputStream inSm = entity.getContent();
Scanner inScn = new Scanner(inSm,"utf-8");
while (inScn.hasNextLine()) {
responseStr.append(inScn.nextLine().toString());
}
httpget.abort();
} finally {
httpclient.getConnectionManager().shutdown();
}
System.out.println("Response:");
System.out.println("----------------------------------------");
System.out.println(responseStr.toString());
System.out.println("----------------------------------------");
return JSONObject.fromObject(responseStr.toString().trim());
}
/**
* 用 post 请求
* @param url
* @param parameter
* @return
*/
public JSONObject sendPost(String url, String parameter) {
String Response =new String();
HttpPost httpPost = new HttpPost(url);
List formParams = new ArrayList();
FormatProcessing(formParams,parameter);
UrlEncodedFormEntity urlEncodedFormEntity;
try {
urlEncodedFormEntity = new UrlEncodedFormEntity(formParams, "UTF-8");
httpPost.setEntity(urlEncodedFormEntity);
httpPost.setHeader("Content-Type","application/x-www-form-urlencoded");
System.out.println("execurting request:" + httpPost.getURI()+"\nparameter:"+parameter);
HttpResponse httpResponse = null;
httpResponse = httpclient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
if (httpEntity != null) {
String content = EntityUtils.toString(httpEntity, "UTF-8");
Response=content;
}
printResponse(httpResponse);
setContext();
setCookieStore(httpResponse);
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
//关闭连接,释放资源
httpclient.getConnectionManager().shutdown();
}
System.out.println("Response:");
System.out.println("----------------------------------------");
System.out.println(Response.toString());
System.out.println("----------------------------------------");
return JSONObject.fromObject(Response.toString().trim());
}
/**
* Post 入参转换成 List
* @param formParams
* @param parameter
*/
public static void FormatProcessing (List formParams, String parameter){
try{
String value[] =parameter.split("&");
for(int i=0;i<value.length;i++){
String keyword[]=value[i].split("=");
formParams.add(new BasicNameValuePair(keyword[0], keyword[1]));
}}catch(Exception e){
e.printStackTrace();
System.out.println("入参转换失败");
}
}
/**
* 打印 httpResponse
* @param httpResponse
* @throws ParseException
* @throws IOException
*/
public static void printResponse(HttpResponse httpResponse) throws ParseException, IOException {
HttpEntity entity = httpResponse.getEntity();
System.out.println("status:" + httpResponse.getStatusLine());
HeaderIterator iterator = httpResponse.headerIterator();
while (iterator.hasNext()) {
System.out.println("\t" + iterator.next());
}
if (entity != null) {
try {
String responseString = EntityUtils.toString(entity, "UTF-8");
}catch(Exception E){}
}
}
/**
* 保留 cookie
* @param httpResponse
*/
public static void setCookieStore(HttpResponse httpResponse) {
String setCookie =new String();
if(httpResponse.getFirstHeader("Set-Cookie")!=null) {
setCookie = httpResponse.getFirstHeader("Set-Cookie").getValue();
}
String JSESSIONID =new String();
if(setCookie.isEmpty()==false) {
JSESSIONID = setCookie.substring("JSESSIONID=".length(),
setCookie.indexOf(";"));
}
// 新建一个 Cookie
BasicClientCookie cookie = new BasicClientCookie("JSESSIONID",
JSESSIONID);
cookie.setVersion(0);
cookie.setDomain("127.0.0.1");
cookie.setPath("/CwlProClient");
cookieStore.addCookie(cookie);
}
/**
* 设置 Context
*/
public static void setContext() {
context = HttpClientContext.create();
Registry registry = RegistryBuilder
. create()
.register(CookieSpecs.BEST_MATCH, new BestMatchSpecFactory())
.register(CookieSpecs.BROWSER_COMPATIBILITY,
new BrowserCompatSpecFactory()).build();
context.setCookieSpecRegistry(registry);
context.setCookieStore(cookieStore);
}
/**
* tmain
* @param args
* @throws Exception
/
public static void main(String[] args) throws Exception {
Trigger.httpclient api=new httpclient();
String url ="http://30.17.1.73:8080/APIInterface/GetUserList";
String data="page=1&limit=3";
System.out.println("response:"+api.sendGet(url,data));
/ String url ="http://30.17.1.73:8080/APIInterface/InsertProject";
String data="name=test&remark=test&createuser=test&type=1";
System.out.println(api.sendPost(url,data));*/
}
}
非常棒
非常好的团队 非常棒的老板 推荐 @!!
顶一下 ~
帖子写的不错,但却看到最后这是硬广呀
逝者安息🙏