forked from amirci/webacceptance_mvcconf_feb11
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
79 lines (57 loc) · 3.02 KB
/
README
File metadata and controls
79 lines (57 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Functionality Driven Development of ASP .Net MVC - Winnipeg Code Camp - February 26, 2011
Modifications for presentation: Sean Bennett
Contact: Bennett.Sean@gmail.com
This is a fork of Amir Barylko's git://github.com/amirci/webacceptance_mvcconf_feb11.git
The setup is the same.
-----------------------
Quality Driven Web Acceptance Testing - MVC Virtual Conference - Feb - 2011
Author: Amir Barylko
Contact: amir@barylko.com
Twitter: @abarylko
The source in this repository contains the demo used for the presentation.
Folder structure of the project:
MediaLibrary
--- MavenThought.MediaLibrary.sln : Main solution file
--- Rakefile: Main rake file to launch build, test, etc. Do rake -T to get all the tasks available.
+-- main: Project files included in the solution
+-- test: Test project files included in the solution
+-- features: Features used by Capybara + Cucumber
+-- lib2: Dependencies used by the projects that can't be installed with bundler
+-- tools: Tools used to run tests, msbuild tasks, etc.
If you are not familiar with BDD please read my post with the introduction to the BDD at http://orthocoders.com/2010/05/26/real-world-bdd-introduction.
Prerequisites to run it:
* Install ruby.
Here some instructions: http://rubyinstaller.org/
* Make sure ruby is in the path, then run the following commands:
- gem update --system
- gem install rake bundler --no-ri --no-rdoc
* Install jRuby
- Go to http://jruby.org/
- install celerity: jruby -S gem install celerity
- if u get an error when running, please reade troubleshoot below
* Install sqlite3
- Go to sqlite
Prerequisites to modify it:
* VS 2010
* ASP .NET MVC 2: http://www.asp.net/mvc
Sanity check:
* From command prompt, on the root of the project run "rake -T", u should see all the tasks.
* From command prompt, on the root of the project run "bundle install", should install all gems.
* From command prompt, on the root of the project run "rake setup", all the dependencies should be installed for you under lib.
* From command prompt, on the root of the project run "rake build"
* From command prompt, on the root of the project run "rake test:all", all tests should run, u should see the output on the command window.
* Open the solution and run the web application
* From command prompt, on the root of the project run "cucumber", you should see something like:
3 scenarios (3 passed)
13 steps (13 passed)
Troubleshoot:
- Running the test under Windows, get an error saying:
No such file or directory - RUBYOPT="" jruby "c:/Ruby187/lib/ruby/gems/1.8/gems/culerity-0.2.15/lib/start_celerity.rb" (Errno::ENOENT)
Edit "c:/Ruby187/lib/ruby/gems/1.8/gems/culerity-0.2.15/lib/culerity.rb" and replace the run_server with:
def self.run_server
# original %{RUBYOPT="" #{jruby_invocation} "#{celerity_invocation}"}
IO.popen(%{#{jruby_invocation} "#{celerity_invocation}"}, 'r+').extend(ServerCommands)
end
Any issues setting up the code let me know and I'll help you.
Any comments, bugs, issues, please contact me.
Enjoy.