test-factory 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +11 -2
- data/test-factory.gemspec +1 -1
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -12,10 +12,19 @@ With TestFactory you have the ability to...
|
|
12
12
|
|
13
13
|
1. Easily instantiate pages in a consistent manner
|
14
14
|
2. Concisely describe elements on a page, keeping it DRY by avoiding repetition of element identifiers
|
15
|
-
3. Provide higher-level methods that use the elements to perform user-oriented functions
|
15
|
+
3. Provide higher-level methods that use the page classes and elements to perform user-oriented functions, with minimal lines of code
|
16
16
|
|
17
17
|
Tremendous thanks is due to [Alister Scott](http://watirmelon.com), whose [custom page object code](https://github.com/alisterscott/wmf-custom-page-object) for the Wikimedia Foundation provided the inspiration for this gem.
|
18
18
|
|
19
|
+
Summary
|
20
|
+
-------
|
21
|
+
|
22
|
+
Using the TestFactory properly involves three distinct steps:
|
23
|
+
|
24
|
+
1. Creating page classes that contain references to the elements on your web page. For this you use the PageFactory class. Working on page classes requires that you have a strong command of Watir and basic skills with Ruby.
|
25
|
+
2. Creating data objects that utilize your page classes and elements to build methods that perform user-oriented tasks. For this you use the DataFactory module. Working on data objects requires you have good familiarity with Watir and strong Ruby skills.
|
26
|
+
3. Creating test scenarios using your favorite test framework (like Cucumber or Rspec) and your data objects. The methods in the Foundry class are useful here. Working at this level requires only basic skills with Ruby and Watir, but a strong command of your DSL (the thing you're building with TestFactory).
|
27
|
+
|
19
28
|
How to Start
|
20
29
|
------------
|
21
30
|
|
@@ -23,7 +32,7 @@ First install the gem, of course.
|
|
23
32
|
|
24
33
|
gem install test-factory
|
25
34
|
|
26
|
-
Now you'll want to start building your own page classes, using the methods in
|
35
|
+
Now you'll want to start building your own page classes, using the methods in TestFactory as your tool chest.
|
27
36
|
|
28
37
|
Please note that the following example is *very* simplified and contrived, to keep every step as compartmentalized as possible. Once you've read through this, it is strongly recommended that you visit an actual repository that is using the test factory.
|
29
38
|
|
data/test-factory.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'test-factory'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.1'
|
4
4
|
s.summary = %q{rSmart's framework for creating automated testing scripts}
|
5
5
|
s.description = %q{This gem provides a set of modules and methods to help quickly and DRYly create a test automation framework using Ruby and Watir (or watir-webdriver).}
|
6
6
|
s.files = Dir.glob("**/**/**")
|