# Using rails for testing a non-Rails web app

**URL:** <https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266>\
**Category:** Rails\
**Created:** [June 29, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266 "2009-06-29T19:20:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigjimmyk3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Post date:** [June 29, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266/1 "2009-06-29T19:20:59Z")

</div>

I have a question…right now I work at a place where we have  
implemented an automated test framework in Ruby-Watir-RSpec. The  
application is a Java-based web application. My question is…is  
there any value to setting up a Rails app as a “test environment” and  
then run tests against our Java web app? I don’t know a ton about  
Rails (have gone through the sample app and read some of the  
documentation). I at this point am trying to figure out if in my  
situation deploying Rails would do anything for me, or if I will do  
just as well by sticking with my pure-Ruby test framework.

Thanks for any advice,

Jim

---

<div class="post-metadata">

**Author:** ![bigjimmyk3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Post date:** [June 29, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266/2 "2009-06-29T20:07:32Z")

</div>

Jim K. wrote:

> I have a question…right now I work at a place where we have  
> implemented an automated test framework in Ruby-Watir-RSpec. The  
> application is a Java-based web application. My question is…is  
> there any value to setting up a Rails app as a “test environment” and  
> then run tests against our Java web app?

Probably not. What are you trying to get out of adding Rails?

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![bigjimmyk3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Post date:** [June 29, 2009, 9:01pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266/3 "2009-06-29T21:01:59Z")

</div>

Rails will not help you test an other app

2009/6/29, Jim K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Thanks for any advice,
> 
> Jim
> 
> >

–  
Von meinen Mobilgerät aus gesendet

---

<div class="post-metadata">

**Author:** ![bigjimmyk3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Post date:** [June 30, 2009, 1:12pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266/4 "2009-06-30T13:12:56Z")

</div>

Jim, this is a mere educated guess, but you may try experimenting with  
Cucumber test framework, run inside JRuby  
see [http://wiki.github.com/aslakhellesoy/cucumber/jruby-and-java](http://wiki.github.com/aslakhellesoy/cucumber/jruby-and-java)

I think this will be at least a bit more convenient for a Java app.

Best regards,  
Denis

---

<div class="post-metadata">

**Author:** ![bigjimmyk3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Post date:** [June 30, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266/5 "2009-06-30T21:34:41Z")

</div>

Hi guys,

I recently tried using RSpec to test a Java application, and just  
wrote a tutorial on this topic describing my experiences:  
[http://patshaughnessy.net/2009/6/25/taming-the-beast-using-jruby-and-rspec-to-test-a-j2ee-application](http://patshaughnessy.net/2009/6/25/taming-the-beast-using-jruby-and-rspec-to-test-a-j2ee-application)

I definitely see a lot of value in using Ruby to test other languages;  
it seems to me that the Ruby community has done the most innovation  
recently on testing, and why not use the best tools to test your app,  
regardless of what it is?

Thanks for the link to the Cucumber wiki page… that was going to be  
my next step! - pat
