aspose file tools*
The moose likes Agile and Other Processes and the fly likes Branch for Testing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "Branch for Testing?" Watch "Branch for Testing?" New topic
Author

Branch for Testing?

Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
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?


comp.lang.javascript FAQ: http://jibbering.com/faq/
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

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

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Jan 03, 2007
Posts: 40
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.)


Michael T. Nygard<br /><a href="http://www.michaelnygard.com/" target="_blank" rel="nofollow">http://www.michaelnygard.com/</a><br /> <br />Release It! Design and Deploy Production Ready Software<br /><a href="http://pragmaticprogrammer.com/titles/mnee/index.html" target="_blank" rel="nofollow">http://pragmaticprogrammer.com/titles/mnee/index.html</a>
 
 
subject: Branch for Testing?