# Ruby-Watir test case organization (dir hierarchy)

**URL:** <https://www.ruby-forum.com/t/ruby-watir-test-case-organization-dir-hierarchy/54633>\
**Category:** Ruby\
**Created:** [March 10, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/ruby-watir-test-case-organization-dir-hierarchy/54633 "2006-03-10T17:19:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalensr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f05b48/32.png) [@kalensr](https://www.ruby-forum.com/u/kalensr)\
**Post date:** [March 10, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/ruby-watir-test-case-organization-dir-hierarchy/54633/1 "2006-03-10T17:19:11Z")

</div>

Greetings All:

First off; I am fairly new to Ruby and Watir (3 - 4 months), and I  
really excited about its potential. I am also very new to the user  
group. I have done some research, but I am unable to find the answers  
to my problem, so I apologize if this is a redundent topic.

Now, lets get to the point…

I am using Ruby and Watir to build set of tests for a product. As my  
tests are increasing in number I need to begin building a directory  
hierarchy that will help organize and easily extend my tests. Below is  
an example of the hierarchy I am experimenting with (with no success).

– Product  
– common

```
-- includes
	include.rb -> contains: references to lib files ie:
		 require '../product page A/lib/prod_pageA.rb' --> {See below}
		 require '../product page B/lib/prod_pageB.rb'

-- product page A
	-- lib
		prod_pageA.rb
	-- test
		tc_prod_pageA.rb {require '../../includes/include'}

-- product page B
	-- lib
		prod_pageB.rb
	-- test
		tc_prod_pageB.rb {require '../../includes/include.rb} or {require

```

‘…/lib/prod\_pageB’}

```
-- release_night_tests
	-- lib
	-- test
		test_relnight_A.rb {require '../../includes/include'}

-- composit_tests
	-- lib
	-- test

```

The intent is to reference all of the product page libraries  
(product\_page\_name/lib) from the include.rb. That way I can create  
composit tests as well as release night tests, smoke tests and others  
(those end-to-end tests that utilize multiple pages to verify certain  
features of the product), by simply including the include.rb file  
alone.

This layout is not working for me, so I thought I would query the group  
to see where I am going wrong or a better approach to organize my  
tests.

Thanks,
