# What should I do testing for an old application?

**URL:** <https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067>\
**Category:** Rails\
**Created:** [October 28, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067 "2009-10-28T18:31:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@suki](https://www.ruby-forum.com/u/suki)\
**Post date:** [October 28, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067/1 "2009-10-28T18:31:06Z")

</div>

I got this Ruby on Rails application with incomplete testing, (many  
controllers or views do not have unit test at all).

Should I go back to write all unit test for each of controller or  
view, then do integration test? Or I just forget about all of them,  
keep going ahead with my new functions with my new unit test?

My concerns here are: I also need to upgrade Ruby and Rails, or re-  
factoring the program. How can I test to make sure the whole  
application will be running just fine after all the upgrading and re-  
factoring?

Thanks,  
Li

---

<div class="post-metadata">

**Author:** ![suki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@suki](https://www.ruby-forum.com/u/suki)\
**Post date:** [October 28, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067/2 "2009-10-28T18:53:08Z")

</div>

Suki wrote:

> I got this Ruby on Rails application with incomplete testing, (many  
> controllers or views do not have unit test at all).
> 
> Should I go back to write all unit test for each of controller or  
> view, then do integration test? Or I just forget about all of them,  
> keep going ahead with my new functions with my new unit test?
> 
> My concerns here are: I also need to upgrade Ruby and Rails, or re-  
> factoring the program. How can I test to make sure the whole  
> application will be running just fine after all the upgrading and re-  
> factoring?

Write the tests _before_ upgrading and refactoring. The tests will tell  
you if the changes break anything. That’s what they’re for!

(BTW, integration tests are probably less useful than Cucumber  
features.)

> Thanks,  
> Li

## Best,

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

---

<div class="post-metadata">

**Author:** ![suki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@suki](https://www.ruby-forum.com/u/suki)\
**Post date:** [October 28, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067/3 "2009-10-28T23:10:19Z")

</div>

Thank you very much! I was thinking about it, but afraid to waste too  
much of my time. Your response confirm my thinking. Great. I just go  
ahead do it.

On Oct 28, 1:53 pm, Marnen Laibow-Koser \<rails-mailing-l…@andreas-
