testcentricity_web 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +52 -11
- data/lib/testcentricity_web/version.rb +1 -1
- data/testcentricity_web.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d1c25417263a8e482daf9053e4f28d1fc3283e7
|
4
|
+
data.tar.gz: 583b938a2eaca21ead5afa17aa62a07f4303137b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e68237af398f2488d7392c191f0ba51a49292873313afa4c0cda5cb237181fbec10aa33441b619726b30d873c645f4aee1ceb3ef4e1f505e9e974d0d7c5c61b1
|
7
|
+
data.tar.gz: bde9567c48c39a96de491e990cf1a917e22ede563efbe45210b598726c987bbc69ea7c8aa95f2c9df8da5ca96d91f5b184041a6801aa93b8091a4c29c9b3e276
|
data/README.md
CHANGED
@@ -1,18 +1,13 @@
|
|
1
1
|
# TestCentricityWeb
|
2
2
|
|
3
3
|
The TestCentricity™ core generic framework for desktop and mobile web site testing implements a Page Object and Data Object Model DSL for
|
4
|
-
use with Cucumber, Capybara, and
|
4
|
+
use with Cucumber, Capybara, and Selenium-Webdriver.
|
5
5
|
|
6
6
|
The TestCentricity™ web gem supports running testing against the following web test targets:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
## Web Test Automation Framework Implementation
|
14
|
-
|
15
|
-
<img src="http://i.imgur.com/K4XGTQi.jpg" width="1024" alt="Web Framework Overview" title="Web Framework Overview">
|
7
|
+
- locally hosted desktop browsers (Firefox, Chrome, Safari, IE, or Edge)
|
8
|
+
- locally hosted emulated iOS and Android mobile browsers (using Firefox)
|
9
|
+
- a "headless" browser (using Poltergeist and PhantomJS)
|
10
|
+
- cloud hosted desktop or mobile web browsers using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services.
|
16
11
|
|
17
12
|
|
18
13
|
## Installation
|
@@ -78,6 +73,33 @@ to update the affected feature file, scenarios, or step definitions.
|
|
78
73
|
Your **Page Object** class definitions should be contained within individual *.rb* files in the ***features/support/pages*** folder of your
|
79
74
|
test automation project. You define new **Page Objects** as shown below:
|
80
75
|
|
76
|
+
class LoginPage < TestCentricity::PageObject
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
class HomePage < TestCentricity::PageObject
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
### Adding Traits to your Page Object
|
85
|
+
|
86
|
+
Web pages typically have names and URLs associated with them. Web pages also typically have a unique object or attribute that, when present,
|
87
|
+
indicates that the page's contents have fully loaded.
|
88
|
+
|
89
|
+
The ***page_name*** trait is registered with the **PageManager** object, which includes a **find_page** method that takes a page name as a
|
90
|
+
parameter and returns an instance of the associated **Page Object**.
|
91
|
+
|
92
|
+
A ***page_url*** trait should be defined if a page can be directly loaded using a URL. If you set Capybara's *app_host*, or specify a base URL
|
93
|
+
when calling the ***WebDriverConnect.initialize_web_driver*** method, then your ***page_url*** trait can be the relative URL slug that will
|
94
|
+
be appended to the base URL specified in *app_host*. Specifying a ***page_url*** trait is optional, as not all web pages can be directly loaded
|
95
|
+
via a URL.
|
96
|
+
|
97
|
+
A ***page_locator*** trait is defined if a page has a unique object or attribute that exists once the page's contents have fully loaded. The
|
98
|
+
***page_locator*** trait is a CSS or Xpath expression that uniquely identifies the object or attribute. The **verify_page_exists** method waits
|
99
|
+
for the ***page_locator*** trait to exist.
|
100
|
+
|
101
|
+
You define your page's **Traits** as shown below:
|
102
|
+
|
81
103
|
class LoginPage < TestCentricity::PageObject
|
82
104
|
trait(:page_name) { 'Login' }
|
83
105
|
trait(:page_url) { "/sign_in" }
|
@@ -168,6 +190,17 @@ A **PageSection Object** may contain other **PageSection Objects**.
|
|
168
190
|
Your **PageSection** class definitions should be contained within individual *.rb* files in the ***features/support/sections*** folder of
|
169
191
|
your test automation project. You define new **PageSection Objects** as shown below:
|
170
192
|
|
193
|
+
class SearchForm < TestCentricity::PageSection
|
194
|
+
end
|
195
|
+
|
196
|
+
|
197
|
+
### Adding Traits to a PageSection Object
|
198
|
+
|
199
|
+
A **PageSection Object** typically has a root node object that encapsulates a collection of **UI Elements**. The ***section_locator*** trait
|
200
|
+
specifies the CSS or Xpath expression that uniquely identifies that root node object.
|
201
|
+
|
202
|
+
You define your page section's **Traits** as shown below:
|
203
|
+
|
171
204
|
class SearchForm < TestCentricity::PageSection
|
172
205
|
trait(:section_locator) { "//form[@id='gnav-search']" }
|
173
206
|
end
|
@@ -336,7 +369,8 @@ To specify the emulated device's screen orientation, you set the **ORIENTATION**
|
|
336
369
|
### Remotely hosted desktop and mobile web browsers
|
337
370
|
|
338
371
|
You can run your automated tests against remotely hosted desktop and mobile web browsers using the BrowserStack, CrossBrowserTesting,
|
339
|
-
Sauce Labs, or TestingBot services.
|
372
|
+
Sauce Labs, or TestingBot services. If your tests are running against a web site hosted on your local computer (localhost), or on a
|
373
|
+
staging server inside your LAN, you must set the **TUNNELING** Environment Variable to true.
|
340
374
|
|
341
375
|
|
342
376
|
#### Remote desktop browsers on the BrowserStack service
|
@@ -757,6 +791,13 @@ landscape orientation running on the BrowserStack service:
|
|
757
791
|
|
758
792
|
|
759
793
|
|
794
|
+
## Web Test Automation Framework Implementation
|
795
|
+
|
796
|
+
<img src="http://i.imgur.com/K4XGTQi.jpg" width="1024" alt="Web Framework Overview" title="Web Framework Overview">
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
|
760
801
|
## Copyright and License
|
761
802
|
|
762
803
|
TestCentricity™ Framework is Copyright (c) 2014-2016, Tony Mrozinski.
|
data/testcentricity_web.gemspec
CHANGED
@@ -11,9 +11,9 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.authors = ['A.J. Mrozinski']
|
12
12
|
spec.email = ['test_automation@icloud.com']
|
13
13
|
spec.summary = %q{A Page Object and Data Object Model Framework for desktop and mobile web testing}
|
14
|
-
spec.description
|
14
|
+
spec.description = %q{
|
15
15
|
TestCentricity™ core generic framework for desktop and mobile web site testing implements a Page Object Model DSL,
|
16
|
-
for use with Cucumber, Capybara, and
|
16
|
+
for use with Cucumber, Capybara, and Selenium-Webdriver. Supports testing against locally hosted desktop browsers
|
17
17
|
(Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated iOS and Android mobile browsers (using Firefox), a
|
18
18
|
"headless" browser (using Poltergeist and PhantomJS), or on cloud hosted browsers using the BrowserStack, Sauce Labs,
|
19
19
|
CrossBrowserTesting, or TestingBot services.}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ dependencies:
|
|
145
145
|
description: |2-
|
146
146
|
|
147
147
|
TestCentricity™ core generic framework for desktop and mobile web site testing implements a Page Object Model DSL,
|
148
|
-
for use with Cucumber, Capybara, and
|
148
|
+
for use with Cucumber, Capybara, and Selenium-Webdriver. Supports testing against locally hosted desktop browsers
|
149
149
|
(Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated iOS and Android mobile browsers (using Firefox), a
|
150
150
|
"headless" browser (using Poltergeist and PhantomJS), or on cloud hosted browsers using the BrowserStack, Sauce Labs,
|
151
151
|
CrossBrowserTesting, or TestingBot services.
|