51Testing软件测试论坛

标题: < 高级测试技术群,交流测试小工具开发、java的web编程 > [打印本页]

作者: tophqu    时间: 2009-1-4 23:34
标题: < 高级测试技术群,交流测试小工具开发、java的web编程 >
群号: 77782333  

在上海 张江镇 有兴趣加入的朋友,没有必要犹豫。。。。。。。

java自动化测试,如java执行bat文件

  Runtime runTime = Runtime.getRuntime();
  Process pr;
  try {
   pr = runTime.exec(".\\test.bat");

   // pr=runTime.exec("cmd.exe   /c   dir");
   // 将CMD控制台的打印屏幕输出
   StringBuffer sbOut = new StringBuffer(1000);
   BufferedReader br = new BufferedReader(new InputStreamReader(pr
     .getInputStream()));
   while (true) {
    // 程序会一直停在这里,所以还是不要这个的好。
    String s = br.readLine();
    if (s == null)
     break;
    // System.out.println(s);
    appendLogFile(s);
   }
   br.close();
   pr.waitFor();
   System.out.println(sbOut.toString());
   System.out.println("Exit   status:   " + pr.exitValue());

  } catch (Exception e) {
   e.printStackTrace();
  }0

[ 本帖最后由 tophqu 于 2009-2-5 20:24 编辑 ]
作者: ttyttt    时间: 2009-1-4 23:59
标题:
呵呵,太好了,顶,大家相互学习
作者: tophqu    时间: 2009-1-6 00:16
Dim rf As RunFactory
Set rf = td.RunFactory
Dim run1 As Run
Set run1 = rf.Item(1)
Dim sf As StepFactory
Set sf = run1.StepFactory
Dim step1 As Step
Set step1 = sf.Item(3)
step1.Status = "Passed"

将test lab的tests的step设为pass
作者: tophqu    时间: 2009-1-6 00:16
httpunit下载网页到本地
编辑 | 删除 | 权限设置 | 更多▼
设置置顶 推荐日志 转到私密记事本
软件测试交流    发表于2009年01月03日 21:22 阅读(5) 评论(0) 分类: 个人日记 权限: 公开


WebConversation wc = new WebConversation();
WebResponse   resp = wc.getResponse("http://user.qzone.qq.com/993543441");
String res=resp.getText();
FileWriter fw=new FileWriter("d:\\a.html");
fw.write(res);
fw.flush();
fw.close();
作者: bingdu520    时间: 2009-1-9 13:48
标题: 回复 1# 的帖子
加入,加入
作者: 917782861    时间: 2009-1-15 10:55
回贴才能看到吗?
作者: tophqu    时间: 2009-1-17 12:22
交技术积分了就能看
作者: love33160    时间: 2009-1-31 12:25
标题: `
支持楼主!顶一个


























走自己的路!!当当红孩子免费杀毒软件dhc抗战
作者: lxh460166    时间: 2009-2-3 16:28
看看
作者: bcat007    时间: 2009-2-4 14:54

作者: liangl923    时间: 2009-2-8 15:31
关心的东西···
作者: wasd2615    时间: 2009-4-17 00:06
人多不多啊 有讨论的 嘛
作者: wling1123    时间: 2009-8-18 10:12
标题: 骗人的吧
没有这个群
作者: davy_chen    时间: 2009-8-18 10:44
交技术分进群,这不像搞技术的风格,我还是自己慢慢探索吧。
作者: peilinaa11    时间: 2009-8-20 22:46
标题: 看看
看看
作者: 妩洺愺    时间: 2009-11-9 13:13

作者: 妩洺愺    时间: 2009-11-14 12:01
瞧瞧
作者: 愚人    时间: 2009-11-14 12:08
这么贵阿……
作者: SQLme    时间: 2010-1-15 13:58

作者: blue_u    时间: 2010-2-5 14:48
冒泡,看看
作者: chengning    时间: 2010-2-5 15:23

作者: janey8326    时间: 2010-3-16 13:15
支持一下
作者: mcy16    时间: 2010-4-30 11:26
加入哈   大家一起交流学习
作者: yyj0720    时间: 2010-10-25 18:27
没看到 东东啊 楼主




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2