Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341800 - Deleting a parameter reference leaves empty data sets at the place of reuse
Summary: Deleting a parameter reference leaves empty data sets at the place of reuse
Status: CLOSED WONTFIX
Alias: None
Product: Jubula
Classification: Technology
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Oliver Goetz CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 11:03 EDT by Alexandra Schladebeck CLA
Modified: 2013-11-19 09:34 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Schladebeck CLA 2011-04-04 11:03:14 EDT
When a parameter from a Test Case is deleted via Edit Parameters, then the data for the parameter are removed at all places of reuse. However, the empty data sets remain at the place of reuse (and lead to the Test Case being executed n times, once for each empty data set).

Workaround: remove the affected Test Case and re-add it or set the data source to referenced data.

To reproduce:

1. Create a Test Case "TC1"
2. Via edit parameters, add a parameter "TEST"
3. Reuse TC1 in another Test Case "TC2" and add one or more data sets
4. In TC1, remove the TEST parameter via edit parameters and save
5. In TC2 - the empty data sets are shown for the reuse of TC1.
Comment 1 Zeb Ford-Reitz CLA 2011-05-05 05:33:21 EDT
This bug seems to only occur when the final Parameter for a Test Case is removed.

The empty data sets are removed when TC2 is opened, so adding the following steps should resolve the problem:

 6. Close editor for TC2.
 7. Open new editor for TC2.

Which leaves us with the question: Why doesn't this "fix" happen automatically?

There's a couple of reasons why this might not be desirable or practical. One of which is exclusivity, or locking. If one of the Test Cases is currently being edited, Jubula should not make other modifications to that Test Case, as they may conflict with the user's unsaved modifications. So some of the Test Cases could be automatically modified, but not necessarily all. 

Another similar aspect of the problem is reusable Projects. Changes in a reused Project should under no circumstances automatically change the reusing Projects. And beyond that, there's the scenario that a reusing Project is simply missing from the database (due to not yet being imported, for example) at the time the final Parameter is removed, causing Test Cases in that Project to not be updated properly.

The last issue that springs to mind regarding automatic adjustments is the (admittedly improbable) case that Test Case Parameters are only temporarily missing. This can be caused by importing or selecting the incorrect version of a Project, and could result in losing all data for a Parameter.

With all of that said, the possibility of a test breaking because the user removed a Parameter and was completely unaware that all corresponding Test Case References need to be "refreshed" is also disturbing.

Alternatives to automatic adjustments would be:
 * Refactoring or quickfix tooling, which would assist the user in "refreshing" all corresponding Test Case References. This could be an automatic part of deleting the last Parameter in a Test Case.
 * Warnings or errors in the Problems View indicating the potential problem.
Comment 2 Alexandra Schladebeck CLA 2013-11-19 05:48:05 EST
Since this is tricky and doesn't seem to have bothered anyone, resolving as wontfix.
Comment 3 Oliver Goetz CLA 2013-11-19 09:34:01 EST
Closed due to comment 2.