0

I find myself writing small test cases and applications to post bug cases, answer questions in some forums, make feature showcases for clients, etc. and for that I created a TestCases project inside my workspace.

Now, I want to keep track of all these small and unrelated applications in case I need to go back to them, mainly to reuse the most similar one as a starting point for a new test case or application. For instance, application A is an application I wrote a couple of weeks ago to answer in SO, and now I need to use it as a starting point for application B (which is for a similar question in another forum). When I do this, I don't want to lose the ability to go back to application A's current state, because another case in the future could make use of it. But I also want to be able to keep track of the new application B's final state, as its more advanced state (compared to that of application A) could be useful for future cases.

One important piece of information is that the applications are developed using a particular framework and some common technologies, so each application, if managed independently, would require an initial set up time that would alone take more time than I would like to spend on making these applications. So it's not single file applications, but small applications that require several source code and resource files to work.

I am considering creating a new branch per application, by default from the trunk, and if I need to base a new application on an existing one, I will start this new branch from the existing application's branch.

What are the drawbacks of following this approach?

1
  • Maybe fork the test you want to re-use so you know where it comes from? They really start to differentiate so it's not the typical branch case. Commented Jul 29, 2016 at 9:08

1 Answer 1

0

Well, I decided to go with this idea:

I am considering creating a new branch per application, by default from the trunk, and if I need to base a new application on an existing one, I will start this new branch from the existing application's branch.

So far, everything is working as intended. I can look up an old branch similar to the new application at hand (related to a test case or question I need to solve), and develop it a little bit more or start a new branch from it, depending on how close the resemblance between the new application and the old branch is, and how natural is the progression between the two.

The only issue I've found is that adopting a good naming convention is crucial here, in order to be able to search for similar (old) applications. I am using a convention based on Vincent Driessen's article on the topic, with "question" and "demo" being the two keywords I use to prepend new branch names, and using long descriptive names for the branches. As an example, question-DisplayIconWindowHeader is the name of a branch I used to solve a recent SO question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.