# How to auto-generate functional tests based on rake routes

**URL:** <https://www.ruby-forum.com/t/how-to-auto-generate-functional-tests-based-on-rake-routes/180105>\
**Category:** Rails\
**Created:** [December 11, 2009, 5:01pm UTC](https://www.ruby-forum.com/t/how-to-auto-generate-functional-tests-based-on-rake-routes/180105 "2009-12-11T17:01:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuktuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/77aa72/32.png) [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Post date:** [December 11, 2009, 5:01pm UTC](https://www.ruby-forum.com/t/how-to-auto-generate-functional-tests-based-on-rake-routes/180105/1 "2009-12-11T17:01:53Z")

</div>

I am trying to handle a rather large Rails project, that has almost no  
testing at the moment.

I would like to start by adding functional tests that ensures, that all  
actions return the right the “200 OK” return value.

Is there a way to autogenerate functional tests simply by using the  
result of “rake routes”? Sp that I can get a skeleton to work from.

- Carsten

---

<div class="post-metadata">

**Author:** ![tuktuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/77aa72/32.png) [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Post date:** [December 11, 2009, 5:23pm UTC](https://www.ruby-forum.com/t/how-to-auto-generate-functional-tests-based-on-rake-routes/180105/2 "2009-12-11T17:23:26Z")

</div>

Carsten G. wrote:

> I am trying to handle a rather large Rails project, that has almost no  
> testing at the moment.
> 
> I would like to start by adding functional tests that ensures, that all  
> actions return the right the “200 OK” return value.
> 
> Is there a way to autogenerate functional tests simply by using the  
> result of “rake routes”? Sp that I can get a skeleton to work from.
> 
> - Carsten

Don’t bother. Use Cucumber features. Functional tests should just die.  
🙂

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

---

<div class="post-metadata">

**Author:** ![tuktuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/77aa72/32.png) [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Post date:** [December 11, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/how-to-auto-generate-functional-tests-based-on-rake-routes/180105/3 "2009-12-11T18:40:22Z")

</div>

Marnen Laibow-Koser wrote:

> > Is there a way to autogenerate functional tests simply by using the  
> > result of “rake routes”? Sp that I can get a skeleton to work from.
> 
> Don’t bother. Use Cucumber features. Functional tests should just die.

Hmmm okay… Is there a way of doing ditto in Cucumber? 🙂

- Carsten

---

<div class="post-metadata">

**Author:** ![tuktuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/77aa72/32.png) [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Post date:** [December 11, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/how-to-auto-generate-functional-tests-based-on-rake-routes/180105/4 "2009-12-11T19:23:24Z")

</div>

Carsten G. wrote:

> Marnen Laibow-Koser wrote:
> 
> > > Is there a way to autogenerate functional tests simply by using the  
> > > result of “rake routes”? Sp that I can get a skeleton to work from.
> > 
> > Don’t bother. Use Cucumber features. Functional tests should just die.
> 
> Hmmm okay… Is there a way of doing ditto in Cucumber? 🙂

Scenario outlines?

> - Carsten

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