Unit test location?

1 view
Skip to first unread message

Mike Henke

unread,
May 14, 2008, 1:56:25 PM5/14/08
to mxunit
@ CF.Objective, I heard someone mention units should be a seperate svn
folder like trunk, branches, tags. Before my co-workers and I invest
a lot of time in this…can you help me understand what the advantage/
disadvantages would be in this solution vs. having a unit test system
build right into each branch and trunk?

Mike Henke

unread,
May 14, 2008, 2:09:21 PM5/14/08
to mxunit
So what I proposed was c:\tests with a working copy of svn:\\tests\
Then create a virtual directory for our cf instances like
127.0.0.1:8301\tests

I am considering moving mxunit's folder into tests also and setting up
a cf mapping.

Marc Esher

unread,
May 14, 2008, 2:12:20 PM5/14/08
to mxu...@googlegroups.com
I don't think I'd take this kind of thing as a blanket rule.

At work, we have a large shared codebase with lots of different client
apps using the same code. In this case, it makes sense for us to keep
the tests separate from each client application.

but on other projects that don't have that kind of "sharedness" about
it, I always keep tests right in with the app and haven't had a
problem with that at all.

terrenc...@gmail.com

unread,
May 14, 2008, 2:36:52 PM5/14/08
to mxunit
In general I store the tests in a folder under trunk .
The idea is that the tests should live with the code it tests, and
should be extracted with the code.
That way as your app evolves, and tests grow, they have the same
ability to be reverted as the application. Or put in better terms, if
you revert back to version 5 of the app, and there are tests for
components written in version 10, then the tests fail if they didn't
revert. So your tests should follow the rest of the application.

My 2 cents.

Jim Priest

unread,
May 14, 2008, 3:09:41 PM5/14/08
to mxunit
On May 14, 2:36 pm, "terrence.p.r...@gmail.com"
<terrence.p.r...@gmail.com> wrote:
> In general I store the tests in a folder under trunk .

I'd want them in the trunk as well along side my code. I thought I
remember this came up during one of the recent CFMeetup presos??

It seems with some creativity you could dump these right into your
code and use Ant filters during deployment to strip them out... I
haven't done any unit testing but I'd think somehow mirroring my /
model layout??

Jim

Mike Henke

unread,
May 14, 2008, 4:00:00 PM5/14/08
to mxunit
@Terrence - that makes alot of sense.

@Jim - It would be easy to strip out the "test" folder/files but that
might chaotic if they are side by side. I'ld think a "mirror" folder
structure might be useful within the testing folder.
Reply all
Reply to author
Forward
0 new messages