Ruby/Testing Debugging Automation

From Meshplex

Jump to: navigation, search
Image:Ruby_on_rails_tutorials.jpg
Ruby for complete beginners
Ruby Introduction
What can I use RoR for?
Reasons for choosing RoR over other popular programming languages such as php or asp.net .What makes Ruby so much more special
Where can I find RoR? In what “forms” does it come?
How to install RoR.Solutions for both the novice and professional programmers on Windows,Mac OS X and Linux.Prerequisites.
Ruby programming tutorials for beginners:
Ruby Basics
Ruby Variables, Datatypes, Operators
Ruby Symbols
Ruby Statements
Ruby Converting data to another type: type conversion or typecasting
Ruby Arrays, Hashes, Ranges
Ruby Functions and built in functions
Ruby Control structures
Ruby Regular expressions and blocks
Ruby Loops
Ruby Recursion
Ruby Data Structures
Ruby Methods, Classes, Modules, Namespaces
Ruby Exceptions
Ruby Object Oriented Programming
Ruby Multithreading
Ruby File Handling.Input and Output
Ruby Basic GUI
Ruby and databases.Ruby on Rails and MySQL
Ruby Basic CGI.Using fastCGI
Ruby Basic Networking and web programming
Ruby Basic Graphics
Ajax and Rails.Web 2.0 and what it means
Ruby Testing, Debugging, Automation of tasks
Ruby Apache,Capistrano, Mongrel,lighttpd – reviews and tips
Finding a Ruby on Rails ready web hosting company
BONUS: mini tutorial for a simple RoR application

[edit] Ruby Testing, Debugging, Automation of tasks

Running code in DEBUG mode

There will be times when you want to debug code without messing up too many things or stopping production mode.

2 ways of doing this: setting the $DEBUG variable to true inside your code / using the --debug flag in the interpreter and run the code only if the global $DEBUG is true.

Testing with Test::Unit

The standard method to do unit testing in Ruby is with Test::Unit.

Useful resources:

http://manuals.rubyonrails.com/read/book/5

http://blog.jayfields.com/2006/06/ruby-on-rails-unit-tests.html

http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/index.html

http://nubyonrails.com/articles/2006/08/24/ruby-rails-test-rails-cheat-sheet

http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing

http://rspec.rubyforge.org/documentation/test_unit.html

ZenTest tools for testing

http://www.linuxjournal.com/article/7776

http://zentest.rubyforge.org/ZenTest/

http://www.zenspider.com/ZSS/Products/ZenTest/

Ruby Debugger

ruby -rdebug filename.rb

How to measure performance of applications with a profiler

ruby -rprofile filename.rb

Windows automation


The Ruby extension WIN32OLE,part of the standard Ruby distribution allows you to use Ruby as a client for Windows automation.

http://homepage1.nifty.com/markey/ruby/win32ole/index_e.html http://rubyonwindows.blogspot.com/2007/04/ruby-win32ole-inspecting-objects.html


Previous Next
Personal tools