Cross-population of step results and IllegalStateExceptions when running in 
multi-threaded mode with multiple <webtest> tasks in the same ant file
--------------------------------------------------------------------------------------------------------------------------------------------------

         Key: WT-477
         URL: http://webtest-community.canoo.com/jira/browse/WT-477
     Project: WebTest
        Type: Bug

    Versions: Future versions    
    Reporter: John Spann
 Attachments: WebtestMulitThread.txt

When running webtest and defining wt.parallel.nbWorkers for multi-threaded 
support, the resulting report summary shows the incorrect number of tests run 
and individual reports are cluttered with steps from other from other tests.  
Strange outputs, such as <invoke> tasks containing nested <config> tasks appear 
in the report.

This is due to StepExecutionListeners created within different threads being 
registered to the same parent Project.  When stepResults, taskStarted, and 
taskFinished events are fired, all listeners within the Project are notified, 
regardless of the thread they were created within.  IllegalStateExceptions 
occur when a task finishes within one thread while another thread is still 
within the execute method of WebTestTask, has registered its created listener 
with the Project, but has not begun performing any of its TestSequence tasks 
(the listener has not seen any taskStarted events).

I have attached an SVN patch to resolve the issue by explicitly associating the 
StepExecutionListener to the thread it was created within.  All unit and 
selftests pass after this patch is applied.

Cheers,

~John Spann

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to