Преглед изворни кода

更新了测试结果json的输出

xuyr пре 4 година
родитељ
комит
a7401908f7

+ 0 - 674
OperationFlow/com.yao.club/mergeWidgetInfo.dot

@@ -1,674 +0,0 @@
-digraph g {
-    node [shape=box, style=filled, fillcolor=lightblue, fontname="simsun.ttc", fontsize=14];
-    edge [fontname="simsun.ttc", fontsize=12];
-    subgraph cluster_{
-    label = ""
-        64[label = "Start        "];
-    }
-    subgraph cluster__LoginActivity{
-    label = "_LoginActivity"
-        0[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 欢迎来到记乐部
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        1[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 会员名
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        2[label = "behavior = sendKeys
-        arg = [张三]
-        index = -1
-        id = com.yao.club:id/et_username
-        text = 请输入会员名
-        className = android.widget.EditText
-        desc = 
-        packageName = 
-        "];
-        3[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 密   码
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        4[label = "behavior = sendKeys
-        arg = [123]
-        index = -1
-        id = com.yao.club:id/et_pwd
-        text = 
-        className = android.widget.EditText
-        desc = 
-        packageName = 
-        "];
-        5[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_login
-        text = 登录
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-    }
-    subgraph cluster__ExerciseListActivity{
-    label = "_ExerciseListActivity"
-        44[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_left
-        text = 
-        className = android.widget.ImageView
-        desc = 
-        packageName = 
-        "];
-    }
-    subgraph cluster__RecordActivity{
-    label = "_RecordActivity"
-        12[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_left
-        text = 
-        className = android.widget.ImageView
-        desc = 
-        packageName = 
-        "];
-        13[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/tv_title
-        text = 记一笔
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        14[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_palce
-        text = 地点
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        15[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_time
-        text = 时间
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        16[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_day
-        text = 2020-03-03
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        17[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 2019
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        18[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 2021
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        19[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 2
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        20[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 4
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        21[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 02
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        22[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 04
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        23[label = "behavior = click
-        arg = null
-        index = -1
-        id = android:id/button2
-        text = 取消
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        24[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_money
-        text = 场地费
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        25[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_placemoneyflag
-        text = ¥
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        26[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_watermoney
-        text = 水费
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        27[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_watermoneyflag
-        text = ¥
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        28[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_badminton
-        text = 羽毛球
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        29[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_badmintonflag
-        text = 个
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        30[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_people
-        text = 会员
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        31[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_people
-        text = +
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        32[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/addr_title
-        text = 选择会员
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        33[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/iv_cancel
-        text = 
-        className = android.widget.ImageView
-        desc = 
-        packageName = 
-        "];
-        34[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/gridType
-        text = 
-        className = android.widget.GridView
-        desc = 
-        packageName = 
-        "];
-        35[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_nomember
-        text = 非会员
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        36[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_nomemberflag
-        text = 人
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        37[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_totalmoneyinfo
-        text = 总计:
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        38[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_totalmoney
-        text = ¥0.0
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        39[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_averagemoneyinfo
-        text = 每人:
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        40[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_averagemoney
-        text = ¥0.0
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        41[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_save
-        text = 保存
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        42[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_cancel
-        text = 取消
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-    }
-    subgraph cluster__HFActivity{
-    label = "_HFActivity"
-        57[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_appname
-        text = 爱羽俱乐部
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        58[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_surplus
-        text = 剩余会费
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        59[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_surplus_money
-        text = 1000.0
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        60[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_total
-        text = 总交会费
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        61[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_total_money
-        text = 1000.0
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        62[label = "behavior = sendKeyEvent
-        arg = [4]
-        index = -1
-        id = 
-        text = 
-        className = 
-        desc = 
-        packageName = 
-        "];
-    }
-    subgraph cluster__MainActivity{
-    label = "_MainActivity"
-        6[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_appname
-        text = 爱羽俱乐部
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        7[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_surplus
-        text = 剩余会费
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        8[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_surplus_money
-        text = 1000.00
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        9[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_total
-        text = 总交会费
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        10[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/txt_total_money
-        text = 1000.00
-        className = android.widget.TextView
-        desc = 
-        packageName = 
-        "];
-        11[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_note
-        text = 记一笔
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        43[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_activity
-        text = 活动
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        45[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_member
-        text = 会员
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        47[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_property
-        text = 资产
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        48[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_onself
-        text = 个人信息
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        56[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_hf
-        text = 会费信息
-        className = android.widget.Button
-        desc = 
-        packageName = 
-        "];
-        63[label = "behavior = sendKeyEvent
-        arg = [4]
-        index = -1
-        id = 
-        text = 
-        className = 
-        desc = 
-        packageName = 
-        "];
-    }
-    subgraph cluster__MemberActivity{
-    label = "_MemberActivity"
-        46[label = "behavior = click
-        arg = null
-        index = -1
-        id = com.yao.club:id/btn_left
-        text = 
-        className = android.widget.ImageView
-        desc = 
-        packageName = 
-        "];
-    }
-    subgraph cluster__MemberInfoActivity{
-    label = "_MemberInfoActivity"
-        49[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 
-        className = android.view.View
-        desc = 个人信息
-        packageName = 
-        "];
-        50[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 
-        className = android.view.View
-        desc = 会员名
-        packageName = 
-        "];
-        51[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 
-        className = android.view.View
-        desc = 
-        packageName = 
-        "];
-        52[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 
-        className = android.view.View
-        desc = 密  码
-        packageName = 
-        "];
-        53[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 
-        className = android.view.View
-        desc = 纳  贡
-        packageName = 
-        "];
-        54[label = "behavior = click
-        arg = null
-        index = -1
-        id = 
-        text = 
-        className = android.view.View
-        desc = 类  型
-        packageName = 
-        "];
-        55[label = "behavior = sendKeyEvent
-        arg = [4]
-        index = -1
-        id = 
-        text = 
-        className = 
-        desc = 
-        packageName = 
-        "];
-    }
-    0->1;
-    1->2;
-    2->3;
-    3->4;
-    4->5;
-    5->6;
-    6->7;
-    7->8;
-    8->9;
-    9->10;
-    10->11;
-    11->12;
-    12->13;
-    13->14;
-    14->15;
-    15->16;
-    16->17;
-    17->18;
-    18->19;
-    19->20;
-    20->21;
-    21->22;
-    22->23;
-    23->24;
-    24->25;
-    25->26;
-    26->27;
-    27->28;
-    28->29;
-    29->30;
-    30->31;
-    31->32;
-    32->33;
-    33->34;
-    34->35;
-    35->36;
-    36->37;
-    37->38;
-    38->39;
-    39->40;
-    40->41;
-    41->42;
-    42->43;
-    43->44;
-    44->45;
-    45->46;
-    46->47;
-    47->48;
-    48->49;
-    49->50;
-    49->55;
-    50->51;
-    51->52;
-    51->53;
-    51->54;
-    51->51;
-    51->49;
-    52->51;
-    53->51;
-    54->51;
-    55->56;
-    56->57;
-    57->58;
-    58->59;
-    59->60;
-    60->61;
-    61->62;
-    62->63;
-    64->0;
-}

BIN
OperationFlow/com.yao.club/mergeWidgetInfo.png


Разлика између датотеке није приказан због своје велике величине
+ 233 - 553
OperationFlow/com.yeungeek.monkeyandroid/1583551713850_0.txt


+ 433 - 0
OperationFlow/com.yeungeek.monkeyandroid/mergeWidgetInfo.dot

@@ -0,0 +1,433 @@
+digraph g {
+    node [shape=box, style=filled, fillcolor=lightblue, fontname="simsun.ttc", fontsize=14];
+    edge [fontname="simsun.ttc", fontsize=12];
+    subgraph cluster__ui_detail_DetailActivity{
+    label = "_ui_detail_DetailActivity"
+        8[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = 
+        className = android.view.View
+        desc = 
+        packageName = 
+        "];
+        9[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = tf-bao
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        10[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_avatar
+        text = 
+        className = android.widget.ImageView
+        desc = 
+        packageName = 
+        "];
+        11[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        text = Tengfei Bao
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        12[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_create_time
+        text = 2011-11-16T02:39:05Z
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        13[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = Followers(14)
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        14[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = Following(29)
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        15[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = defunkt
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        16[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        text = Chris Wanstrath
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        17[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_blog
+        text = http://chriswanstrath.com/
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        19[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = Followers(20919)
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        20[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = Following(210)
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        21[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_login
+        text = mojombo
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        22[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = mojombo
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        23[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        text = Tom Preston-Werner
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        24[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_location
+        text = San Francisco
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        25[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_blog
+        text = http://tom.preston-werner.com
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        26[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_login
+        text = tokuda109
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        27[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = tokuda109
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        28[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        text = Tsuyoshi Tokuda
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        29[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_location
+        text = Tokyo
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        30[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_company
+        text = Merpay, Inc.
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        31[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_blog
+        text = https://dev.to/tokuda109
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        32[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_login
+        text = takeumajin
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        33[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = takeumajin
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        34[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = 
+        className = android.widget.LinearLayout
+        desc = 
+        packageName = 
+        "];
+        35[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/pager
+        text = 
+        className = android.support.v4.view.ViewPager
+        desc = 
+        packageName = 
+        "];
+        36[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/errorView
+        text = HTTP 403 Forbidden
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        37[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/fab
+        text = 
+        className = android.widget.ImageButton
+        desc = 
+        packageName = 
+        "];
+        38[label = "behavior = click
+        arg = null
+        index = -1
+        id = android:id/statusBarBackground
+        text = 
+        className = android.view.View
+        desc = 
+        packageName = 
+        "];
+        39[label = "behavior = sendKeyEvent
+        arg = [4]
+        index = -1
+        id = 
+        text = 
+        className = 
+        desc = 
+        packageName = 
+        "];
+        40[label = "behavior = sendKeyEvent
+        arg = [3]
+        index = -1
+        id = 
+        text = 
+        className = 
+        desc = 
+        packageName = 
+        "];
+    }
+    subgraph cluster_{
+    label = ""
+        41[label = "Start        "];
+    }
+    subgraph cluster__BrowserActivity{
+    label = "_BrowserActivity"
+        18[label = "behavior = sendKeyEvent
+        arg = [4]
+        index = -1
+        id = 
+        text = 
+        className = 
+        desc = 
+        packageName = 
+        "];
+    }
+    subgraph cluster__ui_main_MainActivity{
+    label = "_ui_main_MainActivity"
+        0[label = "behavior = click
+        arg = null
+        index = -1
+        id = android:id/statusBarBackground
+        text = 
+        className = android.view.View
+        desc = 
+        packageName = 
+        "];
+        1[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = Famous user
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        2[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = 
+        className = android.widget.ImageView
+        desc = 更多选项
+        packageName = 
+        "];
+        3[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/title
+        text = Settings
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        4[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = China All
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        5[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = Java
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        6[label = "behavior = click
+        arg = null
+        index = -1
+        id = 
+        text = JavaScript
+        className = android.widget.TextView
+        desc = 
+        packageName = 
+        "];
+        7[label = "behavior = click
+        arg = null
+        index = -1
+        id = com.yeungeek.monkeyandroid:id/id_user_avatar
+        text = 
+        className = android.widget.ImageView
+        desc = 
+        packageName = 
+        "];
+    }
+    0->1;
+    1->2;
+    2->3;
+    3->4;
+    4->5;
+    4->7;
+    5->6;
+    6->4;
+    7->8;
+    8->9;
+    9->10;
+    10->11;
+    10->15;
+    11->12;
+    12->13;
+    13->14;
+    14->10;
+    15->16;
+    16->17;
+    17->18;
+    18->19;
+    18->26;
+    18->32;
+    19->20;
+    20->21;
+    21->22;
+    22->23;
+    23->24;
+    24->25;
+    25->18;
+    26->27;
+    27->28;
+    28->29;
+    29->30;
+    30->31;
+    31->18;
+    32->33;
+    33->34;
+    34->34;
+    34->35;
+    35->36;
+    36->37;
+    37->38;
+    38->39;
+    39->39;
+    39->40;
+    41->0;
+}

BIN
OperationFlow/com.yeungeek.monkeyandroid/mergeWidgetInfo.png


+ 1 - 0
OperationFlow/com.yeungeek.monkeyandroid/ofActivity.json

@@ -0,0 +1 @@
+{"categories":[{"name":".ui.detail.DetailActivity"},{"name":""},{"name":".BrowserActivity"},{"name":".ui.main.MainActivity"}]}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
OperationFlow/com.yeungeek.monkeyandroid/operationFlowJSON.json


+ 196 - 0
OperationFlow/com.yeungeek.monkeyandroid/simpleMergeWidgetInfo.dot

@@ -0,0 +1,196 @@
+digraph g {
+    node [shape=box, style=filled, fillcolor=lightblue, fontname="simsun.ttc", fontsize=14];
+    edge [fontname="simsun.ttc", fontsize=12];
+    subgraph cluster__ui_detail_DetailActivity{
+    label = "_ui_detail_DetailActivity"
+        8[label = "behavior = click
+        "];
+        9[label = "behavior = click
+        text = tf-bao
+        className = android.widget.TextView
+        "];
+        10[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_avatar
+        "];
+        11[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        "];
+        12[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_create_time
+        "];
+        13[label = "behavior = click
+        text = Followers(14)
+        className = android.widget.TextView
+        "];
+        14[label = "behavior = click
+        text = Following(29)
+        className = android.widget.TextView
+        "];
+        15[label = "behavior = click
+        text = defunkt
+        className = android.widget.TextView
+        "];
+        16[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        "];
+        17[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_blog
+        "];
+        19[label = "behavior = click
+        text = Followers(20919)
+        className = android.widget.TextView
+        "];
+        20[label = "behavior = click
+        text = Following(210)
+        className = android.widget.TextView
+        "];
+        21[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_login
+        "];
+        22[label = "behavior = click
+        text = mojombo
+        className = android.widget.TextView
+        "];
+        23[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        "];
+        24[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_location
+        "];
+        25[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_blog
+        "];
+        26[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_login
+        "];
+        27[label = "behavior = click
+        text = tokuda109
+        className = android.widget.TextView
+        "];
+        28[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_name
+        "];
+        29[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_location
+        "];
+        30[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_company
+        "];
+        31[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_blog
+        "];
+        32[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_login
+        "];
+        33[label = "behavior = click
+        text = takeumajin
+        className = android.widget.TextView
+        "];
+        34[label = "behavior = click
+        "];
+        35[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/pager
+        "];
+        36[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/errorView
+        "];
+        37[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/fab
+        "];
+        38[label = "behavior = click
+        id = android:id/statusBarBackground
+        "];
+        39[label = "behavior = sendKeyEvent
+        "];
+        40[label = "behavior = sendKeyEvent
+        "];
+    }
+    subgraph cluster_{
+    label = ""
+        41[label = "Start        "];
+    }
+    subgraph cluster__BrowserActivity{
+    label = "_BrowserActivity"
+        18[label = "behavior = sendKeyEvent
+        "];
+    }
+    subgraph cluster__ui_main_MainActivity{
+    label = "_ui_main_MainActivity"
+        0[label = "behavior = click
+        id = android:id/statusBarBackground
+        "];
+        1[label = "behavior = click
+        text = Famous user
+        className = android.widget.TextView
+        "];
+        2[label = "behavior = click
+        desc = 更多选项
+        className = android.widget.ImageView
+        "];
+        3[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/title
+        "];
+        4[label = "behavior = click
+        text = China All
+        className = android.widget.TextView
+        "];
+        5[label = "behavior = click
+        text = Java
+        className = android.widget.TextView
+        "];
+        6[label = "behavior = click
+        text = JavaScript
+        className = android.widget.TextView
+        "];
+        7[label = "behavior = click
+        id = com.yeungeek.monkeyandroid:id/id_user_avatar
+        "];
+    }
+    0->1;
+    1->2;
+    2->3;
+    3->4;
+    4->5;
+    4->7;
+    5->6;
+    6->4;
+    7->8;
+    8->9;
+    9->10;
+    10->11;
+    10->15;
+    11->12;
+    12->13;
+    13->14;
+    14->10;
+    15->16;
+    16->17;
+    17->18;
+    18->19;
+    18->26;
+    18->32;
+    19->20;
+    20->21;
+    21->22;
+    22->23;
+    23->24;
+    24->25;
+    25->18;
+    26->27;
+    27->28;
+    28->29;
+    29->30;
+    30->31;
+    31->18;
+    32->33;
+    33->34;
+    34->34;
+    34->35;
+    35->36;
+    36->37;
+    37->38;
+    38->39;
+    39->39;
+    39->40;
+    41->0;
+}

BIN
OperationFlow/com.yeungeek.monkeyandroid/simpleMergeWidgetInfo.png


+ 0 - 79
OperationFlow/jlb/res.txt

@@ -1,79 +0,0 @@
-activity:LoginActivity
-behavior:sendKeys
-arg:[张三]
-index:-1
-id:com.yao.club:id/et_username
-text:请输入会员名
-className:android.widget.EditText
-desc:
-packageName:
-enabled:true
-checkable:false
-checked:false
-clickable:true
-focusable:true
-focused:true
-longClickable:true
-scrollable:false
-selected:false
-displayed:true
-
-activity:LoginActivity
-behavior:sendKeys
-arg:[123]
-index:-1
-id:com.yao.club:id/et_pwd
-text:
-className:android.widget.EditText
-desc:
-packageName:
-enabled:true
-checkable:false
-checked:false
-clickable:true
-focusable:true
-focused:false
-longClickable:true
-scrollable:false
-selected:false
-displayed:true
-
-activity:LoginActivity
-behavior:click
-arg:
-index:-1
-id:com.yao.club:id/btn_login
-text:登录
-className:android.widget.Button
-desc:
-packageName:
-enabled:true
-checkable:false
-checked:false
-clickable:true
-focusable:true
-focused:false
-longClickable:false
-scrollable:false
-selected:false
-displayed:true
-
-activity:NewActivity
-behavior:click
-arg:
-index:-1
-id:com.yao.club:id/txt_surplus_money
-text:1000.00
-className:android.widget.TextView
-desc:
-packageName:
-enabled:true
-checkable:false
-checked:false
-clickable:true
-focusable:true
-focused:false
-longClickable:false
-scrollable:false
-selected:false
-displayed:true

+ 23 - 2
src/main/java/net/mooctest/www/android_auto_test/Scripts/MergeScript.java

@@ -104,6 +104,7 @@ public class MergeScript extends AbstractBaseScript {
         DFS(0, root);
         //执行完DFS后,将本次的路径加入总path中,并更新新的path
         pathList.add(oneMap);
+        oneMap = new ArrayList<>();
         wholeMap = widgetMergeTools.getResList(pathList);
     }
 
@@ -114,6 +115,9 @@ public class MergeScript extends AbstractBaseScript {
             int testNum=0;
             if (resList != null) {
                 for (int i = 0; i < nodeList.size(); i++) {
+                    if(nodeList.get(i).getWidgetInfo().getActivity()==""){
+                        i++;
+                    }
                     try {
                         //DFS中如果有覆盖到这里,就不用跑这条了
                         if (nodeList.get(i).isVisited()) {
@@ -184,7 +188,7 @@ public class MergeScript extends AbstractBaseScript {
     void preRun(){
         PrintUtil.print("MergeScript start", TAG, udid);
         //跑第一遍
-        startTest();
+        //startTest();
         //从res文件里读内容
         try {
             File fdir = new File(flowDir);
@@ -214,7 +218,13 @@ public class MergeScript extends AbstractBaseScript {
     @Override
     void afterRun(){
         //跑的整个数据生成res文件
+        //简单页面集合
+        widgetMergeTools.simpleResList2Pic(wholeMap,flowDir);
+        //完全页面集合
         widgetMergeTools.resList2Pic(wholeMap,flowDir);
+        //流程集合
+        widgetMergeTools.resList2Json(wholeMap,flowDir);
+        //本次跑的用户操作流
         long time = new Date().getTime();
         for(int index = 0; index< pathList.size();index++){
             List<WidgetInfo> res = pathList.get(index);
@@ -306,7 +316,8 @@ public class MergeScript extends AbstractBaseScript {
         int currentActivityIndex = indexOfCurrentActivityInActivityList(currentActivity);
         if(currentActivityIndex >= 0){
             //若当前访问页面的activity等于activityList中某一activity对象的activityName,说明此子页面之前出现过
-            if(fatherActivity!=null&&!activityList.get(currentActivityIndex).getFatherActivity().equals(fatherActivity)){
+            if(fatherActivity!=null&&activityList.get(currentActivityIndex).getFatherActivity()!=null&&
+                    !activityList.get(currentActivityIndex).getFatherActivity().equals(fatherActivity)){
                 PrintUtil.print("Previous Activity is " + fatherActivity + ", but " + currentActivity + "'s father is " + activityList.get(currentActivityIndex).getFatherActivity() + ", change father", TAG, udid, myTestLogWriter, PrintUtil.ANSI_GREEN);
                 //变更父子关系,设置该子页面的fatherActivity为最近一次跳转过来的那个Activity
                 activityList.get(currentActivityIndex).setFatherActivity(fatherActivity);
@@ -893,6 +904,7 @@ public class MergeScript extends AbstractBaseScript {
             inputValue = finder.getInputValue(AddressUtil.getHumanScriptPath(),component.getResource_id());
         } catch (IOException e) {
             PrintUtil.print("Find input value error!", TAG, udid, myTestLogWriter, PrintUtil.ANSI_RED);
+            inputValue = "test";
             e.printStackTrace();
         }
         if(inputValue != null){
@@ -948,11 +960,20 @@ public class MergeScript extends AbstractBaseScript {
 
         //记录node
         WidgetInfo wi = WidgetInfo.getElementInfo(element);
+
+        if(wi==null){
+            System.out.println("??这个element有毒?");
+            return;
+        }
+
         wi.simpleOutput();
         wi.setBehavior("click", null);
         wi.setActivity(activityBeforeAction);
         oneMap.add(wi);
 
+
+
+
         element.click();
         String timeAfterAction = DeviceUtil.getDeviceTime(udid);
         threadSleep(6);

+ 2 - 1
src/main/java/net/mooctest/www/android_auto_test/models/WidgetInfo.java

@@ -2,6 +2,7 @@ package net.mooctest.www.android_auto_test.models;
 
 import net.mooctest.www.android_auto_test.utils.widgetMergeTools;
 import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.RemoteWebElement;
 
 import java.io.*;
 import java.util.ArrayList;
@@ -275,7 +276,7 @@ public class WidgetInfo {
     }
 
     public static WidgetInfo getElementInfo(WebElement e) {
-        WidgetInfo tempWInfo;
+        WidgetInfo tempWInfo = new WidgetInfo();
         try {
             String id = e.getAttribute("resourceId") == null ? "" : e.getAttribute("resourceId");
             String text = e.getAttribute("text") == null ? "" : e.getAttribute("text");

+ 41 - 4
src/main/java/net/mooctest/www/android_auto_test/utils/RunScriptTest.java

@@ -9,6 +9,8 @@ import net.mooctest.www.android_auto_test.common.constant.Consts;
 import net.mooctest.www.android_auto_test.common.exceptions.ApkParseException;
 import net.mooctest.www.android_auto_test.common.exceptions.AppiumDriverInitException;
 import net.mooctest.www.android_auto_test.models.Device;
+import net.mooctest.www.android_auto_test.models.WidgetInfo;
+import net.mooctest.www.android_auto_test.models.WidgetInfoNode;
 import org.openqa.selenium.WebDriverException;
 import org.openqa.selenium.WebElement;
 import org.openqa.selenium.remote.CapabilityType;
@@ -18,10 +20,13 @@ import org.openqa.selenium.remote.UnreachableBrowserException;
 import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.ArrayList;
+
+import static net.mooctest.www.android_auto_test.utils.widgetMergeTools.getPathList;
 
 public class RunScriptTest {
-    String fileName = "jlb.apk";
-    String deviceName = "emulator-5554";
+    String fileName = "kiwix.apk";
+    String deviceName = "emulator-5556";
     String udid = deviceName;
     String traceId = "100";
     AndroidDriver<WebElement> driver;
@@ -41,14 +46,44 @@ public class RunScriptTest {
             throw new ApkParseException(e.getMessage());
         }
         initDriver();
-        AbstractBaseScript script = new MergeScript(udid, driver, apkInfo, traceId);
+        //手动修复脚本用
+        try {
+            testScript(udid, driver, apkInfo, traceId);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+
+        //AbstractBaseScript script = new MergeScript(udid, driver, apkInfo, traceId);
         //AbstractBaseScript script = new DefaultScript(udid, driver, apkInfo, traceId);
-        script.runAndroidAutoTest();
+        //script.runAndroidAutoTest();
 
     }
     public static void main(String[]args){
         new RunScriptTest().runTest();
     }
+    public void testScript(String udid, AndroidDriver driver, ApkInfo apkInfo, String traceId) throws InterruptedException {
+        String filename = "C:\\Users\\scarlet\\Desktop\\lirat脚本\\org.kiwix.kiwixmobile";
+        File f = new File(filename);
+        ArrayList<ArrayList<WidgetInfo>> pathList = new ArrayList<>();
+        getPathList(pathList,f);
+        for(int i =4;i<pathList.size();i++){
+            ArrayList<WidgetInfo> path = pathList.get(i);
+            driver.resetApp();
+            Thread.sleep(10000);
+            for(int j =0;j<path.size();j++){
+                try{
+                    Thread.sleep(6000);
+                    widgetMergeTools.runOneWidget(path.get(j),driver);
+                }catch(Exception e){
+                    e.printStackTrace();
+                    System.out.println("第"+(i+1)+"条,第"+(j+1)+"个");
+                    System.out.println("");
+                }
+
+            }
+        }
+    }
     private void uninstallDriver(){
         String command = String.format("adb -s %s uninstall io.appium.settings", udid);
         OsUtil.runCommand(command);
@@ -64,6 +99,8 @@ public class RunScriptTest {
         capabilities.setCapability("platformVersion", DeviceUtil.getPlatformVersion(udid));
         capabilities.setCapability("app", app.getAbsolutePath());
         capabilities.setCapability("appPackage", this.apkInfo.getPackageName());
+        //vlc
+        //capabilities.setCapability("appActivity", "org.videolan.vlc.gui.onboarding.OnboardingActivity");
         capabilities.setCapability("appActivity", this.apkInfo.getLaunchableActivity());
         capabilities.setCapability("udid",this.udid);
         capabilities.setCapability("unicodeKeyboard","true");

+ 286 - 5
src/main/java/net/mooctest/www/android_auto_test/utils/widgetMergeTools.java

@@ -1,13 +1,22 @@
 package net.mooctest.www.android_auto_test.utils;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.google.gson.JsonObject;
 import io.appium.java_client.AppiumDriver;
+import io.appium.java_client.android.AndroidDriver;
+import io.appium.java_client.android.AndroidTouchAction;
 import io.appium.java_client.android.nativekey.AndroidKey;
+import io.appium.java_client.android.nativekey.KeyEvent;
+import io.appium.java_client.touch.WaitOptions;
+import io.appium.java_client.touch.offset.PointOption;
 import net.mooctest.www.android_auto_test.Scripts.MergeScript;
 import net.mooctest.www.android_auto_test.models.WidgetInfo;
 import net.mooctest.www.android_auto_test.models.WidgetInfoNode;
 import org.openqa.selenium.WebElement;
 
 import java.io.*;
+import java.time.Duration;
 import java.util.*;
 
 public class widgetMergeTools {
@@ -357,6 +366,80 @@ public class widgetMergeTools {
             return res;
         }
     }
+    public static void runOneWidget(WidgetInfo wInfo, AndroidDriver driver){
+        WebElement we;
+        //先定位
+        String id = wInfo.getId();
+        String text = wInfo.getText();
+        String className = wInfo.getClassName();
+        String desc = wInfo.getDesc();
+        String packageName = wInfo.getPackageName();
+        int index = wInfo.getIndex();
+        String using = "//" + className + "[";
+        if (!text.equals("") && text != null) {
+            using += "@text='" + text + "'";
+        }
+        if (!id.equals("") && id != null) {
+            if (using.contains("@")) {
+                using += " and ";
+            }
+            using += "@resource-id='" + id + "'";
+        }
+        if (!desc.equals("") && desc != null) {
+            if (using.contains("@")) {
+                using += " and ";
+            }
+            using += "@content-desc='" + desc + "'";
+        }
+        if (!packageName.equals("") && packageName != null) {
+            if (using.contains("@")) {
+                using += " and ";
+            }
+            using += "@package='" + packageName + "'";
+        }
+        if (index != -1) {
+            if (using.contains("@")) {
+                using += " and ";
+            }
+            using += "@index='" + index + "'";
+        }
+
+        using += "]";
+        System.out.println(using);
+        try {
+            if (wInfo.getBehavior().equals("click")) {
+                try {
+                    we = driver.findElementByXPath(using);
+                    we.click();
+                }catch(Exception e){
+                    try {
+                        Thread.sleep(30000);
+                        we = driver.findElementByXPath(using);
+                        we.click();
+                    }catch (Exception e2){
+                        throw e2;
+                    }
+                }
+            } else if (wInfo.getBehavior().equals("sendKeys")) {
+                we = driver.findElementByXPath(using);
+                we.sendKeys(wInfo.getBehaviorArgs().get(0));
+            } else if (wInfo.getBehavior().equals("sendKeyEvent")) {
+                //(Integer.parseInt(wInfo.getBehaviorArgs().get(0))));
+                //TODO 有坑
+                driver.pressKey(new KeyEvent(AndroidKey.BACK));
+            } else if (wInfo.getBehavior().equals("swipe")) {
+                ArrayList<String> args = wInfo.getBehaviorArgs();
+                AndroidTouchAction touchAction = new AndroidTouchAction(driver);
+                touchAction.press(PointOption.point(Integer.parseInt(args.get(0)), Integer.parseInt(args.get(1))))
+                        .waitAction(WaitOptions.waitOptions(Duration.ofMillis(Integer.parseInt(args.get(4)))))
+                        .moveTo(PointOption.point(Integer.parseInt(args.get(2)), Integer.parseInt(args.get(3))))
+                        .release().perform();
+            }
+        }catch(NoSuchElementException | InterruptedException ex){
+            System.out.println("未找到元素:"+using);
+            System.out.println("继续复现,但本条路径可能已经失败");
+        }
+    }
     //运行其中一条路径
     public static void runOnePath(int maxSize, WidgetInfoNode node, AppiumDriver driver, MergeScript script){
         WebElement we;
@@ -366,7 +449,7 @@ public class widgetMergeTools {
             path = getPath(0, maxSize, new Stack<WidgetInfoNode>(), node);
             path.pop();
             while (!path.empty()) {
-                Thread.sleep(3000);
+                Thread.sleep(6000);
                 WidgetInfoNode wInfoNode= path.pop();
                 wInfoNode.setVisited(true);
                 WidgetInfo wInfo = wInfoNode.getWidgetInfo();
@@ -410,8 +493,18 @@ public class widgetMergeTools {
                 System.out.println(using);
                 try {
                     if (wInfo.getBehavior().equals("click")) {
-                        we = driver.findElementByXPath(using);
-                        script.openExecuteClick(we);
+                        try {
+                            we = driver.findElementByXPath(using);
+                            script.openExecuteClick(we);
+                        }catch(Exception e){
+                            try {
+                                Thread.sleep(30000);
+                                we = driver.findElementByXPath(using);
+                                script.openExecuteClick(we);
+                            }catch (Exception e2){
+                                e2.printStackTrace();
+                            }
+                        }
                     } else if (wInfo.getBehavior().equals("sendKeys")) {
                         we = driver.findElementByXPath(using);
                         script.openExecuteInput(wInfo.getBehaviorArgs().get(0),we);
@@ -433,7 +526,103 @@ public class widgetMergeTools {
             System.out.println("复现失败");
         }
     }
+    //resList2Json
+    public static void resList2Json(ArrayList<WidgetInfoNode> resList,String dirName){
+        String JsonName = "operationFlowJSON";
+        String acName = "ofActivity";
+        File JsonFile = new File(dirName+File.separator+JsonName+".json");
+        File acFile = new File(dirName+File.separator+acName+".json");
 
+        JSONObject object = new JSONObject();
+        JSONArray node = new JSONArray();
+        JSONArray links = new JSONArray();
+
+        JSONObject acObject = new JSONObject();
+        JSONArray acArray = new JSONArray();
+        HashSet<String> arraySet = new HashSet();
+        //写结点
+        for(int i = 0;i<resList.size();i++){
+            WidgetInfoNode wInfoNode = resList.get(i);
+            WidgetInfo wInfo = wInfoNode.getWidgetInfo();
+            JSONObject tempObject = new JSONObject();
+            String labelContains = "";
+            labelContains += "activity = " + wInfo.getActivity()+"\n";
+            labelContains += "index = " + wInfo.getIndex() + "\n";
+            labelContains += "id = " + wInfo.getId() + "\n";
+            labelContains += "text = " + wInfo.getText() + "\n";
+            labelContains += "className = " + wInfo.getClassName() + "\n";
+            labelContains += "desc = " + wInfo.getDesc() + "\n";
+            labelContains += "packageName = " + wInfo.getPackageName() + "\n";
+            labelContains += "behavior = " + wInfo.getBehavior() + "\n";
+            labelContains += "arg = " + wInfo.getBehaviorArgs() + "\n";
+            tempObject.put("name",labelContains);
+            tempObject.put("category",wInfo.getActivity());
+            arraySet.add(wInfo.getActivity());
+            tempObject.put("draggable",true);
+            node.add(tempObject);
+        }
+        //写边
+        for(int i = 0;i<resList.size();i++){
+            WidgetInfoNode wInfoNode = resList.get(i);
+            WidgetInfo wInfo = wInfoNode.getWidgetInfo();
+            ArrayList<WidgetInfoNode> nextList = wInfoNode.getNext();
+            for(int j = 0 ;j<nextList.size();j++){
+                JSONObject tempObject = new JSONObject();
+                WidgetInfoNode nextNode = nextList.get(j);
+                int thisIndex = i;
+                int nextIndex = resList.indexOf(nextNode);
+                JSONObject labelJson = new JSONObject();
+                String labelContains = "";
+                labelContains += wInfo.getBehavior()+"( ";
+                ArrayList<String> args = wInfo.getBehaviorArgs();
+                if(args == null) labelContains += ")";
+                else {
+                    for (int k = 0; k < args.size(); k++) {
+                        if (k == args.size() - 1) {
+                            labelContains += args.get(k) + " )";
+                        } else {
+                            labelContains += args.get(k) + ", ";
+                        }
+                    }
+                }
+                labelJson.put("show",true);
+                labelJson.put("formatter",labelContains);
+
+                tempObject.put("source",thisIndex);
+                tempObject.put("target",nextIndex);
+                tempObject.put("label",labelJson);
+                links.add(tempObject);
+            }
+        }
+        //结点
+        object.put("data",node);
+        object.put("line",links);
+        String jsonString = object.toJSONString();
+        //页面
+
+        Iterator iterator = arraySet.iterator();
+        while (iterator.hasNext()) {
+            JSONObject acTemp = new JSONObject();
+            acTemp.put("name",iterator.next());
+            acArray.add(acTemp);
+        }
+        acObject.put("categories",acArray);
+        String acString = acObject.toJSONString();
+        try {
+            BufferedWriter bw = new BufferedWriter(new FileWriter(JsonFile));
+            bw.write(jsonString);
+            bw.flush();
+            bw.close();
+            bw = new BufferedWriter(new FileWriter(acFile));
+            bw.write(acString);
+            bw.flush();
+            bw.close();
+        }catch(Exception e){
+            e.printStackTrace();
+        }
+
+
+    }
 
     public static void resList2Pic(ArrayList<WidgetInfoNode> resList,String dirName) {
         String dotName = "mergeWidgetInfo";
@@ -509,6 +698,97 @@ public class widgetMergeTools {
             System.out.println("画图失败");
         }
     }
+    public static void simpleResList2Pic(ArrayList<WidgetInfoNode> resList,String dirName) {
+        String dotName = "simpleMergeWidgetInfo";
+        File dotFile = new File(dirName+File.separator+dotName+".dot");
+        try {
+            BufferedWriter bw = new BufferedWriter(new FileWriter(dotFile));
+            Set<String> activityName = new HashSet<>();
+            for (int i = 0; i < resList.size();i++){
+                WidgetInfoNode wInfoNode = resList.get(i);
+                String activity = wInfoNode.getWidgetInfo().getActivity();
+                activityName.add(activity);
+            }
+            String []activityNames = activityName.toArray(new String[activityName.size()]);
+
+            //write start
+            bw.write("digraph g {\n");
+            bw.flush();
+            bw.write("    node [shape=box, style=filled, fillcolor=lightblue, fontname=\"simsun.ttc\", fontsize=14];\n" +
+                    "    edge [fontname=\"simsun.ttc\", fontsize=12];\n");
+            bw.flush();
+            //write subgraph
+            for(int i = 0;i<activityNames.length;i++){
+                String aName = activityNames[i];
+                String outputAName = aName.replaceAll("\\.","_");
+                bw.write("    subgraph cluster_"+outputAName+"{\n");
+                bw.write("    label = \""+outputAName+"\"\n");
+                bw.flush();
+                for (int j = 0; j < resList.size();j++){
+                    WidgetInfoNode wInfoNode = resList.get(j);
+                    WidgetInfo wInfo = wInfoNode.getWidgetInfo();
+                    if(aName.equals(wInfo.getActivity())){
+                        if(aName.equals("")){
+                            bw.write("        " + j + "[label = \"" + "Start" + "        \"];\n");
+                        }else {
+                            String labelContains = "";
+                            if(!isStringEmpty(wInfo.getBehavior())) {
+                                labelContains += "behavior = " + wInfo.getBehavior() + "\n";
+                            }
+                            if(!isStringEmpty(wInfo.getId())) {
+                                labelContains += "        id = " + wInfo.getId() + "\n";
+                            }else if(!isStringEmpty(wInfo.getText())) {
+                                labelContains += "        text = " + wInfo.getText() + "\n";
+                                labelContains += "        className = " + wInfo.getClassName() + "\n";
+                            }else if(!isStringEmpty(wInfo.getDesc())) {
+                                labelContains += "        desc = " + wInfo.getDesc() + "\n";
+                                labelContains += "        className = " + wInfo.getClassName() + "\n";
+                            }else if(!isStringEmpty(wInfo.getPackageName())) {
+                                labelContains += "        packageName = " + wInfo.getPackageName() + "\n";
+                                labelContains += "        className = " + wInfo.getClassName() + "\n";
+                            }else if(wInfo.getIndex()!=-1) {
+                                labelContains += "        index = " + wInfo.getIndex() + "\n";
+                                labelContains += "        className = " + wInfo.getClassName() + "\n";
+                            }
+                            bw.write("        " + j + "[label = \"" + labelContains + "        \"];\n");
+                        }
+                    }
+                }
+                bw.write("    }\n");
+                bw.flush();
+            }
+
+            //可添加的其他配置项
+
+            //write edge
+            for (int i = 0; i < resList.size();i++) {
+                WidgetInfoNode wInfoNode = resList.get(i);
+                ArrayList<WidgetInfoNode> nextList = wInfoNode.getNext();
+                for(int j = 0 ;j<nextList.size();j++){
+                    WidgetInfoNode nextNode = nextList.get(j);
+                    int nextIndex = resList.indexOf(nextNode);
+                    bw.write("    "+i+"->"+nextIndex+";\n");
+                    bw.flush();
+                }
+            }
+
+            bw.write("}\n");
+            bw.flush();
+            bw.close();
+
+            createDot(dirName,dotName);
+        }catch(Exception e){
+            e.printStackTrace();
+            System.out.println("画图失败");
+        }
+    }
+    public static boolean isStringEmpty(String s){
+        if(s==null)return true;
+        if(s.equals("")) return true;
+        if(s.trim().equals("")) return true;
+        return false;
+    }
+
     public static void createDot(String dirName,String dotName){
         Process p;
         File f =new File("");
@@ -536,9 +816,10 @@ public class widgetMergeTools {
         }
         return sb.toString();
     }
+
     public static void main(String []args){
-        ArrayList<WidgetInfoNode> resList = widgetMergeTools.getResList("D:\\工作\\test");
-        widgetMergeTools.resList2Pic(resList,"test");
+        ArrayList<WidgetInfoNode> resList = widgetMergeTools.getResList("D:\\myWorkSpace\\test");
+        widgetMergeTools.resList2Json(resList,"operationFlow");
 //        ArrayList<WidgetInfoNode> nodeList = widgetMergeTools.getAllPath(resList);
 //        //nodeList.size()
 //        for(int i =0;i<1;i++){

Неке датотеке нису приказане због велике количине промена