Hi All, 

I have written multiple login testcases using dpunit and using sequence as
per sample example. In this sequence whether we do login or logout server
trip is made and required processing is done on server. 

The testcase structure is as follows: 

TestCase1.as                                                   |

setup()                                                         | 
tescase1() {login is called on server}  ======>    | 
teradown() {logout called on server}                  | 
                                                                    | 
TestCase2.as                                                  | 
setup()                                                          | 
tescase2() {login is called on server}  ======>    |     TestSuite =====>
TestRunner                                                
teradown() {logout called on server}                  | 
                                                                    | 
TestCase3.as                                                  | 
setup()                                                          | 
tescase3() {login is called on server}  ======>    | 
teradown() {logout called on server}                  | 

As per my knowledge after completion of teardown() of testcase1 then it
should go for 2nd test setup() and this works fine. But what is happening
that UIComponent maintains list of function to be called. 
UIComponent is not calling individual functions. So login is called
perfectly but logout is not being called. So 1st testcase it is working but
for 2nd testcase it's giving error. This error is due to logout has not
happen on 1st testcase and 2nd testcase is trying to login on server. 

The error is as follows: 

Error: Credentials cannot be set while authenticating or logging out.

          at
mx.messaging::Channel/setCredentials()[C:\dev\depot\flex\branches\flex_201_b
orneo\sdk\frameworks\mx\messaging\Channel.as:841]

          at
mx.messaging::ChannelSet/setCredentials()[C:\dev\depot\flex\branches\flex_20
1_borneo\sdk\frameworks\mx\messaging\ChannelSet.as:960]

          at
mx.messaging::MessageAgent/setCredentials()[C:\dev\depot\flex\branches\flex_
201_borneo\sdk\frameworks\mx\messaging\MessageAgent.as:840]

          at
mx.rpc::AbstractService/setCredentials()[C:\dev\depot\flex\branches\flex_201
_borneo\sdk\frameworks\mx\rpc\AbstractService.as:379]

          at
com.adobe.cairngorm.business::SecureDestinationLocator/setCredentialsOnServi
ce()[E:\PerforceClient\dev\www\src\com\adobe\cairngorm\business\SecureDestin
ationLocator.as:263]

          at
com.adobe.cairngorm.business::SecureDestinationLocator/setServiceCredentials
()[E:\PerforceClient\dev\www\src\com\adobe\cairngorm\business\SecureDestinat
ionLocator.as:104]

          at
com.adobe.cairngorm.business::SecureDestinationLocator/setCredentials()[E:\P
erforceClient\dev\www\src\com\adobe\cairngorm\business\SecureDestinationLoca
tor.as:71]

          at
com.cognos.obi.ria.authentication.business::LoginBusinessDelegate/login()[E:
\PerforceClient\dev\www\src\com\cognos\obi\ria\authentication\business\Login
BusinessDelegate.as:35]

          at
com.cognos.obi.ria.authentication.commands::LoginCommand/execute()[E:\Perfor
ceClient\dev\www\src\com\cognos\obi\ria\authentication\commands\LoginCommand
.as:28]

          at
com.adobe.cairngorm.control::FrontController/executeCommand()[C:\dev\swat\pr
ojects\ac_emea\Cairngorm\com\adobe\cairngorm\control\FrontController.as:212]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()[C:\dev
\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEventD
ispatcher.as:113]

          at
com.cognos.obi.ria.authentication.view::LoginForm/login()[E:\PerforceClient\
dev\www\src\com\cognos\obi\ria\authentication\view\LoginForm.mxml:60]

          at
com.cognos.obi.ria.authentication.view::LoginForm/__b_submit_click()[E:\Perf
orceClient\dev\www\src\com\cognos\obi\ria\authentication\view\LoginForm.mxml
:88]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta3\sdk\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:9041]

          at
net.digitalprimates.flex2.uint.sequence::SequenceEventDispatcher/execute()[C
:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceEventDispatcher.as:67]

          at
net.digitalprimates.flex2.uint.sequence::SequenceRunner/applyActions()[C:\Do
cuments and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceRunner.as:110]

          at
net.digitalprimates.flex2.uint.sequence::SequenceRunner/continueSequence()[C
:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceRunner.as:157]

          at
net.digitalprimates.flex2.uint.tests::TestCase/handleNextSequence()[C:\Docum
ents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:359]

          at
tests.com.cognos.obi.ria.authentication.view::TestNegativeLogin/passwordVali
datorEventHandler()[E:\PerforceClient\dev\www\src\tests\com\cognos\obi\ria\a
uthentication\view\TestNegativeLogin.as:138]

          at Function/http://adobe.com/AS3/2006/builtin::apply()

          at
net.digitalprimates.flex2.uint.tests::TestCase/protect()[C:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:292]

          at
net.digitalprimates.flex2.uint.tests::TestCase/handleAsyncEventFired()[C:\Do
cuments and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:224]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
net.digitalprimates.flex2.uint.async::AsyncHandler/handleEvent()[C:\Document
s and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\async\AsyncHandler.as:166]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
mx.validators::Validator/processValidation()[E:\dev\flex_3_beta3\sdk\framewo
rks\projects\framework\src\mx\validators\Validator.as:880]

          at
mx.validators::Validator/validate()[E:\dev\flex_3_beta3\sdk\frameworks\proje
cts\framework\src\mx\validators\Validator.as:814]

          at
mx.validators::Validator/triggerHandler()[E:\dev\flex_3_beta3\sdk\frameworks
\projects\framework\src\mx\validators\Validator.as:1014]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta3\sdk\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:9041]

          at
mx.controls::TextInput/focusOutHandler()[E:\dev\flex_3_beta3\sdk\frameworks\
projects\framework\src\mx\controls\TextInput.as:2162]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta3\sdk\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:9041]

          at
tests.com.cognos.obi.ria.authentication.view::TestNegativeLogin/setValidator
()[E:\PerforceClient\dev\www\src\tests\com\cognos\obi\ria\authentication\vie
w\TestNegativeLogin.as:119]

          at Function/http://adobe.com/AS3/2006/builtin::call()

          at
net.digitalprimates.flex2.uint.sequence::SequenceSetterWithFunctionCall/exec
ute()[E:\PerforceClient\dev\www\src\net\digitalprimates\flex2\uint\sequence\
SequenceSetterWithFunctionCall.as:38]

          at
net.digitalprimates.flex2.uint.sequence::SequenceRunner/applyActions()[C:\Do
cuments and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceRunner.as:110]

          at
net.digitalprimates.flex2.uint.sequence::SequenceRunner/continueSequence()[C
:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceRunner.as:157]

          at
net.digitalprimates.flex2.uint.tests::TestCase/handleNextSequence()[C:\Docum
ents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:359]

          at Function/http://adobe.com/AS3/2006/builtin::apply()

          at
net.digitalprimates.flex2.uint.tests::TestCase/protect()[C:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:292]

          at
net.digitalprimates.flex2.uint.tests::TestCase/handleAsyncEventFired()[C:\Do
cuments and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:224]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
net.digitalprimates.flex2.uint.async::AsyncHandler/handleEvent()[C:\Document
s and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\async\AsyncHandler.as:166]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at
mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta3\sdk\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:9041]

          at mx.controls::TextInput/set
text()[E:\dev\flex_3_beta3\sdk\frameworks\projects\framework\src\mx\controls
\TextInput.as:1515]

          at
net.digitalprimates.flex2.uint.sequence::SequenceSetter/execute()[C:\Documen
ts and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceSetter.as:78]

          at
net.digitalprimates.flex2.uint.sequence::SequenceRunner/applyActions()[C:\Do
cuments and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceRunner.as:110]

          at
net.digitalprimates.flex2.uint.sequence::SequenceRunner/continueSequence()[C
:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\sequence\SequenceRunner.as:157]

          at
net.digitalprimates.flex2.uint.tests::TestCase/handleNextSequence()[C:\Docum
ents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:359]

          at
tests.com.cognos.obi.ria.authentication.view::TestNegativeLogin/nameValidato
rEventHandler()[E:\PerforceClient\dev\www\src\tests\com\cognos\obi\ria\authe
ntication\view\TestNegativeLogin.as:127]

          at Function/http://adobe.com/AS3/2006/builtin::apply()

          at
net.digitalprimates.flex2.uint.tests::TestCase/protect()[C:\Documents and
Settings\mlabriola\Workspaces\net\digitalprimates\dpUInt\net\digitalprimates
\flex2\uint\tests\TestCase.as:292]

 

So I am looking for such as property in UIComponent which forces each and
every function to call explicitly. 
For this I have tried with suspendBackgroundProcessing(), 
resumeBackgroundProcessing() updateCallbacks() but no success. 

Has any body has come accross such issue? 

Thank in Advance. 
Parag 

 


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

Reply via email to