Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Suggestion: change clone testcase default form parameters #838
I think it might be nicer if the default option is set to "Use the same Plan" instead of "Filter another plan" because:
Also I would rather change the text "Filter another plan" to "Search plans to clone to", I think that might make it a little bit clearer.
Also I'm not sure what the option "Create a copy (Unchecking will create a link to selected case)" exactly does because I haven't seen this link it speaks about. And why would you want this anyway? I would maybe also rather put this option on by default.
Also, I noticed that when you clone a case, the "Default tester" is set to either the logged in user or the author of the cloned case, but in any case, I would say that isn't expected behavior. BTW in this case the "Default tester" of the cloned case was empty.
@gitaarik can you take a look at the latest master branch, Clone TP page. This "Create a copy" label was updated and there's the following help text "Clone or link existing TCs into new TP". Does this make things more clear?
To explain: when cloning a TP you can either add the same TC objects inside the new TP and both TPs will share the same IDs for test cases or you can select to clone the TC records themselves and the new records will have identical content but different IDs.
I am starting to work on the TC clone page now and will look into this behavior in more details. Some usage scenarios don't really make sense, e.g. when cloning a TC into the same TP you always want to create a new record so you can later modify it. If this "Create a copy" checkbox is not selected then nothing really happens which doesn't make any sense.
I was talking about the Test Case clone page exclusively. I haven't used the Test Plan clone page yet.
I see the Test Case clone page has been updated and simplified:
So that is very nice! However, I still have some questions about this page actually. What are these options for? As far as I can tell:
However, unchecking the second option always results in the error "At least one TestCase is required!", so what is the use of being able to uncheck this option? Also, the user is navigated to this page by clicking the "Clone" option on a TC detail page, so the user's intention is to clone that TC, why would you then want to say you don't want to clone it?
With the first option, you can clone the TC without it being added to the TP the original TC is in. I can see it is desirable that you would want to clone it to another TP, but why would you want to clone it to no TP at all? Maybe it would be nice if it was a dropdown with all TPs as options. And the default selected option in this dropdown is the TP of the original TC. This way you can easily clone a TC in the current TP, or you can choose to clone it into another TP.
Also it is maybe good to prefix the title of the clone with
What do you think? I am willing to contribute.
This is correct. If you think wording can be better send a PR.
Same UI template and code is used when cloning multiple test cases from inside a Test Plan (TP document / Cases tab / Cases menu / Clone). Sometimes it is easier to click the checkbox that selects all available test cases and then remove the ones which you don't want to clone.
You may want to clone a stand-alone TC without a TP document at all. This is the same when creating a new TC from the menu. You may want to create the TC records first, then add them to a TP. An edge case here is that you want exactly the same TC but want another record to include it into another TP.
Or there could be a scenario in which another person is creating the TP document or even the one creating test cases may not have sufficient permissions/be restricted, e.g. they are a junior.
All of these scenarios are possible, it is up to the user to decide what they want to do. (note: there may be bugs especially around permissions but they need to be fixed if they exist).
Like you say most commonly you want to create a new TC record in the same TP and then modify it slightly. This is why the default is for this to be turned on.
Note: Test plans shown in the first option are all TP documents in which the current TC is a member. Try cloning a TC which has been added to several test plans and you will see it.
This will slow down page load times on instances ith lots of TPs or slow database. Also doesn't make multiple TP selection easier.
Clone & add to a new TP has been removed as direct functionality. You should Clone w/o TP, modify new TC and then add it to the desired TP. This will be made easier when #1021 is implemented.