Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Branch for Testing?

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked for a directory for testing out tags and UI stuff, but the boss man said that that would have to be done in a new branch.

Is it a common practice to create a separate branch to test the code? It seems like a pain in the * to me.

Why not just exclude the tests from the deployed build?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Garrett,
Definitely not common practice. Sounds like a pain to me too. The branch would get out of synch with the HEAD and be useless.

Another alternative to suggest is to keep the tests in separate projects so they don't get deployed.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I do is organize the test code in a separate source tree within the same Eclipse project, for example, and compile the test code into a different output directory.

E.g.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Garrett Smith:
I asked for a directory for testing out tags and UI stuff, but the boss man said that that would have to be done in a new branch.


What did he say *why* a new branch had to be used for that?

What kinds of testing are you going to do?
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your replies.

I'll be doing UI testing. A lot of it is just proof-of-concept. We already have tests using Canoe, and I will probably want to add to that.

The problem is that it's a large organization. Our group has privilege to create directories in CVS. However, to delete directories, it is necessary to contact another security group. And I'm a contractor.

Ad hoc testing on localhost w/o being able to even share the tests with other front end developers doesn't work for me.

So the senior developer, who does not know much about front end, said that he would create a new branch of the code for us to use. I don't really understand how this fixes the problem. I started using it, but it's easier to work off trunk. Am I just being lazy?

[ January 02, 2007: Message edited by: Garrett Smith ]
[ January 02, 2007: Message edited by: Garrett Smith ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Garrett Smith:
The problem is that it's a large organization. Our group has privilege to create directories in CVS. However, to delete directories, it is necessary to contact another security group.

We have that situation too. I don't see the connection between deleting directories and a branch though.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Garrett Smith:

So the senior developer, who does not know much about front end, said that he would create a new branch of the code for us to use. I don't really understand how this fixes the problem.


What did he explain when you asked him?
 
Michael Nygard
author
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you're talking about prototyping some new concepts in the code. For this, branching is quite appropriate. When prototyping, you may or may not be adhering to the normal coding standards. Once done, the prototype may or may not be merged with HEAD.

XP types would call this a "spike". Spike code is usually discarded after you've learned enough from the exercise. Then you do it at production quality when implementing it in the trunk. (Including unit tests and a well-factored design.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic