aaet 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +145 -0
- data/LICENSE +201 -0
- data/README.md +177 -0
- data/Rakefile +6 -0
- data/aaet.gemspec +51 -0
- data/bin/aaet +143 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/generate_reports.rb +512 -0
- data/lib/aaet.rb +43 -0
- data/lib/aaet/android/android.rb +190 -0
- data/lib/aaet/android/parser.rb +76 -0
- data/lib/aaet/common/applitools.rb +41 -0
- data/lib/aaet/common/common_methods.rb +646 -0
- data/lib/aaet/common/locators.rb +180 -0
- data/lib/aaet/common/redis.rb +108 -0
- data/lib/aaet/ios/ios.rb +18 -0
- data/lib/aaet/ios/parser.rb +1 -0
- data/lib/version.rb +3 -0
- data/run.rb +294 -0
- data/setup/android_setup_methods.rb +161 -0
- data/setup/common_setup_methods.rb +209 -0
- data/setup/ios_setup_methods.rb +11 -0
- data/template_google_api_format.haml +48 -0
- metadata +354 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9747fac30030434877e189155a78478ee71381a7
|
4
|
+
data.tar.gz: 8d23e253167fc7ef5dab470a113475f37ff4d40a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c645d707f390ccfe3450e5611d79b8b12e497881e2a69798bd53c0cf893a0b4b330a29e505f597b6c71f7f3ebcdefd48c88176f53bb19ad31593a54c665b5c0f
|
7
|
+
data.tar.gz: f825514a29ff1246ff5e4477cf04f4fb08bba4bfc809251369e1e2fe031e9ee361b21bc885e52b6f2414bdf32c1eed9f9a3c8ec5e146d96eb62cb5322aac6a6b
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
aaet (0.1.0)
|
5
|
+
apktools (~> 0.7.1)
|
6
|
+
appium_lib
|
7
|
+
awesome_print
|
8
|
+
colorize
|
9
|
+
commander
|
10
|
+
curb
|
11
|
+
eyes_selenium (= 3.10.1)
|
12
|
+
faker
|
13
|
+
haml
|
14
|
+
httparty
|
15
|
+
jsonpath
|
16
|
+
os
|
17
|
+
parallel (~> 1.9.0)
|
18
|
+
pry
|
19
|
+
redic (~> 1.5.0)
|
20
|
+
tilt
|
21
|
+
toml-rb
|
22
|
+
|
23
|
+
GEM
|
24
|
+
remote: https://rubygems.org/
|
25
|
+
specs:
|
26
|
+
addressable (2.5.2)
|
27
|
+
public_suffix (>= 2.0.2, < 4.0)
|
28
|
+
apktools (0.7.2)
|
29
|
+
rubyzip (~> 1.2.1)
|
30
|
+
appium_lib (9.9.0)
|
31
|
+
appium_lib_core (~> 1.3.0)
|
32
|
+
nokogiri (~> 1.6, >= 1.6.6)
|
33
|
+
tomlrb (~> 1.1)
|
34
|
+
appium_lib_core (1.3.0)
|
35
|
+
json (>= 1.8)
|
36
|
+
selenium-webdriver (~> 3.5)
|
37
|
+
awesome_print (1.8.0)
|
38
|
+
capybara (2.18.0)
|
39
|
+
addressable
|
40
|
+
mini_mime (>= 0.1.3)
|
41
|
+
nokogiri (>= 1.3.3)
|
42
|
+
rack (>= 1.0.0)
|
43
|
+
rack-test (>= 0.5.4)
|
44
|
+
xpath (>= 2.0, < 4.0)
|
45
|
+
childprocess (0.9.0)
|
46
|
+
ffi (~> 1.0, >= 1.0.11)
|
47
|
+
chunky_png (1.3.6)
|
48
|
+
citrus (3.0.2)
|
49
|
+
coderay (1.1.2)
|
50
|
+
colorize (0.8.1)
|
51
|
+
commander (4.4.4)
|
52
|
+
highline (~> 1.7.2)
|
53
|
+
concurrent-ruby (1.0.5)
|
54
|
+
curb (0.9.4)
|
55
|
+
diff-lcs (1.3)
|
56
|
+
eyes_core (3.10.1)
|
57
|
+
chunky_png (= 1.3.6)
|
58
|
+
faraday
|
59
|
+
oily_png (~> 1.2)
|
60
|
+
oj
|
61
|
+
eyes_selenium (3.10.1)
|
62
|
+
capybara
|
63
|
+
eyes_core (= 3.10.1)
|
64
|
+
selenium-webdriver
|
65
|
+
watir
|
66
|
+
faker (1.8.7)
|
67
|
+
i18n (>= 0.7)
|
68
|
+
faraday (0.14.0)
|
69
|
+
multipart-post (>= 1.2, < 3)
|
70
|
+
ffi (1.9.23)
|
71
|
+
haml (5.0.4)
|
72
|
+
temple (>= 0.8.0)
|
73
|
+
tilt
|
74
|
+
highline (1.7.10)
|
75
|
+
hiredis (0.6.1)
|
76
|
+
httparty (0.16.0)
|
77
|
+
multi_xml (>= 0.5.2)
|
78
|
+
i18n (1.0.0)
|
79
|
+
concurrent-ruby (~> 1.0)
|
80
|
+
json (2.1.0)
|
81
|
+
jsonpath (0.8.11)
|
82
|
+
multi_json
|
83
|
+
to_regexp (~> 0.2.1)
|
84
|
+
method_source (0.9.0)
|
85
|
+
mini_mime (1.0.0)
|
86
|
+
mini_portile2 (2.3.0)
|
87
|
+
multi_json (1.12.2)
|
88
|
+
multi_xml (0.6.0)
|
89
|
+
multipart-post (2.0.0)
|
90
|
+
nokogiri (1.8.2)
|
91
|
+
mini_portile2 (~> 2.3.0)
|
92
|
+
oily_png (1.2.0)
|
93
|
+
chunky_png (~> 1.3.1)
|
94
|
+
oj (3.5.0)
|
95
|
+
os (1.0.0)
|
96
|
+
parallel (1.9.0)
|
97
|
+
pry (0.11.3)
|
98
|
+
coderay (~> 1.1.0)
|
99
|
+
method_source (~> 0.9.0)
|
100
|
+
public_suffix (3.0.2)
|
101
|
+
rack (2.0.4)
|
102
|
+
rack-test (0.8.3)
|
103
|
+
rack (>= 1.0, < 3)
|
104
|
+
rake (10.5.0)
|
105
|
+
redic (1.5.0)
|
106
|
+
hiredis
|
107
|
+
rspec (3.7.0)
|
108
|
+
rspec-core (~> 3.7.0)
|
109
|
+
rspec-expectations (~> 3.7.0)
|
110
|
+
rspec-mocks (~> 3.7.0)
|
111
|
+
rspec-core (3.7.1)
|
112
|
+
rspec-support (~> 3.7.0)
|
113
|
+
rspec-expectations (3.7.0)
|
114
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
+
rspec-support (~> 3.7.0)
|
116
|
+
rspec-mocks (3.7.0)
|
117
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
+
rspec-support (~> 3.7.0)
|
119
|
+
rspec-support (3.7.1)
|
120
|
+
rubyzip (1.2.1)
|
121
|
+
selenium-webdriver (3.11.0)
|
122
|
+
childprocess (~> 0.5)
|
123
|
+
rubyzip (~> 1.2)
|
124
|
+
temple (0.8.0)
|
125
|
+
tilt (2.0.8)
|
126
|
+
to_regexp (0.2.1)
|
127
|
+
toml-rb (1.1.1)
|
128
|
+
citrus (~> 3.0, > 3.0)
|
129
|
+
tomlrb (1.2.6)
|
130
|
+
watir (6.10.3)
|
131
|
+
selenium-webdriver (~> 3.4, >= 3.4.1)
|
132
|
+
xpath (3.0.0)
|
133
|
+
nokogiri (~> 1.8)
|
134
|
+
|
135
|
+
PLATFORMS
|
136
|
+
ruby
|
137
|
+
|
138
|
+
DEPENDENCIES
|
139
|
+
aaet!
|
140
|
+
bundler (~> 1.13)
|
141
|
+
rake (~> 10.0)
|
142
|
+
rspec (~> 3.0)
|
143
|
+
|
144
|
+
BUNDLED WITH
|
145
|
+
1.16.1
|
data/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
# Appium Automated Exploratory Tester - Alpha
|
2
|
+
|
3
|
+
<img src="https://www.dropbox.com/s/zoab5i5tzsao97w/hexa-spider-robot2.gif?raw=1" width="600" height="400">
|
4
|
+
|
5
|
+
### Appium Native Crawler CLI
|
6
|
+
|
7
|
+
* Features include:
|
8
|
+
* Collects Screenshots
|
9
|
+
* Performance Data Collection
|
10
|
+
* Runs in both Landscape and Portrait
|
11
|
+
* Elements & Accessibility Detection
|
12
|
+
* Runs on Sauce Labs
|
13
|
+
* Runs in parallel
|
14
|
+
* Google Translates App Strings
|
15
|
+
* Automated validations with [Applitools Eyes](https://www.applitools.com)
|
16
|
+
* Monkey Tester
|
17
|
+
* Replaying a past test crawl
|
18
|
+
|
19
|
+
### Why?
|
20
|
+
I built this to mimic exploratory testing the best I could make it. Also because it was something I needed at the time and thought should exist. I do believe with the speed of development these days we need more tools like this to help us keep pace and not sacrifice quality. I also got tired or writing and refactoring tests for a constantly changing application so I automated the automation.
|
21
|
+
|
22
|
+
### Will this work for every app?
|
23
|
+
Probably not but that is the challenge of building somethign that does. Will it work for most apps? I think so. If it doesn't work for your app, help make it work by contributing a pull request. :)
|
24
|
+
|
25
|
+
### Will this work on Windows?
|
26
|
+
I have only tested this on OSX and Linux environments but it will need some refactoring for Windows. Please help make it work by adding a pull request. :)
|
27
|
+
|
28
|
+
### How can you help?
|
29
|
+
* Look at the ToDo's!
|
30
|
+
* FWIW - You don't need to have Ruby knowledge to help with some of these.
|
31
|
+
|
32
|
+
### Requirements before using
|
33
|
+
* Ruby 2.2 or greater (I have not tested this with Ruby 2.5 but I assume it will work)
|
34
|
+
* I highly recommend installing RVM or RBENV.
|
35
|
+
* Install Ruby devkit or GCC C++ Dependencies (e.g. on osx: xcode-select --install). Basically, just make sure you can install the json gem. e.g. ```gem install json```
|
36
|
+
* If you get an error installing the above json gem, Google on how to fix it on your machine before proceeding.
|
37
|
+
* Android SDK Installed. See [here](https://www.androidcentral.com/installing-android-sdk-windows-mac-and-linux-tutorial)
|
38
|
+
* All Appium Dependencies Installed. See [here](https://github.com/isonic1/appium-workshop/blob/master/Appium%20Mac%20Installation%20Instructions.md) or goto [here](http://appium.io/docs/en/about-appium/getting-started/)
|
39
|
+
* Appium CLI installed via node npm. e.g ```npm install -g appium```
|
40
|
+
* Redis server installed and started. e.g. ```brew install redis```
|
41
|
+
* Make sure you set the Redis server to always start on bootup. e.g. ```brew services start redis```
|
42
|
+
|
43
|
+
### Gem Installation
|
44
|
+
* via rubygems.org ```gem install aaet```
|
45
|
+
* or locally from the cloned repo via ```gem install Appium-Native-Crawler/pkg/aaet-*.gem```
|
46
|
+
|
47
|
+
### Before you start
|
48
|
+
* Install all the requirements specified
|
49
|
+
* Run the example project in the examples folder
|
50
|
+
* cd Appium-Native-Crawler/examples
|
51
|
+
* Open the app-debug.txt in an editor or VIM to see example of usage. Don't change anything!
|
52
|
+
* Pick an emulator avd to use. Run ```emulator -list-avds```
|
53
|
+
* If you've installed the Android SDK correctly (and it's in your $PATH) this should output the AVD's on your machine. If don't have any of the latter (AVD's), open the Android AVD Manager and create one. Make sure you have the Intel HAXM accelerator installed also.
|
54
|
+
* Run CLI: ```aaet crawler -s 300 -e <avd name from step above> -c app-debug.txt --debug --trace```
|
55
|
+
* Or use a real device: ```aaet crawler -s 300 -u <uuid of connected device> -c app-debug.txt --debug --trace```
|
56
|
+
* If all goes well this will run the crawler for 5 minutes (300 seconds) or until a crash occurs.
|
57
|
+
* Open the HTML report generated in the reports folder with FIREFOX. Chrome, Safari won't display the performace report. I could use help fixing this so please add a PR if you know how to resolve it!
|
58
|
+
* The report gathers it's data from the output screenshots directory and json report and in the "runs" directory. The replay feature uses this json file to rerun which ever test you want. You can also store this metadata in a db/graphite for historical lookup and benchmarking.
|
59
|
+
* If you want to try with the Wordpress App. Go [here](https://github.com/wordpress-mobile/WordPress-Android#oauth2-authentication) and follow the instructions to create a developer account to get a unique app_id and app_secret to compile the app locally.
|
60
|
+
* You can then use the example wordpress.txt config file to crawl.
|
61
|
+
|
62
|
+
### How does it work?
|
63
|
+
* The crawler will run based on the CLI arguments and config file settings. The crawler detects all clickable and enabled elements on every view and iterates through them until something changes in the UI. Once it detects a change it then captures a screenshot, perforamnce data, amongst other metadata. Based on your max runtime setting (-s or --seconds) it will run until this times out or a crash occurs. After a timeout or crash occurs a report is automatically generated in the reports folder.
|
64
|
+
|
65
|
+
### Example Usage
|
66
|
+
* Crawl portrait "default": (-s (max runtime in seconds), -e (avd name or "em1 em2 em3"), -c (path to config file), --debug (print debug output))
|
67
|
+
* ```aaet crawler -s 300 -e EM1 -c path/to/configFile.txt --debug --trace```
|
68
|
+
* See all options: ```aaet crawler --help```
|
69
|
+
* Note: The Crawler automatically starts the emulator(s) if not already started.
|
70
|
+
|
71
|
+
* Crawl landscape: (-s (max runtime in seconds), -e (avd name), -c (path to config file), --debug (print debug output), -o (orientation))
|
72
|
+
* ```aaet crawler -s 300 -e EM1 -c wordpress.txt --debug -o landscape --trace ```
|
73
|
+
* See all options: ```aaet crawler --help```
|
74
|
+
* Note: Not all apps support landscape (e.g. app-debug.apk) so crawler will fallback to portrait
|
75
|
+
* Note: The Crawler automatically starts the emulator(s) if not already started.
|
76
|
+
|
77
|
+
* Replay: (-c (path to config file), -s (max runtime in seconds or until last crawl steps are finished), --debug (print debug output))
|
78
|
+
* ```aaet replay -c wordpress.txt -s 300 --debug --trace```
|
79
|
+
* See all options: ```aaet replay --help```
|
80
|
+
* Select the past crawl you want to replay by the choice list.
|
81
|
+
* Replay crawler will then load last used config settings and command line arguments unless you override them.
|
82
|
+
* Note: The Crawler automatically starts the emulator or connects to device last used in selection.
|
83
|
+
|
84
|
+
* Monkey: (-c (path to config file), -s (max runtime in seconds), --debug (print debug output), -e (avd name))
|
85
|
+
* ```aaet monkey -c wordpress.txt -s 300 --debug -e EM1 --trace```
|
86
|
+
* See all options: ```aaet monkey --help```
|
87
|
+
* Note: Not all apps are ideal for the monkey tester. Ideally, apps with lots of UI elements on each view work the best. If an app doesn't have many elements to interact with the monkey tester might appear to be doing nothing. This can be refactored of course and would love the help. Submit a PR!
|
88
|
+
* Note: The Crawler automatically starts the emulator(s) if not already started.
|
89
|
+
|
90
|
+
* Crawl & Translate: (-s (max runtime in seconds), -e (avd name), -c (path to config file), --debug (print debug output), --reset (Appium App Reset default: false), -l (languages array "en fr de"), --translate (Google Translate String))
|
91
|
+
* ```aaet crawler -s 120 -e EM1 -c wordpress.txt --debug --reset -l 'fr de' --translate --trace```
|
92
|
+
* See all options: ```aaet crawler --help```
|
93
|
+
* Note: The Crawler automatically starts the emulator(s) if not already started.
|
94
|
+
* Note: Your app must support multiple languages for this to work.
|
95
|
+
* Note: The app will iterate through each language at the given time in seconds. e.g. -s 120 and -l "fr de", it will crawl and collect metadata in each language for 2 minutes each or until a crash occurs.
|
96
|
+
* Note: Do not put a comma between language code, just a space. e.g. "en de fr"
|
97
|
+
* Note: Need Google API Key. Go [here](https://cloud.google.com/translate/docs/quickstart) to create dev account and get key. Set a GOOGLE_API_KEY environment variable or place key in config file.
|
98
|
+
|
99
|
+
* Crawl & Applitools: (-s (max runtime in seconds), -e (avd name), -c (path to config file), --debug (print debug output), --reset (Appium App Reset default: false), --applitools (run applitools tests defined in config file))
|
100
|
+
* ```aaet crawler -s 120 -e EM1 -c wordpress.txt --debug --reset --applitools --trace```
|
101
|
+
* See all options: ```aaet crawler --help```
|
102
|
+
* Note: The Crawler automatically starts the emulator(s) if not already started.
|
103
|
+
* Note: The Crawler will upload to applitools based on the tests you define in the config TOML file. Make sure you add your API Key in the config file or have a APPLITOOLS_API_KEY environment variable set.
|
104
|
+
|
105
|
+
* Crawl in Parallel: (-s (max runtime in seconds), -e (avd name or array "en fr de"), -c (path to config file), --debug (print debug output))
|
106
|
+
* ```aaet crawler -s 120 -e "Nexus1 MyEmulator" -c wordpress.txt --debug --trace```
|
107
|
+
* ```aaet crawler -s 120 -u "UUID1 UUID2" -c wordpress.txt --debug --trace```
|
108
|
+
* See all options: ```aaet crawler --help```
|
109
|
+
* Note: Do not put a comma between AVD's or UUID's, just a space. e.g. "AVD1 AVD2" or "UUID1 UUID2"
|
110
|
+
* Note: The Crawler automatically starts the emulator(s) if not already started.
|
111
|
+
* Note: You can force both orientations by passing ```--bothOrientations true``` This will only work when > 1 devices are running.
|
112
|
+
|
113
|
+
* Crawl on the Cloud: (-s (max runtime in seconds), -c (path to config file), --debug (print debug output), --cloud (run on cloud service defined in config file))
|
114
|
+
* ```aaet crawler -s 120 -c wordpress.txt --debug --cloud true --trace```
|
115
|
+
* See all options: ```aaet crawler --help```
|
116
|
+
* Make sure you have the cloud settings and cloud caps configured in the config files.
|
117
|
+
* Note: The performance and logcat data is not captured on cloud runs, only screenshots. You can get this additional metadata from the cloud provider.
|
118
|
+
* Note: You can force both orientations by passing ```--bothOrientations``` This will only work when > 1 devices are configured in cloud caps file.
|
119
|
+
|
120
|
+
* Note: The --config/-c can reference any file path. So if you have multple apps or versions you can configure your folder/file structure accordingly.
|
121
|
+
* Debugging: Passing --debug will print out a lot of debugging output. One such debugging output are the instance variables set which are derived dynamically based on the config and command line arguments/options and then passed into each class. See [here](https://github.com/isonic1/Appium-Native-Crawler/blob/master/run.rb#L46-L63) for example.
|
122
|
+
* Definitely look at the --help menu for each option (crawler, replay, monkey). This will tell you all the available arguments you can use. Also, look at the code for further reference!
|
123
|
+
|
124
|
+
### Crawling Your App
|
125
|
+
* Can your application be automated by Appium? Make sure you can actually run automation on your app with Appium before proceeding. Some apps have security settings to block automation or screenshot captures.
|
126
|
+
* Go [here](https://github.com/appium/sample-code/tree/master/sample-code/examples) and run one of the android example apps.
|
127
|
+
* Then configure your android app to run on Appium using one of these examples as reference to see if it works.
|
128
|
+
* If the above steps works for your app, continue to next steps to setup the crawler.
|
129
|
+
* Create a new config file for your app. e.g myAwesomeApp.txt
|
130
|
+
* Cut and paste the contents from the app-debug.txt into this file.
|
131
|
+
* Modify the capabilities to match your apps capabilities. You can add more capabilities specific to your app if you need to, though the crawler is not configured to handle anything other than the ones you see. Open an issue or better yet create a PR to handle these if needed.
|
132
|
+
* Note: This will not work with UiAutomator2 capability currently. That is in the works to implement.
|
133
|
+
* Just make sure the format of the TOML/config file is the same as the examples (app-debug.txt or wordpress.txt). Otherwise, you might get some funky errors due to unexpected parsing issues. I plan to switch to YAML config files which will be easier to lint.
|
134
|
+
* Also look at the wordpress.txt config file for further reference example.
|
135
|
+
* Use Android SDK uiautomatorviewer app, Bitbar's Appium Inspector, Appium Desktop App, or whichever hierarchy viewer tool you want to get the locator values you need from your app and place into the config file for the backLocators, multiClickLocators, loginPage, doNotClick, Applitools tests values.
|
136
|
+
* See [toml-rb](https://github.com/emancu/toml-rb) TOML gem for examples of different available field formats
|
137
|
+
|
138
|
+
### Reports Generated
|
139
|
+
|
140
|
+
<img src="https://www.dropbox.com/s/xrhl67ru1z2dh08/crawler-report-trimmed.gif?raw=1" width="800">
|
141
|
+
|
142
|
+
### Contributing
|
143
|
+
* Bug reports and pull requests are welcome on GitHub at https://github.com/isonic1/Appium-Native-Crawler/issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://github.com/isonic1/Appium-Native-Crawler/blob/master/CODE_OF_CONDUCT.md) code of conduct.
|
144
|
+
* Pull Request are highly welcomed and encouraged! See TODO's for list of things to be done.
|
145
|
+
|
146
|
+
### TODO's
|
147
|
+
* Implement iOS crawling
|
148
|
+
* Use YAML instead of TOML config files
|
149
|
+
* Implement Docker execution (Android Only).
|
150
|
+
* Perhaps with Kubernetes
|
151
|
+
* Remove or refactor activity parser
|
152
|
+
* DRY the code more
|
153
|
+
* Integrate with BrowserStack, Perfecto, and others.
|
154
|
+
* Add specs/tests
|
155
|
+
* Capture additional performance data. e.g. battery usage
|
156
|
+
* Implement gesture logic
|
157
|
+
* Generate accessibility report from json output
|
158
|
+
* Add wiki documentation
|
159
|
+
* Add more examples and documentation
|
160
|
+
* Refactor concurrent execution. Look for alternative to the Parallel gem.
|
161
|
+
* Refactor/Improve the ugly HTML Reports
|
162
|
+
* generate_reports.rb needs to be cleaned up.
|
163
|
+
* Implement UiAutomator2
|
164
|
+
* Some of the locator parsing logic will need to be updated and how the crawler obtains certain variables about the environment.
|
165
|
+
* Modify to run on Windows
|
166
|
+
* This actually wouldn't take too much effort other than time refactoring the directory creation using ruby libraries and obtaining process id's.
|
167
|
+
|
168
|
+
### Tests to add
|
169
|
+
* Validate crawler and monkey tester in landscape and portrait locally and cloud
|
170
|
+
* Validate parallel execution locally and cloud
|
171
|
+
* Translate app strings
|
172
|
+
* Validate with Applitools
|
173
|
+
* Validate replay locally and in cloud
|
174
|
+
* Report generation
|
175
|
+
|
176
|
+
### License
|
177
|
+
(Apache 2.0)[https://github.com/isonic1/Appium-Native-Crawler/blob/master/LICENSE]
|