fitnexus 0.0.1

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.
Files changed (38) hide show
  1. data/.gitignore +6 -0
  2. data/History.md +12 -0
  3. data/MIT-LICENSE +22 -0
  4. data/README.md +130 -0
  5. data/bin/fitnexus +18 -0
  6. data/fitnexus.gemspec +19 -0
  7. data/lib/fitnexus/project.rb +156 -0
  8. data/lib/fitnexus/template/FitNesseRoot/CukableTemplate/FeedKitty/content.txt +8 -0
  9. data/lib/fitnexus/template/FitNesseRoot/CukableTemplate/FeedKitty/properties.xml +12 -0
  10. data/lib/fitnexus/template/FitNesseRoot/CukableTemplate/SetUp/content.txt +4 -0
  11. data/lib/fitnexus/template/FitNesseRoot/CukableTemplate/SetUp/properties.xml +11 -0
  12. data/lib/fitnexus/template/FitNesseRoot/CukableTemplate/content.txt +12 -0
  13. data/lib/fitnexus/template/FitNesseRoot/CukableTemplate/properties.xml +11 -0
  14. data/lib/fitnexus/template/FitNesseRoot/FrontPage/content.txt +8 -0
  15. data/lib/fitnexus/template/FitNesseRoot/FrontPage/properties.xml +13 -0
  16. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/DemoPage/content.txt +16 -0
  17. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/DemoPage/properties.xml +12 -0
  18. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/GoogleFor/content.txt +10 -0
  19. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/GoogleFor/properties.xml +12 -0
  20. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/content.txt +3 -0
  21. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/properties.xml +11 -0
  22. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/SetUp/content.txt +7 -0
  23. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/SetUp/properties.xml +11 -0
  24. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/content.txt +10 -0
  25. data/lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/properties.xml +11 -0
  26. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/LoginTest/content.txt +15 -0
  27. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/LoginTest/properties.xml +12 -0
  28. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/ScenarioLibrary/content.txt +12 -0
  29. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/ScenarioLibrary/properties.xml +11 -0
  30. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/SetUp/content.txt +4 -0
  31. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/SetUp/properties.xml +11 -0
  32. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/content.txt +12 -0
  33. data/lib/fitnexus/template/FitNesseRoot/RselTemplate/properties.xml +11 -0
  34. data/lib/fitnexus/template/FitNesseRoot/files/css/fitnesse.css +91 -0
  35. data/lib/fitnexus/template/Gemfile +6 -0
  36. data/lib/fitnexus/template/plugins.properties +1 -0
  37. data/lib/fitnexus/template/run.sh +4 -0
  38. metadata +103 -0
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ *.class
2
+ *.zip
3
+ FitNesseRoot/RecentChanges/*
4
+ FitNesseRoot/ErrorLogs
5
+ FitNesseRoot/files/testResults
6
+ .rvmrc
data/History.md ADDED
@@ -0,0 +1,12 @@
1
+ FitNexus History
2
+ ================
3
+
4
+ 0.0.1
5
+ -----
6
+
7
+ - Initial public release
8
+ - Lightweight script to install a FitNexus project
9
+ - Installs FitNesse .jar
10
+ - Installs Mastiffe from GitHub
11
+ - Adds a Gemfile to make rsel/cukable/rubyslim installation easier
12
+
data/MIT-LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2010 Eric Pierce
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,130 @@
1
+ FitNexus
2
+ ========
3
+
4
+ This project aims to include a set of plugins and add-ons to [FitNesse](http://fitnesse.org/)
5
+ to enhance its capabilities and make it into a more full-featured testing platform. The
6
+ add-ons include:
7
+
8
+ - [Cukable](http://github.com/wapcaplet/cukable): [Cucumber](http://cukes.info)
9
+ frontend for FitNesse
10
+ - [Mastiffe](http://github.com/Ken-g6/Mastiffe): Manual testing interface for FitNesse
11
+ - [Rsel](http://github.com/a-e/rsel): Ruby-based Selenium support for FitNesse
12
+
13
+ FitNexus is being developed by the [Automation Excellence](http://github.com/a-e)
14
+ team, and is still in early development. So far, it has only been tested on
15
+ Linux; it might work on OSX, but it will definitely not work on Windows.
16
+
17
+
18
+ Installation
19
+ ------------
20
+
21
+ FitNexus is distributed as a lightweight gem file, and consists primarily of a
22
+ Ruby script that installs and configures a new FitNesse wiki in a directory of
23
+ your choice. To install FitNexus:
24
+
25
+ $ gem install fitnexus
26
+
27
+ To create a new project in `/tmp/foo`, run:
28
+
29
+ $ fitnexus /tmp/foo
30
+
31
+ If all goes to plan, this will create the following files and folders in
32
+ `/tmp/foo`:
33
+
34
+ - `fitnesse.jar`: FitNesse executable
35
+ - `FitNesseRoot`: Wiki files and content
36
+ - `Gemfile`: Gem dependencies to be installed
37
+ - `mastiffe`: Symlink to Mastiffe files
38
+ - `Mastiffe`: Git clone of Mastiffe
39
+ - `plugins.properties`: FitNesse configuration
40
+ - `run.sh`: Script to start up the wiki
41
+
42
+ There's one more thing you need to do manually before FitNexus will be fully
43
+ installed, and that's to install the gem dependencies (Rsel and Cukable). This
44
+ is not handled automatically because FitNexus doesn't know whether you want to
45
+ use [RVM](http://beginrescueend.com) or not.
46
+
47
+ If you do NOT want to use RVM, you need to ensure that you have Ruby and
48
+ Rubygems installed systemwide. Then do:
49
+
50
+ $ cd /tmp/foo
51
+ $ gem install bundler
52
+ $ bundle install
53
+
54
+ Then skip ahead to "Running FitNexus" below.
55
+
56
+ If you do want to use RVM, then begin by doing this:
57
+
58
+ $ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
59
+
60
+ [Follow the instructions](http://www.beginrescueend.com/rvm/install/) to configure it.
61
+ When you get to the part about installing Ruby, use Ruby Enterprise Edition 1.8.7:
62
+
63
+ $ rvm install ree
64
+
65
+ Switch to that ruby:
66
+
67
+ $ rvm ree
68
+
69
+ Create a gemset for FitNexus:
70
+
71
+ $ rvm gemset create fitnexus
72
+ $ rvm ree@fitnexus
73
+
74
+ Once your gemset is created, you can switch to it at any time with `rvm
75
+ ree@fitnexus`. To do this automatically whenever you `cd` into the `FitNexus`
76
+ directory, create an `.rvmrc` file containing that command:
77
+
78
+ $ echo "rvm ree@fitnexus" > .rvmrc
79
+
80
+ Install bundler in your global gemset:
81
+
82
+ $ rvm ree@global
83
+ $ gem install bundler
84
+
85
+ Then install the gem dependencies for FitNexus:
86
+
87
+ $ rvm ree@fitnexus
88
+ $ bundle install
89
+
90
+
91
+ Running FitNexus
92
+ ----------------
93
+
94
+ FitNexus is just a regular FitNesse wiki with a few enhancements. A startup
95
+ script is provided, which you can edit to meet your needs (for instance, if you
96
+ want to run on a port other than 8080). Just run this:
97
+
98
+ $ ./run.sh
99
+
100
+ Then visit `http://localhost:8080` (or whatever hostname you're using) in your
101
+ web browser. You should get a FitNexus welcome page, with links to some
102
+ templates that will help you get started writing tests.
103
+
104
+
105
+
106
+ License
107
+ -------
108
+ The MIT License
109
+
110
+ Copyright (c) 2011 Automation Excellence
111
+
112
+ Permission is hereby granted, free of charge, to any person obtaining
113
+ a copy of this software and associated documentation files (the
114
+ "Software"), to deal in the Software without restriction, including
115
+ without limitation the rights to use, copy, modify, merge, publish,
116
+ distribute, sublicense, and/or sell copies of the Software, and to
117
+ permit persons to whom the Software is furnished to do so, subject to
118
+ the following conditions:
119
+
120
+ The above copyright notice and this permission notice shall be
121
+ included in all copies or substantial portions of the Software.
122
+
123
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
124
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
125
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
126
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
127
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
128
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
129
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
130
+
data/bin/fitnexus ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.dirname(__FILE__) + '/../lib/fitnexus/project'
4
+
5
+ USAGE = "fitnexus: Create a FitNexus project
6
+ Usage:
7
+ fitnexus <path>
8
+ Where <path> is the directory where you want to create the new project."
9
+
10
+ # Main program
11
+ if ARGV.count != 1
12
+ puts USAGE
13
+ Process.exit
14
+ else
15
+ include FitNexus
16
+ create_project(ARGV.pop)
17
+ end
18
+
data/fitnexus.gemspec ADDED
@@ -0,0 +1,19 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "fitnexus"
3
+ s.version = "0.0.1"
4
+ s.summary = "FitNesse with benefits"
5
+ s.description = <<-EOS
6
+ FitNexus installs a FitNesse wiki with several enhancements, including
7
+ Mastiffe for manual testing, Rsel for Selenium testing, and Cukable for
8
+ Cucumber testing.
9
+ EOS
10
+ s.authors = ["Automation Excellence"]
11
+ s.email = "wapcaplet88@gmail.com"
12
+ s.homepage = "http://github.com/a-e/fitnexus"
13
+ s.platform = Gem::Platform::RUBY
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.require_path = 'lib'
17
+
18
+ s.executables = ['fitnexus']
19
+ end
@@ -0,0 +1,156 @@
1
+ require 'fileutils'
2
+ require 'open3'
3
+ require 'timeout'
4
+ require 'ftools' # For File.copy
5
+
6
+ FITNESSE_VERSION = "20110104"
7
+ FITNESSE_DOWNLOAD = "http://fitnesse.org/fitnesse.jar?responder=releaseDownload\\&release=#{FITNESSE_VERSION}"
8
+
9
+ module FitNexus
10
+
11
+ # Display a prompt with the given question. If the user answers
12
+ # 'y' or 'Y', return true. Otherwise, return false.
13
+ def prompt(question)
14
+ print("#{question} [y/N]: ")
15
+ answer = gets.strip.downcase
16
+ if answer == 'y'
17
+ return true
18
+ else
19
+ return false
20
+ end
21
+ end
22
+
23
+
24
+ # Attempt to create a new directory at the given `path`. If
25
+ # a file or directory already exists there
26
+ def create_dir(path)
27
+ is_file = File.file?(path)
28
+ is_dir = File.directory?(path)
29
+
30
+ # Check for existing file/dir, and offer to overwrite
31
+ if is_file || is_dir
32
+ puts "File #{path} already exists." if is_file
33
+ puts "Directory #{path} already exists." if is_dir
34
+
35
+ if prompt("WARNING: Existing #{path} will be deleted. Continue?")
36
+ puts "Removing existing #{path} ..."
37
+ FileUtils.rm_rf(path)
38
+ else
39
+ puts "Please use another directory."
40
+ Process.exit
41
+ end
42
+ end
43
+
44
+ puts "Creating directory #{path} ..."
45
+ FileUtils.mkdir_p(path)
46
+ end
47
+
48
+
49
+ # Download a fitnesse.jar into the given path.
50
+ def download_fitnesse(path)
51
+ puts "Downloading fitnesse.jar version #{FITNESSE_VERSION} ..."
52
+ Dir.chdir(path) do
53
+ `wget --quiet #{FITNESSE_DOWNLOAD} -O fitnesse.jar`
54
+ end
55
+ end
56
+
57
+
58
+ # Create the FitNesseRoot directory hierarchy in the given path,
59
+ # by starting fitnesse.jar and waiting for it to begin producing
60
+ # output. A bit of hack, but gets the job done.
61
+ def create_fitnesse_root(path)
62
+ puts "Temporarily starting FitNesse to create FitNesseRoot ..."
63
+ Dir.chdir(path) do
64
+ cmd = "java -jar fitnesse.jar -p 8080"
65
+ pipe = IO.popen(cmd)
66
+
67
+ # This will block until FitNesse starts up and writes to stdout
68
+ line = pipe.gets
69
+
70
+ fitnesse_started = (line =~ /Started/)
71
+ root_dir = File.join(path, 'FitNesseRoot')
72
+ root_created = File.directory?(root_dir)
73
+
74
+ # If FitNesse started, kill it
75
+ if fitnesse_started
76
+ puts "Stopping FitNesse server ..."
77
+ Process.kill 'HUP', pipe.pid
78
+ if root_created
79
+ puts "Created #{root_dir}"
80
+ else
81
+ puts "Error: #{root_dir} wasn't created. Quitting."
82
+ Process.exit
83
+ end
84
+ # If it didn't start, display an appropriate message and/or quit
85
+ else
86
+ if root_created
87
+ puts "FitNesse didn't start, but that's OK."
88
+ puts "Created #{root_dir}"
89
+ else
90
+ puts "Error: #{root_dir} wasn't created. Quitting."
91
+ Process.exit
92
+ end
93
+ end
94
+ end
95
+ end
96
+
97
+
98
+ # Install project template onto `path`
99
+ def install_template(path)
100
+ puts "Installing project template to #{path} ..."
101
+ template_dir = File.expand_path('../template', __FILE__)
102
+ FileUtils.cp_r("#{template_dir}/.", path)
103
+ end
104
+
105
+
106
+ # Install Mastiffe into the given path
107
+ def install_mastiffe(path)
108
+ puts "Installing Mastiffe into #{path} ..."
109
+ Dir.chdir(path) do
110
+ `git clone git://github.com/a-e/Mastiffe.git`
111
+ `ln -sv #{path}/Mastiffe/FitNesseRoot/files/mastiffe #{path}/FitNesseRoot/files/mastiffe`
112
+ `ln -sv #{path}/Mastiffe/mastiffe #{path}/mastiffe`
113
+ end
114
+ end
115
+
116
+ def startup_message(path)
117
+ puts "------------------"
118
+ puts "FitNexus installer"
119
+ puts "------------------"
120
+ end
121
+
122
+ def success_message(path)
123
+ puts "Done!"
124
+ puts "-----"
125
+ puts "You still need to install some gems manually; a bundler Gemfile is"
126
+ puts "provided, so all you really need to do is:"
127
+ puts " $ cd #{path}"
128
+ puts " $ gem install bundler"
129
+ puts " $ bundle install"
130
+ puts "But there are some extra steps if you want to use RVM. See the README:"
131
+ puts " http://github.com/a-e/FitNexus"
132
+ puts "for more information."
133
+ puts ""
134
+ puts "Once all gems are installed, you can start using your new wiki:"
135
+ puts " $ cd #{path}"
136
+ puts " $ ./run.sh"
137
+ puts "Please report any problems to http://github.com/a-e/FitNexus/issues"
138
+ puts "Enjoy!"
139
+ end
140
+
141
+ # Create a FitNexus project in the given path.
142
+ def create_project(path)
143
+ path = File.expand_path(path)
144
+ startup_message(path)
145
+ create_dir(path)
146
+ download_fitnesse(path)
147
+ create_fitnesse_root(path)
148
+ install_mastiffe(path)
149
+ install_template(path)
150
+ # TODO: Error handling
151
+ success_message(path)
152
+ end
153
+
154
+ end # module FitNexus
155
+
156
+
@@ -0,0 +1,8 @@
1
+ This page is an example of a Cukable feature. The steps in this table must be defined normally in your Cucumber step definitions.
2
+
3
+ !| Table: Cuke |
4
+ | Feature: Feed kitty |
5
+ | Scenario: Canned food |
6
+ | Given I have a can of cat food |
7
+ | When I feed it to my cat |
8
+ | Then the cat should purr |
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Test/>
10
+ <Versions>true</Versions>
11
+ <WhereUsed>true</WhereUsed>
12
+ </properties>
@@ -0,0 +1,4 @@
1
+ This page sets up your tests, and is automatically loaded by all sibling pages and their descendants. For Cukable, you only need one thing here:
2
+
3
+ !| import |
4
+ | Cukable |
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,12 @@
1
+ This subwiki has some examples of how to write automated Cucumber tests using Cukable. See the [[Cukable documentation][http://rdoc.info/github/wapcaplet/cukable/frames]] for more comprehensive information.
2
+
3
+ If you already have a suite of Cucumber tests, and you'd like to convert them for use by Cukable, [[use the cuke2fit script][http://rdoc.info/github/wapcaplet/cukable/master/file/docs/converting.md]]. You'll also need to [[configure Cucumber with the Slim JSON output formatter][http://rdoc.info/github/wapcaplet/cukable/master/file/docs/install.md]].
4
+
5
+ The main subwiki for your Cukable tests must include these lines:
6
+ !define TEST_SYSTEM {slim}
7
+ !define TEST_RUNNER {rubyslim}
8
+ !define COMMAND_PATTERN {rubyslim}
9
+
10
+ If you're using [[Bundler][http://gembundler.com]], you may need to change ''rubyslim'' to ''bundle exec rubyslim'' in the lines above.
11
+
12
+ !contents -R2 -g -p -f -h
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,8 @@
1
+ !1 Welcome to !-FitNexus-!
2
+
3
+ Now that you've set up your !-FitNexus-! wiki, you can start writing some tests. Check out the templates below to get started.
4
+
5
+ * MastiffeTemplate - for manual tests
6
+ * RselTemplate - for automated tests using Selenium
7
+ * CukableTemplate - for automated tests using Cucumber
8
+
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit/>
4
+ <Files/>
5
+ <Help/>
6
+ <Properties/>
7
+ <Prune/>
8
+ <RecentChanges/>
9
+ <Search/>
10
+ <Suites/>
11
+ <Versions/>
12
+ <WhereUsed/>
13
+ </properties>
@@ -0,0 +1,16 @@
1
+ This page is an example of what a Mastiffe test looks like. When you edit this page, you should see a section above the editing area with Mastiffe buttons for adding new steps or editing existing ones.
2
+
3
+ !define passbutton {Pass}
4
+ !define failbutton {Fail}
5
+
6
+ | table: Mastiffe test |
7
+ | Test step | Expected result | Example data |
8
+ | Start the test |!- a FitNesse dialog appears -!| |
9
+ | Click ${passbutton} | The step passes | |
10
+ | Click ${failbutton} | the step fails | |
11
+ | This is a really long test step. I wonder how it will wrap, or if it will wrap at all, or if it will simply create a really wide dialog? | The text wraps | |
12
+ |!- Look at <img src="/files/images/FitNesseLogo.gif" /> -!|!- The FitNesse logo appears. -!| |
13
+ | Click on http://www.automation-excellence.com/ | The link works. After clicking on it the <a href="www.automation-excellence.com">Automation Excellence page</a> appears. But this HTML still looks like HTML. | |
14
+ | Call HelperTests.GoogleFor | | |
15
+ | Call .MastiffeDemo.HelperTests.GoogleFor | | searchengine:Yahoo! |
16
+ |!- This|step|is|escaped -!| the step is pipe-delimited |!-Like|this|text|is.-!|
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Test/>
10
+ <Versions>true</Versions>
11
+ <WhereUsed>true</WhereUsed>
12
+ </properties>
@@ -0,0 +1,10 @@
1
+ Mastiffe tests can call each other using the '''Call''' command. This page defines a reusable test that can be called from other tests.
2
+
3
+ !contents
4
+
5
+ !define searchterms {Automation Excellence}
6
+ !define searchengine {Google}
7
+
8
+ |table:mastiffe test|
9
+ |Browse to the ${searchengine} homepage|The ${searchengine} homepage appears| |
10
+ |Search ${searchengine} for ${searchterms}|The page for ${searchterms} is found successfully| |
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Test/>
10
+ <Versions>true</Versions>
11
+ <WhereUsed>true</WhereUsed>
12
+ </properties>
@@ -0,0 +1,3 @@
1
+ You can modularize your Mastiffe tests by putting reusable steps in subwikis like this one.
2
+
3
+ !contents
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,7 @@
1
+ This page sets up your tests, and is automatically loaded by all sibling pages and their descendants.
2
+
3
+ !| import |
4
+ | mastiffe |
5
+
6
+ | script | mastiffe test |
7
+ | Show | mastiffe tag |
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,10 @@
1
+ This subwiki is a template for writing manual tests using Mastiffe. Some basic configuration settings are provided, along with example tests. See the [[Mastiffe documentation][http://github.com/a-e/Mastiffe]] for more information.
2
+
3
+ These variables must be defined in order for Mastiffe to work:
4
+ !define TEST_SYSTEM {slim}
5
+ !define TEST_RUNNER {rubyslim}
6
+ !define COMMAND_PATTERN {rubyslim}
7
+
8
+ If you're using [[Bundler][http://gembundler.com]], you may need to change ''rubyslim'' to ''bundle exec rubyslim'' in the lines above.
9
+
10
+ !contents -R2 -g -p -f -h
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,15 @@
1
+ The website you are testing:
2
+ !define SITE_URL {http://www.example.com}
3
+
4
+ Where Selenium Server is running (host name or IP):
5
+ !define SELENIUM_HOST {localhost}
6
+
7
+ Here's a script table that uses the "Login" and "Logout" scenarios defined in ScenarioLibrary:
8
+ | script | selenium test | ${SITE_URL} | !{host:${SELENIUM_HOST}} |
9
+ | Open browser |
10
+ | Maximize browser |
11
+ | Login with username douglas and password slartibartfast |
12
+ | See | Sirius Cybernetics Corporation |
13
+ | Do not see | Marketing Division |
14
+ | Logout |
15
+ | Close browser |
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Test/>
10
+ <Versions>true</Versions>
11
+ <WhereUsed>true</WhereUsed>
12
+ </properties>
@@ -0,0 +1,12 @@
1
+ This is where you may optionally define reusable scenarios that are shared by your Rsel script tables. Here are a couple of examples:
2
+
3
+ | scenario | Login with username _ and password _ | username, password |
4
+ | Visit | /login |
5
+ | Fill in | Username | with | @username |
6
+ | Fill in | Password | with | @password |
7
+ | Press | Log in |
8
+ | See | Welcome, @username |
9
+
10
+ | scenario | Logout |
11
+ | Click | Log out | link |
12
+ | See | You are logged out |
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,4 @@
1
+ This page sets up your tests, and is automatically loaded by all sibling pages and their descendants. For Rsel, you only need one thing here:
2
+
3
+ !| import |
4
+ | Rsel |
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,12 @@
1
+ This subwiki is a template for writing Selenium-automated tests using Rsel. It provides some basic configuration and suggestions, but you'll need to customize it to meet your needs. See the [[Rsel documentation][http://rdoc.info/github/a-e/rsel/master/frames]] for more details.
2
+
3
+ These variables must be defined in order for Rsel to work:
4
+ !define TEST_SYSTEM {slim}
5
+ !define TEST_RUNNER {rubyslim}
6
+ !define COMMAND_PATTERN {rubyslim}
7
+
8
+ If you're using [[Bundler][http://gembundler.com]], you may need to change ''rubyslim'' to ''bundle exec rubyslim'' in the lines above.
9
+
10
+ Put your tests in subpages of this page. See the example tests below for ideas.
11
+
12
+ !contents -R2 -g -p -f -h
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0"?>
2
+ <properties>
3
+ <Edit>true</Edit>
4
+ <Files>true</Files>
5
+ <Properties>true</Properties>
6
+ <RecentChanges>true</RecentChanges>
7
+ <Refactor>true</Refactor>
8
+ <Search>true</Search>
9
+ <Versions>true</Versions>
10
+ <WhereUsed>true</WhereUsed>
11
+ </properties>
@@ -0,0 +1,91 @@
1
+ /* CSS tweaks for FitNexus */
2
+
3
+ @import url( "/files/css/fitnesse_base.css" );
4
+
5
+ div.sidebar {
6
+ background-color: #fff;
7
+ }
8
+
9
+ a:link {
10
+ color: #84AC17;
11
+ text-decoration: none;
12
+ }
13
+ a:visited {
14
+ color: #84AC17;
15
+ text-decoration: none;
16
+ }
17
+ a:hover {
18
+ color: #54CC08;
19
+ text-decoration: underline;
20
+ }
21
+
22
+ .actions a {
23
+ border-radius: 3px;
24
+ -moz-border-radius: 3px;
25
+ -webkitborder-radius: 3px;
26
+ }
27
+
28
+ .actions a:link,
29
+ .actions a:visited {
30
+ background-color: #F7F5F3;
31
+ border: 1px solid #EAE7E3;
32
+ }
33
+
34
+ .actions a:hover {
35
+ background-color: #EFEBE7;
36
+ }
37
+
38
+ h1, h2, h3, h4 {
39
+ font-variant: normal;
40
+ }
41
+
42
+ .page_type {
43
+ font-variant: normal;
44
+ }
45
+
46
+ table {
47
+ border: 1px solid black;
48
+ background: white;
49
+ }
50
+
51
+ tr {
52
+ background: transparent;
53
+ }
54
+
55
+ td, th {
56
+ border-width: 0 1 1px 0;
57
+ border-color: #ccc;
58
+ border-style: solid;
59
+ }
60
+
61
+ .source_file {
62
+ color: #aaa;
63
+ padding-left: 1em;
64
+ float: right;
65
+ }
66
+
67
+ .pass {
68
+ color: #090;
69
+ background-color: #DFD;
70
+ }
71
+
72
+ .fail {
73
+ color: #B00;
74
+ background-color: #FDD;
75
+ }
76
+
77
+ .ignore {
78
+ color: #999;
79
+ font-style: italic;
80
+ background-color: #EEE;
81
+ }
82
+
83
+ .error {
84
+ color: #C80;
85
+ background-color: #FEB;
86
+ }
87
+ #execution-status, #stop-test {
88
+ width: 130px;
89
+ font-size: 0.8em;
90
+ }
91
+
@@ -0,0 +1,6 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rsel'
4
+ gem 'cukable'
5
+ gem 'rubyslim-unofficial'
6
+
@@ -0,0 +1 @@
1
+ HtmlPageFactory=mastiffe.MastiffeHtmlPageFactory
@@ -0,0 +1,4 @@
1
+ #! /usr/bin/env bash
2
+
3
+ java -cp mastiffe/mastiffe.jar:fitnesse.jar fitnesseMain.FitNesseMain -p 8080
4
+
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fitnexus
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Automation Excellence
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-09-02 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: " FitNexus installs a FitNesse wiki with several enhancements, including\n Mastiffe for manual testing, Rsel for Selenium testing, and Cukable for\n Cucumber testing.\n"
23
+ email: wapcaplet88@gmail.com
24
+ executables:
25
+ - fitnexus
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - .gitignore
32
+ - History.md
33
+ - MIT-LICENSE
34
+ - README.md
35
+ - bin/fitnexus
36
+ - fitnexus.gemspec
37
+ - lib/fitnexus/project.rb
38
+ - lib/fitnexus/template/FitNesseRoot/CukableTemplate/FeedKitty/content.txt
39
+ - lib/fitnexus/template/FitNesseRoot/CukableTemplate/FeedKitty/properties.xml
40
+ - lib/fitnexus/template/FitNesseRoot/CukableTemplate/SetUp/content.txt
41
+ - lib/fitnexus/template/FitNesseRoot/CukableTemplate/SetUp/properties.xml
42
+ - lib/fitnexus/template/FitNesseRoot/CukableTemplate/content.txt
43
+ - lib/fitnexus/template/FitNesseRoot/CukableTemplate/properties.xml
44
+ - lib/fitnexus/template/FitNesseRoot/FrontPage/content.txt
45
+ - lib/fitnexus/template/FitNesseRoot/FrontPage/properties.xml
46
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/DemoPage/content.txt
47
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/DemoPage/properties.xml
48
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/GoogleFor/content.txt
49
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/GoogleFor/properties.xml
50
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/content.txt
51
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/HelperTests/properties.xml
52
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/SetUp/content.txt
53
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/SetUp/properties.xml
54
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/content.txt
55
+ - lib/fitnexus/template/FitNesseRoot/MastiffeTemplate/properties.xml
56
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/LoginTest/content.txt
57
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/LoginTest/properties.xml
58
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/ScenarioLibrary/content.txt
59
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/ScenarioLibrary/properties.xml
60
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/SetUp/content.txt
61
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/SetUp/properties.xml
62
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/content.txt
63
+ - lib/fitnexus/template/FitNesseRoot/RselTemplate/properties.xml
64
+ - lib/fitnexus/template/FitNesseRoot/files/css/fitnesse.css
65
+ - lib/fitnexus/template/Gemfile
66
+ - lib/fitnexus/template/plugins.properties
67
+ - lib/fitnexus/template/run.sh
68
+ has_rdoc: true
69
+ homepage: http://github.com/a-e/fitnexus
70
+ licenses: []
71
+
72
+ post_install_message:
73
+ rdoc_options: []
74
+
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ requirements: []
96
+
97
+ rubyforge_project:
98
+ rubygems_version: 1.3.7
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: FitNesse with benefits
102
+ test_files: []
103
+