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

Bug 201893

Summary: what does the synchronous option mean for an invocation behavior in a JUnit Test Suite?
Product: z_Archived Reporter: jkubasta
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: endres, sluiman
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Patch. none

Description jkubasta CLA 2007-08-31 08:55:02 EDT
The "Editing a JUnit test" and "Editing a manual test" sections in the online documentation both explain the synchronous checkbox (detailed property) when defining/editing a LOOP behavior as shown below:
=================================================================================
Behaviors let you control the order in which test methods are run; you do this by specifying invocations and loops. For example, in the figure shown above, test 1 and test 2 run inside Loop 1. Use the Number of Iterations box to specify how many times to execute the loop. With Synchronous checked and more than one iteration specified, the loop iterations execute in sequence. With Synchronous unchecked and more than one iteration specified, the loop iterations execute simultaneously. 

However, I don't see any mention of what the synchronous checkbox (detailed property) means for
an invocation bebavior.  I thought it might reflect the synchronous behavior of the loop it is contained in but it doesn't (that is, I had an invocation behavior nested in a loop behavior and indicated the loop 
behavior is not synchronous, but the invocation behavior still has the synchronous checkbox checked).  And I suppose if it was a reflection of a containing loop behavior's synchronous option than the 
synchronous option for an invocation behavior would be disabled and it's not).  So what does a 
synchronous behavior for an invocation behavior really mean.  It makes sense for a loop since you can define iterations for a loop, but not clear what it means for testcase invocation.
Comment 1 Paul Slauenwhite CLA 2007-10-01 13:52:38 EDT
This checkbox has been removed for the manual test type.
Comment 2 Paul Slauenwhite CLA 2008-01-07 09:08:20 EST
Deferring to I6.
Comment 3 Harm Sluiman CLA 2008-01-07 09:32:10 EST
(In reply to comment #1)
> This checkbox has been removed for the manual test type.
> 

Perhaps the word should be sequential or something else, but the basic intent is to allow parallel execution or not in a sequence. The element marked may o rnot be in sync with the other elements in it's containing loop.

This concept is applicable to all executions, including manual. Why would it be removed? Because the UI doesn't properly support it? If so, it seems like the worng fix.
Comment 4 Paul Slauenwhite CLA 2008-01-16 21:20:51 EST
(In reply to comment #3)

Meaning:

1) Loop: If synchronous, all child loops and child test invocations are executed sequentially. 

2) Test Invocations: If synchronous, the test execution must be completed before the next loop or test invocation is executed.

> Perhaps the word should be sequential or something else, but the basic intent
> is to allow parallel execution or not in a sequence. The element marked may o
> rnot be in sync with the other elements in it's containing loop.

I think sequential might be better.  However, we need clear docs to really convey the meaning.

> This concept is applicable to all executions, including manual. Why would it be
> removed? Because the UI doesn't properly support it? If so, it seems like the
> worng fix.

It was removed (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109866) since users were confused about the concept, with respect to manual test invocations.  In addition, the Manual Test View did not force synchronous execution of loops or test invocations.  After reviewing the meaning of synchronous vs asynchronous execution of test invocations, removing the option seems to have been the wrong fix in hindsight.  Although the Manual Test Tools are as-is components, I have backed out this change in the event the component is enhanced in the future.  The following files are checked-in to CVS (HEAD):

org.eclipse.hyades.test.tools.ui.common.internal.editor.LoopDetailPage.java
org.eclipse.hyades.test.tools.ui.common.internal.editor.TestInvocationDetailPage.java
org.eclipse.tptp.test.tools.manual.ui.internal.resources.ManualUIResourceBundle.java
/org.eclipse.tptp.test.tools.manual/src-ui/org/eclipse/tptp/test/tools/manual/ui/internal/resources/messages.properties


Comment 5 Paul Slauenwhite CLA 2008-04-16 14:58:15 EDT
Hours worked to create and verify the patch.
Comment 6 Paul Slauenwhite CLA 2008-04-16 15:30:58 EDT
Created attachment 96319 [details]
Patch.
Comment 7 Paul Slauenwhite CLA 2008-04-16 15:31:51 EDT
Additional hours for refactoring the JUnit Plug-in test documentation.

Patch checked-in to CVS (HEAD).
Comment 8 jkubasta CLA 2009-02-25 11:39:14 EST
closing