Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the most commonly used unit testing framework for different types of Ruby applications? [duplicate]

Are the same unit testing frameworks used for different web frameworks - Rails, Merb, Sinatra, Ramaze and desktop frameworks - Shoes?

And what is the most widely used unit testing framework that would work with all of the various web and desktop frameworks?

like image 491
Big Pete Taylor Avatar asked Sep 19 '09 15:09

Big Pete Taylor


People also ask

What is the testing framework for Ruby?

RSpec is a popular BDD framework for testing Ruby/Rails applications. Depending on your project type (Ruby or Rails), use the rspec or rspec-rails gem. Cucumber is a BDD testing tool that uses the Gherkin language for writing test scenarios.

Which framework is used for unit testing?

JUnit is an open source framework you can use to write and run tests. It aims to help develop bug-free and reliable code written in Java. JUnit provides test runners that run tests and assertions to test the expected results.

What is the commonly used unit testing framework in Java?

JUnit. JUnit is an open-source Java testing framework used by software testers across the globe for unit testing. It allows developers to speed up the development process and improve code quality in the Java programming language. Moreover, it helps in implementing repeated test cases.

Which framework is used for unit testing of C++ programs?

The Microsoft Unit Testing Framework for C++ is included by default in the Desktop Development with C++ workload.


1 Answers

TestUnit is based on JUnit, and so there is port to most languages. This is probably the most ubiquitous.

Behavior driven testing has yielded tools like RSpec, and it seems like right now that may be the most popular test framework in the ruby/rails world. (Here's a site that attempts to keep tabs on popularity: http://ruby-toolbox.com/categories/testing_frameworks.html)

Syntactically you will need to make a choice between those two big camps. Within them, there are lots of implementations, each with their own history, pluses and minuses. Even within the TestUnit world, you can grab "shoulda" and have much of what RSpec gives you. Confusing, eh?

Most of the tools are not explicitly tied to a framework and work fairly independently of Rails.

like image 181
ndp Avatar answered Oct 07 '22 00:10

ndp