Testing Java with Ruby

Print
Home

JtestR

JtestR is a tool that will make it easier to test Java code with state of the art Ruby tools. The main project is a collection of Ruby libraries bundled together with JRuby integration so that running tests is totally painless to set up. The project also includes a background server so that the startup cost of JRuby can be avoided. Examples of Ruby libraries included are RSpec, dust, Test/Unit, mocha and ActiveSupport.

The vision of the project is to be the testing tool of choice for Java projects, offering nice Ant, Maven and buildr integration. It will also support integration testing with common Ruby libraries like Ruby/LDAP and ActiveRecord, while still providing access to Java libraries and helpers.

Features

News

Last changed May 07, 2009 08:59 by Ola Bini

JtestR allows you to test your Java code with Ruby frameworks.

Homepage: http://jtestr.codehaus.org

Download: http://dist.codehaus.org/jtestr

JtestR 0.4 is the current release of the JtestR testing tool. JtestR integrates JRuby with several Ruby frameworks to allow painless testing of Java code, using RSpec, Test/Unit, Expectations, dust and Mocha.

Features:

  • Integrates with Ant, Maven and JUnit
  • Includes JRuby 1.2, Test/Unit, RSpec, Expectations, dust, Mocha and ActiveSupport
  • Customizes Mocha so that mocking of any Java class is possible
  • Background testing server for quick startup of tests
  • Automatically runs your JUnit and TestNG codebase as part of the build

Getting started: http://jtestr.codehaus.org/Getting+Started

New in the 0.4 release is upgrade of JRuby to version 1.2, upgrade of ActiveSupport to 2.3.2, Mocha to 0.9.5 and RSpec to 1.2.6.

Seeing as the new RSpec version no longer supports the story runner, support for this have been removed from JtestR. Cucumber support will arrive in a future version.

Posted at May 07, 2009 by Ola Bini | 0 comments
Last changed Aug 17, 2008 06:38 by Ola Bini

JtestR allows you to test your Java code with Ruby frameworks.

Homepage: http://jtestr.codehaus.org

Download: http://dist.codehaus.org/jtestr

JtestR 0.3.1 is the current release of the JtestR testing tool. JtestR integrates JRuby with several Ruby frameworks to allow painless testing of Java code, using RSpec, Test/Unit, Expectations, dust and Mocha.

Features:

  • Integrates with Ant, Maven and JUnit
  • Includes JRuby 1.1, Test/Unit, RSpec, Expectations, dust, Mocha and ActiveSupport
  • Customizes Mocha so that mocking of any Java class is possible
  • Background testing server for quick startup of tests
  • Automatically runs your JUnit and TestNG codebase as part of the build

Getting started: http://jtestr.codehaus.org/Getting+Started

New in the 0.3.1 release is upgrade of JRuby to revision r7479 which includes several new Java Integration features, upgrading of ActiveSupport to 2.1.0, fixing a severe memory leak in the background server and some minor usability features.

New and fixed in this release:

JTESTR-50 Difference in functionality when stubbing a method on a Java class vs a Ruby class using mocha

JTESTR-51 Mocking of classes lacking default constructors results in a NameError

JTESTR-53 Push the JtestR JRuby builds to maven repos

JTESTR-56 Upgrade ActiveSupport

JTESTR-57 Make it possible to use local versions of libraries.

JTESTR-59 No output when no tests found.

JTESTR-60 OutOfMemoryError

JTESTR-61 Documentation improvments - ant test-server

JTESTR-62 Having the jtestr.jar in the base directory doesn't work

JTESTR-63 Update JRuby version

Posted at Aug 17, 2008 by Ola Bini | 0 comments
Last changed Jun 15, 2008 08:41 by Ola Bini

JtestR allows you to test your Java code with Ruby frameworks.

Homepage: http://jtestr.codehaus.org

Download: http://dist.codehaus.org/jtestr

JtestR 0.3 is the current release of the JtestR testing tool. JtestR integrates JRuby with several Ruby frameworks to allow painless testing of Java code, using RSpec, Test/Unit, Expectations, dust and Mocha.

Features:

  • Integrates with Ant, Maven and JUnit
  • Includes JRuby 1.1, Test/Unit, RSpec, Expectations, dust, Mocha and ActiveSupport
  • Customizes Mocha so that mocking of any Java class is possible
  • Background testing server for quick startup of tests
  • Automatically runs your JUnit and TestNG codebase as part of the build

Getting started: http://jtestr.codehaus.org/Getting+Started

The 0.3 release has focused on stabilizing Maven support, and adding new capabilities for JUnit integration.

New and fixed in this release:

JTESTR-47 Maven with subprojects should work intuitively

JTESTR-42 Maven dependencies should be automatically picked up by the test run

JTESTR-41 Driver jtestr from junit

JTESTR-37 Can't expect a specific Java exception correctly

JTESTR-36 IDE integration, possibility to run single tests

JTESTR-35 Support XML output of test reports

Posted at Jun 15, 2008 by Ola Bini | 0 comments
Last changed Apr 17, 2008 08:16 by Ola Bini

The JtestR team is proud to announce that version 0.2 has now been released. The new release brings several new features, including Expectations support, RSpec Stories and TestNG integration. Lots of bugs has also been fixed.

Download: http://dist.codehaus.org/jtestr

Getting started: http://jtestr.codehaus.org/Getting+Started

New and fixed in this release:

  • JTESTR-10 It should be possible to run TestNG tests
  • JTESTR-12 Buildr support
  • JTESTR-13 CC.rb should be able to run JtestR tests
  • JTESTR-17 Tests should be groupable and runnable per groups
  • JTESTR-21 Support RSpec stories
  • JTESTR-28 JtestR should include expectations
  • JTESTR-30 code coverage support
  • JTESTR-31 Autoloading of Java constants
  • JTESTR-32 Can't load IA 32-bit .so on a IA 32-bit platform
  • JTESTR-33 JtestR should use latest version of JRuby
  • JTESTR-34 Errors when project is in path with spaces on Windows XP
  • JTESTR-37 Can't expect a specific Java exception correctly
  • JTESTR-38 Problem with mocking Java classes
  • JTESTR-39 RSpec story runner seems to require rubygems
  • JTESTR-40 Package missing or.jruby.exceptions.RaiseException
  • JTESTR-43 It should be possible to get the generated mock class without instantiation
  • JTESTR-44 New output files start with a whitespace
  • JTESTR-45 RSpec raise_error and Test/Unit assert_raise and assert_nothing_raised handled JRuby NativeException stuff correctly.
Posted at Apr 17, 2008 by Ola Bini | 0 comments

Quickly after the initial release, 0.1.1 of JtestR has been released with some important bug fixes and one new feature:

  • [Bug] The classpath configuration sometimes made JtestR fail with type conversion errors
  • [Bug] The BackgroundServer would die if you tried to run on a code base with only Test::Unit or RSpec tests (JTESTR-29)
  • [Bug] Setting different outputlevels through the Ant configuration always failed with a message that the specified value was not allowed.
  • [Feature] Added an ignore-option to the configuration, so that Ruby files in the test directory can be ignored. See Getting Started for more info.

The release can be downloaded from http://dist.codehaus.org/jtestr/jtestr-0.1.1.jar

Posted at Jan 01, 2008 by Ola Bini | 0 comments
Powered by Atlassian Confluence