# Ways of running functional tests

**URL:** <https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294>\
**Category:** Rails\
**Created:** [December 23, 2006, 3:53pm UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294 "2006-12-23T15:53:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![richtext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@richtext](https://www.ruby-forum.com/u/richtext)\
**Post date:** [December 23, 2006, 3:53pm UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294/1 "2006-12-23T15:53:59Z")

</div>

If I run all my tests using rake test, they all work. However, when I  
run rake test:functionals, some functional tests fail on some of my  
assertions? If I run the individual rb file in which the failing tests  
appear, they work!

What is different between these ways of running functional tests? I’ve  
been scratching my head over this one for ages!

Cheers.

---

<div class="post-metadata">

**Author:** ![richtext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@richtext](https://www.ruby-forum.com/u/richtext)\
**Post date:** [December 23, 2006, 10:27pm UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294/2 "2006-12-23T22:27:52Z")

</div>

RichText wrote:

> 

Whenever I’ve had a problem like this it’s been to do with the loading  
of fixtures – and not loading all of them that were needed into a  
functional test (meaning the state of the items in the db depended on  
which tests were run prior to it, and in which order). Have a look at  
the functionals that are failing and make sure you are loading all the  
fixtures that are needed, including any tables they depend on.

HTH  
Chris

---

<div class="post-metadata">

**Author:** ![richtext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@richtext](https://www.ruby-forum.com/u/richtext)\
**Post date:** [December 23, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294/3 "2006-12-23T22:58:52Z")

</div>

Dear Chris,

Thanks for the tip - I’ve sorted it now. I thought it would be something  
obvious like this.

Cheers!

---

<div class="post-metadata">

**Author:** ![richtext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@richtext](https://www.ruby-forum.com/u/richtext)\
**Post date:** [December 24, 2006, 12:56am UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294/4 "2006-12-24T00:56:20Z")

</div>

i unsubscribed months ago and started getting rails email again today

this has happened once before.

wtf?

– Elliot T.

> **[Curiosity Blog – Elliot Temple](https://curi.us/)**
>
> A philosophy blog

---

<div class="post-metadata">

**Author:** ![richtext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@richtext](https://www.ruby-forum.com/u/richtext)\
**Post date:** [December 25, 2006, 8:45am UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294/5 "2006-12-25T08:45:21Z")

</div>

On 12/23/06, Elliot T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i unsubscribed months ago and started getting rails email again today
> 
> this has happened once before.
> 
> wtf?
> 
> – Elliot T.  
> [Curiosity Blog – Elliot Temple](http://curi.us/dialogs/)

Sorry for the inconvenience, you can unsubscribe by sending email to  
removed\_email\_address@domain.invalid

–  
Rick O.  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![richtext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@richtext](https://www.ruby-forum.com/u/richtext)\
**Post date:** [December 21, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/ways-of-running-functional-tests/80294/6 "2007-12-21T23:48:09Z")

</div>

I’ve got similar problems and while I’m glad Chris’ were fixed I’m a  
little curious why they worked okay when run with ruby. Do fixtures  
get reloaded for each functional test method (like they are in unit  
tests)? I’d hope so.

On Dec 23 2006, 1:58 pm, RichText [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
