mini_autobot 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +25 -17
- data/lib/mini_autobot/connector.rb +6 -7
- data/lib/mini_autobot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 304864d910ed49b64b576de654ff04d5173e534b
|
4
|
+
data.tar.gz: c7b5881befcfedf13e325e0f3581d7066bd4d04b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b57d2ea5b02d55fe7e14e886d32f9ea8cdc7541394bd647297365633171fed553c200ecc101aa67cf81cb91d14d3925d1e46c7d013c3e1f5578249ffbaed208
|
7
|
+
data.tar.gz: f14c61b84e901e72cf1d53cdd3cad30004af1b8ece8d9719efbcf0ecf3f429d081013ac7e902053236517d0fec52bfdd4d987301e743ed5fc9b404aff23a163b
|
data/README.md
CHANGED
@@ -60,7 +60,9 @@ There are configuration files that are required for it to work properly:
|
|
60
60
|
* Connector profiles, in `config/mini_autobot/connectors/*.yml`, which define WebDriver
|
61
61
|
properties, e.g., Firefox, SauceLabs;
|
62
62
|
* Environment profiles, in `config/mini_autobot/environments/*.yml`, which define which
|
63
|
-
environment tests are going to run against, e.g., QA, production;
|
63
|
+
environment tests are going to run against, e.g., QA, production;
|
64
|
+
* Test Suite definition, in `config/mini_autobot/test_suite.yml`, which defines tags being used
|
65
|
+
to mark tests for different suites, eg. :non_regression
|
64
66
|
|
65
67
|
A typical config file structure looks like this:
|
66
68
|
|
@@ -86,7 +88,7 @@ A typical config file structure looks like this:
|
|
86
88
|
A Tests Directory Structure file is a regular YAML file, which tells mini_autobot
|
87
89
|
where to find tests and which tests to load.
|
88
90
|
|
89
|
-
|
91
|
+
A typical config file for this looks like:
|
90
92
|
|
91
93
|
---
|
92
94
|
tests_dir:
|
@@ -272,9 +274,14 @@ environment:
|
|
272
274
|
---
|
273
275
|
root: 'http://www.env.host_address.com'
|
274
276
|
|
277
|
+
Environment variable as value of `root` is also supported, eg.
|
278
|
+
|
279
|
+
---
|
280
|
+
root: <%= ENV['DYNAMIC_APP_URL'] %>
|
281
|
+
|
275
282
|
#### Test Suite
|
276
283
|
|
277
|
-
A typical test suite configuration file
|
284
|
+
A typical test suite configuration file looks like this:
|
278
285
|
|
279
286
|
----
|
280
287
|
regression:
|
@@ -298,9 +305,7 @@ or find the appropriate tag_to_exclude in config/mini_autobot/test_suite.yml
|
|
298
305
|
|
299
306
|
## Executing Tests
|
300
307
|
|
301
|
-
|
302
|
-
and an environment profile; see the _Configuration_ section below if you want
|
303
|
-
to add new profiles.
|
308
|
+
See the _Configuration_ section above to have the minimum setup before running tests.
|
304
309
|
|
305
310
|
To run test headlessly on default environment(stg), set connector to GhostDriver,
|
306
311
|
which is Phantomjs's implementation of webdriver protocal, run:
|
@@ -319,14 +324,14 @@ Some profiles may contain a section named `overrides`, for example, to support
|
|
319
324
|
multiple browsers in a remote execution environment like SauceLabs. Such
|
320
325
|
profiles can be used like this:
|
321
326
|
|
322
|
-
$ bundle exec mini_autobot --connector=saucelabs:linux_ff20 --env=
|
327
|
+
$ bundle exec mini_autobot --connector=saucelabs:linux_ff20 --env=rent_qa
|
323
328
|
|
324
329
|
which will use the `linux_ff20` override in the `saucelabs` connector profile,
|
325
|
-
and run tests against the `
|
330
|
+
and run tests against the `rent_qa` environment. Multiple overrides may be specified
|
326
331
|
one after the other, after the profile name, and always separated by colons,
|
327
332
|
for example:
|
328
333
|
|
329
|
-
$ bundle exec mini_autobot -c saucelabs:linux_ff20:qateam:notimeouts -e
|
334
|
+
$ bundle exec mini_autobot -c saucelabs:linux_ff20:qateam:notimeouts -e rent_qa
|
330
335
|
|
331
336
|
To make a specific connector or environment profile always be the default on
|
332
337
|
your machine or shell session, set the `AUTOBOT_CONNECTOR` or `AUTOBOT_ENV`
|
@@ -334,9 +339,9 @@ environment variables respectively. For example, you can add the following to
|
|
334
339
|
your shell profile (`.bash_profile` for bash or `.zlogin` for zsh):
|
335
340
|
|
336
341
|
export AUTOBOT_CONNECTOR=firefox
|
337
|
-
export AUTOBOT_ENV=
|
342
|
+
export AUTOBOT_ENV=rent_qa
|
338
343
|
|
339
|
-
Refer to the _Configuration_ section
|
344
|
+
Refer to the _Configuration_ section above for advanced use cases, and refer
|
340
345
|
to `mini_autobot -h` for a complete list of command line options.
|
341
346
|
|
342
347
|
|
@@ -405,9 +410,6 @@ For example, to run all tests in sign_in.rb,
|
|
405
410
|
|
406
411
|
$ bundle exec mini_autobot -t class_signin
|
407
412
|
|
408
|
-
|
409
|
-
Read Rakefile for how to run test with default settings through rake tasks
|
410
|
-
|
411
413
|
#### Debug output
|
412
414
|
|
413
415
|
It's not good style to clutter your code with puts messages. Instead, use the
|
@@ -445,11 +447,11 @@ To see a list of options and reporters from gem TAPOUT,
|
|
445
447
|
|
446
448
|
To use our custom reporter, FancyTapReporter,
|
447
449
|
|
448
|
-
$ bundle exec mini_autobot --tapy | tapout -r
|
450
|
+
$ bundle exec mini_autobot --tapy | tapout -r $(bundle show mini_autobot)/lib/tapout/custom_reporters/fancy_tap_reporter.rb fancytap
|
449
451
|
|
450
452
|
To make it presentable to jenkins or other webpage, supress color/highlight codes,
|
451
453
|
|
452
|
-
$ bundle exec mini_autobot --tapy | tapout --no-color -r
|
454
|
+
$ bundle exec mini_autobot --tapy | tapout --no-color -r $(bundle show mini_autobot)/lib/tapout/custom_reporters/fancy_tap_reporter.rb fancytap
|
453
455
|
|
454
456
|
|
455
457
|
## Test Cases
|
@@ -494,7 +496,6 @@ Similarly, test cases should be provided as an attribute on the class:
|
|
494
496
|
See {Running a Subset of Tests} for information on the `tags` option.
|
495
497
|
|
496
498
|
|
497
|
-
|
498
499
|
## Page Objects
|
499
500
|
|
500
501
|
Parts of a page should be added under `MiniAutobot::PageObjects::Components`, and
|
@@ -536,6 +537,13 @@ its best to return the current page as an object, ie:
|
|
536
537
|
end
|
537
538
|
Overlays are technically not new pages, and should be differentiated from actual pages.
|
538
539
|
|
540
|
+
#### Widgets
|
541
|
+
|
542
|
+
A widget represents a portion (an element) of a page that is repeated
|
543
|
+
or reproduced multiple times, either on the same page, or across multiple
|
544
|
+
page objects or page modules.
|
545
|
+
|
546
|
+
|
539
547
|
## Best Practice
|
540
548
|
|
541
549
|
* Always use local variables, unless _absolutely_ necessary, then use instance
|
@@ -55,13 +55,12 @@ module MiniAutobot
|
|
55
55
|
|
56
56
|
return unless MiniAutobot.settings.auto_finalize?
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
58
|
+
while self.finalization_queue.size > 0
|
59
|
+
connector = self.finalization_queue.pop
|
60
|
+
begin
|
61
|
+
connector.finalize!
|
62
|
+
rescue => e
|
63
|
+
MiniAutobot.logger.error("Could not finalize Connector(##{connector.object_id}): #{e.message}")
|
65
64
|
end
|
66
65
|
end
|
67
66
|
end
|
data/lib/mini_autobot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_autobot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ripta Pasay
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08-
|
13
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|