Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: change clone testcase default form parameters #838

Closed
gitaarik opened this issue Mar 5, 2019 · 3 comments

Comments

@gitaarik
Copy link
Contributor

commented Mar 5, 2019

I think it might be nicer if the default option is set to "Use the same Plan" instead of "Filter another plan" because:

  • I use the clone function to create new testcases that look like the previous one, so I can make adjustments the clone instead of typing it over or manually copy and pasting, so usually I need to clone to the same plan
  • If you need to clone it to other plan(s), then you need to search for the plan(s), which is some work anyway. And since you can add the same case to multiple plans, cloning a case to another plan would not be something you need to do very often I think.

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.

screen shot 2019-03-05 at 17 08 55

@atodorov

This comment has been minimized.

Copy link
Member

commented Jul 24, 2019

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.

@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.

atodorov added a commit that referenced this issue Jul 24, 2019

Clone TC: Select 'Use the same Plan' by default. Refs #838
indeed it is far more common to copy a TC inside the same TP so
you can change it later and avoid lots of typing or copy&pasting.

atodorov added a commit that referenced this issue Jul 24, 2019

Clone TC: remove 'Filter another plan' option. Refs #838
- this simplifies the forms and cloning operation
- will be replaced by 'Add TP to TC', see
  #1021

Note: the functionality 'Clone TC into another TP + copy', e.g.
create a new TC record (with new ID) which is part of a different
TP will not be supported. Instead the user can either:

1) Add existing TC into new TP + clone to duplicate the ID + remove
   the older TC or;
2) Manually create a new TC which will be part of the new TP

atodorov added a commit that referenced this issue Jul 24, 2019

Clone TC: always create new TC record when cloning. Refs #838
otherwise it doesn't really make any sense, now that we can only
clone test cases into the same TP.

atodorov added a commit that referenced this issue Jul 24, 2019

Clone TC: always keep default tester. Fixes #838
when cloning test cases we'll always keep the value of
default_tester that was set on the source TC. This is the same
behavior that was introduced when cloning TPs + TCs, see
a9c7ccf

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: Select 'Use the same Plan' by default. Refs #838
indeed it is far more common to copy a TC inside the same TP so
you can change it later and avoid lots of typing or copy&pasting.

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: remove 'Filter another plan' option. Refs #838
- this simplifies the forms and cloning operation
- will be replaced by 'Add TP to TC', see
  #1021

Note: the functionality 'Clone TC into another TP + copy', e.g.
create a new TC record (with new ID) which is part of a different
TP will not be supported. Instead the user can either:

1) Add existing TC into new TP + clone to duplicate the ID + remove
   the older TC or;
2) Manually create a new TC which will be part of the new TP

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: always create new TC record when cloning. Refs #838
otherwise it doesn't really make any sense, now that we can only
clone test cases into the same TP.

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: always keep default tester. Fixes #838
when cloning test cases we'll always keep the value of
default_tester that was set on the source TC. This is the same
behavior that was introduced when cloning TPs + TCs, see
a9c7ccf

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: Select 'Use the same Plan' by default. Refs #838
indeed it is far more common to copy a TC inside the same TP so
you can change it later and avoid lots of typing or copy&pasting.

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: remove 'Filter another plan' option. Refs #838
- this simplifies the forms and cloning operation
- will be replaced by 'Add TP to TC', see
  #1021

Note: the functionality 'Clone TC into another TP + copy', e.g.
create a new TC record (with new ID) which is part of a different
TP will not be supported. Instead the user can either:

1) Add existing TC into new TP + clone to duplicate the ID + remove
   the older TC or;
2) Manually create a new TC which will be part of the new TP

atodorov added a commit that referenced this issue Jul 25, 2019

Clone TC: always create new TC record when cloning. Refs #838
otherwise it doesn't really make any sense, now that we can only
clone test cases into the same TP.

@atodorov atodorov closed this in de58a17 Jul 25, 2019

@gitaarik

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

Hey @atodorov,

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:

Screen Shot 2019-08-14 at 11 22 34

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:

  • In the first option you select into which Test Plan you want to clone
  • In the second option you select which Test Case you want to clone

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 Clone of "Original TC name".

What do you think? I am willing to contribute.

@atodorov

This comment has been minimized.

Copy link
Member

commented Aug 16, 2019

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:

  • In the first option you select into which Test Plan you want to clone
  • In the second option you select which Test Case you want to clone

This is correct. If you think wording can be better send a PR.

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?

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.

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?

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.

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 will slow down page load times on instances ith lots of TPs or slow database. Also doesn't make multiple TP selection easier. 👎 if you ask me.

This way you can easily clone a TC in the current TP, or you can choose to clone it into another TP.

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.

Also it is maybe good to prefix the title of the clone with Clone of "Original TC name".

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.