Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 104410

Summary: [Testing] Refactor the TPTP test suite to contain the name of the bugzilla component
Product: z_Archived Reporter: Ruth Lee <ruthdaly>
Component: TPTPAssignee: Scott E. Schneider <scott.schneider>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: scott.schneider
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 109657    

Description Ruth Lee CLA 2005-07-19 17:07:07 EDT
This is a defect for all of the test suites owned by the Test Project.

Refactor the TPTP test suite so that the name of the test suite contains the
name of the bugzilla component because this will make tracking test status
easier. When the test reports are generated, the names of the bugzilla
components must be in the report instead of descriptive names. The list of tests
in the report can then be compared to the list of bugzilla components
and any missing test cases will be identified by the Project lead.

Paul recommended that we refactor at the directory level as well for containment
and use the bugzilla component as an additional name space.  

If the test suite contains several functions, you can either use the bugzilla
component name as the name of the test suite or use the bugzilla component as a
prefix, e.g. Platform.Communication_AC and Platform.Communication_RAC to show
test results for both the new agent controller and the existing agent controller. 

Migrating existing test suites:
   1. When the existing test suite contains tests for a single bugzilla
component, just rename the test suite.
	e.g. "Java Profiler" -> Platform.Agents.JVMPI
   2. For cases where the test suite contains tests for multiple bugzilla
components, but the test cases for each component are not shared, then split
that test suite into several, each named according to their bugzilla component.
   3. If multiple test suites provide tests for the same bugzilla component,
merge those tests into one, or into several that are prefixed by the name of the
bugzilla component as explained above.
	e.g. new Symptom DB, import Symptom DB
		If keeping the test suites as multiple suites => Monitor.UI.SDBEditor_new
Symptom DB, Monitor.UI.SDBEditor_import Symptom DB
		If merging the test suite into a single suite => Monitor.UI.SDBEditor
   4. If a test suite contains tests for multiple bugzilla components, and the
test cases are used by more than one component, then choose a bugzilla component
to own the test suite. 
	4.1 Create a test suite for that owner component. 
	4.2 For the other bugzilla components, create a test suite and nest the owner
test suite inside to indicate that this test suite depends on the owner test suite. 
   5. In the case when a test suite contains both shared tests and tests that
are not shared, choose an owner bugzilla component for the common tests and
create a test suite for it. Create a separate test suite for the tests that are
not shared. The not-shared suite should nest the common test suite inside to
show that it depends on the common test suite.

Note that the refactoring operation may be a problem since there is an
outstanding defect for renaming test suites
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=83087).
Comment 1 Ruth Lee CLA 2005-08-10 09:29:38 EDT
-Rename test suites-
1. Rename the actual ".testsuite" file. (Open the "Navigator" view, right click,
"Rename", change the name from "ABC.testsuite" to "BugzillaComponent.testsuite"). 
2. Open the Test Perspective. Open the test suite by double-clicking on it.
Change the "Name" and "Description" to reflect the new name.
3. Open the .testsuite file with WinZip (right-click, Open With, System Editor >
Winzip).
4. Open the ResourceContents file in Notepad. (Double-click in WinZip.)
5. Rename "ABC" to "BugzillaComponent" on the "name" attribute of the "behavior"
element from ABC_behavior to BugzillaComponent_behavior. 
6. Update the the zip file with the ResourceContents test suite inside of
Eclipse (hit F5 to refresh).
7. Open up the "AllTests.testsuite" that is in the grandparent directory. Go to
the Behavior tab, remove the invocation to the old test suite (ABC -
invocation). Insert > Invocation > browse to the new test suite. Save the editor.
8. In the cases where there are other test suites that link to ABC.testsuite,
those also have to be changed, using the same technique as in #7.
9. Delete the ABC.testsuite from CVS, add the BugzillaComponent.testsuite into
CVS, and update the AllTests.testsuite in CVS. 

-Moving test suites-
1. Create a brand new test suite. (Follow the instructions in README.txt.)
http://dev.eclipse.org/viewcvs/index.cgi/test-results/platform/org.eclipse.hyades.tests/README.txt?rev=HEAD&cvsroot=TPTP_Project&content-type=text/vnd.viewcvs-markup

2. Manually copy the test cases from the old test suite into the new test suite.
3. Follow #7, #8, and #9.

-Splitting test suites or merging test suites-
If you need to split up tests amongst test suites, then create several new test
suites and add the appropriate tests. Similarly for merging test suites, create
a single new test suite and add the test cases from the old test suites into the
new.
Comment 2 Christophe Telep CLA 2005-09-26 12:16:55 EDT
Assigned to Scott who is working on it.
Comment 3 Scott E. Schneider CLA 2005-10-03 19:27:36 EDT
Refactoring of test project test suites is complete.
Comment 4 Paul Slauenwhite CLA 2006-11-16 08:58:34 EST
ACTION: Please verify/close this defect.
Comment 5 Ruth Lee CLA 2006-11-16 09:30:18 EST
Closing