Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Not able to use Verification Mechanism
Not able to use Verification Mechanism [message #123428] Tue, 19 February 2008 22:31 Go to next message
Pushparaj is currently offline PushparajFriend
Messages: 62
Registered: July 2009
Member
Hi,
I am trying use verification mechanism for validating my controls.
So while recording script,
I opened my dialog then i insert verification hook in AGR recorder after
that the status of the recorder is changed to 'select a target (a view,
editor, or dialog). So i try to select my dialog. But dialog is not
getting the focus.Also the status is also not changed in AGR recorder.

Am i doing anything wrong?

I am using TPTP4.4

Pushparaj
Re: Not able to use Verification Mechanism [message #123506 is a reply to message #123428] Wed, 20 February 2008 12:21 Go to previous messageGo to next message
Jimmy Jin is currently offline Jimmy JinFriend
Messages: 32
Registered: July 2009
Member
As I remember, I also encountered similar problem when trying to create
a verification point on a opened dialog window. Sometime it can work
after several tries (switch between the workbench window in the back and
the dialog, or click some control on the dialog).

When I have time, I think I will look into this problem, because we are
now also creating some verification code for our software.

Regards,
Jimmy Jin

Pushparaj wrote:
> Hi,
> I am trying use verification mechanism for validating my controls.
> So while recording script, I opened my dialog then i insert verification
> hook in AGR recorder after that the status of the recorder is changed to
> 'select a target (a view, editor, or dialog). So i try to select my
> dialog. But dialog is not getting the focus.Also the status is also not
> changed in AGR recorder.
>
> Am i doing anything wrong?
>
> I am using TPTP4.4
> Pushparaj
>
Re: Not able to use Verification Mechanism [message #123560 is a reply to message #123506] Wed, 20 February 2008 18:00 Go to previous messageGo to next message
Pushparaj is currently offline PushparajFriend
Messages: 62
Registered: July 2009
Member
Hi Jimmy Jin,

I click several times and click on some contols also. But still no use i
am no able to do anything after that. Also the staus in recorder is not
gettin changed

Thanks,
Pushparaj
Re: Not able to use Verification Mechanism [message #123665 is a reply to message #123560] Thu, 21 February 2008 14:02 Go to previous messageGo to next message
Jimmy Jin is currently offline Jimmy JinFriend
Messages: 32
Registered: July 2009
Member
Hello, Pushparaj,

I tried and found that if with Eclipse 3.3.1 and AGR 4.4.0.3, this
problem do exist on Linux. You can have a look at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=170279, and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=113543.

I attached a patch on bug 170279, so that the fix of the 113543 can work
as expected on Redhat Linux. After applied the patch, when you are
recording with a modal dialog, the "Test Case Control Center" (the one
with stop recording button) will not be usable, until you click it to
activate it. Then if you click back to the modal dialog window, the
"Test Case Control Center" will be disabled and the dialog window will
be usable again. (Hard to explain, so better try yourself.)

You can also try some workaround, without the patch, by clicking the
"Test Case Control Center", the background workbench window and the
modal dialog window randomly. Sometime it will come back to correct state.

Regards,
Jimmy Jin

Pushparaj wrote:
> Hi Jimmy Jin,
>
> I click several times and click on some contols also. But still no use i
> am no able to do anything after that. Also the staus in recorder is not
> gettin changed
>
> Thanks,
> Pushparaj
>
Re: Not able to use Verification Mechanism [message #124492 is a reply to message #123665] Tue, 26 February 2008 23:14 Go to previous messageGo to next message
Pushparaj is currently offline PushparajFriend
Messages: 62
Registered: July 2009
Member
Hi Jimmy Jin,
I can able to insert verification hooks in TPTP 4.3. But while running i
am getting some unexpected error.

Here i attached my error message and AGR srcipt

org.eclipse.core.runtime.CoreException
A time-out occurred while running command MacroCommand [select, line 6].
This is likely caused by the presence of an unexpected dialog or the
absence of an expected dialog.
org.eclipse.core.runtime.CoreException: A time-out occurred while running
command MacroCommand [select, line 6]. This is likely caused by the
presence of an unexpected dialog or the absence of an expected dialog.
at
org.eclipse.tptp.test.auto.gui.internal.commands.MacroComman dShell.playback(MacroCommandShell.java:1040)
at
org.eclipse.tptp.test.auto.gui.internal.macro.Macro.playback (Macro.java:346)
at
org.eclipse.tptp.test.auto.gui.internal.macro.MacroManager.r unMacro(MacroManager.java:574)
at
org.eclipse.tptp.test.auto.gui.internal.macro.MacroManager.a ccess$4(MacroManager.java:568)
at
org.eclipse.tptp.test.auto.gui.internal.macro.MacroManager$1 $MacroOperationWrapper.run(MacroManager.java:501)
at java.lang.Thread.run(Thread.java:595)





<macro version="1.0">
<shell descriptive="OpenClovis IDE - AutomatedGUITestSuite - Eclipse
S..." id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
<command descriptive="models" type="item-select"
resolverId="org.eclipse.tptp.test.auto.gui.adaptive"
contextId="view/com.clovis.cw.workspace.clovisWorkspaceView "
widgetId="{{/}}-{{1.0}}">
<item path="{{/TestModel1/models}}-{{1.0}}"
resolverId="org.eclipse.tptp.test.auto.gui.adaptive"/>
</command>
<command descriptive="Project..." type="select"
resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"
contextId=" popup/view/com.clovis.cw.workspace.clovisWorkspaceView/{{/}} -{{1.0}} "
widgetId="{{New-Project...}}-{{1.0}}"/>
<shell descriptive="New Project"
id="org.eclipse.jface.wizard.WizardDialog" return-code="0">
<command descriptive="Next &amp;gt;" type="select"
resolverId="org.eclipse.tptp.test.auto.gui.adaptive" contextId="wizard"
widgetId="{{15}}-{{1.0}}"/>
<command type="modify"
resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"
contextId="wizard-page/basicNewProjectPage" widgetId="Project name:">
<![CDATA[Test%^]]>
</command>
</shell>
<shell descriptive="New Project"
id="org.eclipse.jface.wizard.WizardDialog" return-code="1">
<command type="verification"
contextId="shell/org.eclipse.jface.wizard.WizardDialog"
location="/TestContainer/src"
resource="org.eclipse.verification.tests.AutomatedGUITestSuite "
hook="verifyNameOfTheProject:Qorg.eclipse.swt.widgets.Shell; "/>
<command descriptive="Cancel" type="select"
resolverId="org.eclipse.tptp.test.auto.gui.adaptive" contextId="wizard"
widgetId="{{1}}-{{1.0}}"/>
</shell>
</shell>
</macro>
Re: Not able to use Verification Mechanism [message #124743 is a reply to message #124492] Thu, 28 February 2008 14:25 Go to previous messageGo to next message
Jimmy Jin is currently offline Jimmy JinFriend
Messages: 32
Registered: July 2009
Member
Hi, Pushparaj,

I suggest you try to remove the lines after line 6 (starting with
"<shell descriptive="New Project" ..." and try to execute the script
again. And does the dialog "New Project" comes out?

If the error is still the same, then try to remove the line 6 also, and
try again. And see if the first item selection command executed
correctly or not.

Currently I don't know if it is caused by the line 6 (a popup menu
selection command) or caused due to the dialog is not opened.

BTW, it seems the verification command is recorded fine. This problem
should have nothing to do with it.

Regards,
Jimmy Jin

Pushparaj wrote:
> Hi Jimmy Jin,
> I can able to insert verification hooks in TPTP 4.3. But while running i
> am getting some unexpected error.
> Here i attached my error message and AGR srcipt
>
> org.eclipse.core.runtime.CoreException
> A time-out occurred while running command MacroCommand [select, line
> 6]. This is likely caused by the presence of an unexpected dialog or
> the absence of an expected dialog.
> org.eclipse.core.runtime.CoreException: A time-out occurred while
> running command MacroCommand [select, line 6]. This is likely caused by
> the presence of an unexpected dialog or the absence of an expected dialog.
> at
> org.eclipse.tptp.test.auto.gui.internal.commands.MacroComman dShell.playback(MacroCommandShell.java:1040)
>
> at
> org.eclipse.tptp.test.auto.gui.internal.macro.Macro.playback (Macro.java:346)
>
> at
> org.eclipse.tptp.test.auto.gui.internal.macro.MacroManager.r unMacro(MacroManager.java:574)
>
> at
> org.eclipse.tptp.test.auto.gui.internal.macro.MacroManager.a ccess$4(MacroManager.java:568)
>
> at
> org.eclipse.tptp.test.auto.gui.internal.macro.MacroManager$1 $MacroOperationWrapper.run(MacroManager.java:501)
>
> at java.lang.Thread.run(Thread.java:595)
>
>
>
>
>
> <macro version="1.0">
> <shell descriptive="OpenClovis IDE - AutomatedGUITestSuite - Eclipse
> S..." id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
> <command descriptive="models" type="item-select"
> resolverId="org.eclipse.tptp.test.auto.gui.adaptive"
> contextId="view/com.clovis.cw.workspace.clovisWorkspaceView "
> widgetId="{{/}}-{{1.0}}">
> <item path="{{/TestModel1/models}}-{{1.0}}"
> resolverId="org.eclipse.tptp.test.auto.gui.adaptive"/>
> </command>
> <command descriptive="Project..." type="select"
> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"
> contextId=" popup/view/com.clovis.cw.workspace.clovisWorkspaceView/{{/}} -{{1.0}} "
> widgetId="{{New-Project...}}-{{1.0}}"/>
> <shell descriptive="New Project"
> id="org.eclipse.jface.wizard.WizardDialog" return-code="0">
> <command descriptive="Next &amp;gt;" type="select"
> resolverId="org.eclipse.tptp.test.auto.gui.adaptive" contextId="wizard"
> widgetId="{{15}}-{{1.0}}"/>
> <command type="modify"
> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"
> contextId="wizard-page/basicNewProjectPage" widgetId="Project name:">
> <![CDATA[Test%^]]>
> </command>
> </shell>
> <shell descriptive="New Project"
> id="org.eclipse.jface.wizard.WizardDialog" return-code="1">
> <command type="verification"
> contextId="shell/org.eclipse.jface.wizard.WizardDialog"
> location="/TestContainer/src"
> resource="org.eclipse.verification.tests.AutomatedGUITestSuite "
> hook="verifyNameOfTheProject:Qorg.eclipse.swt.widgets.Shell; "/>
> <command descriptive="Cancel" type="select"
> resolverId="org.eclipse.tptp.test.auto.gui.adaptive" contextId="wizard"
> widgetId="{{1}}-{{1.0}}"/>
> </shell>
> </shell>
> </macro>
>
>
Re: Not able to use Verification Mechanism [message #125229 is a reply to message #124743] Mon, 03 March 2008 16:07 Go to previous messageGo to next message
Pushparaj is currently offline PushparajFriend
Messages: 62
Registered: July 2009
Member
Hi jimmy Jin,

I tested my test script after removing those lines also. But there is no
use.
I think TPTP is not able to execute the script after the verification
command. Because up to verification method it i sgoing fine. But after
that it was hang for sometime then giving the error messages in some un
expected line numbers.

Thanks,
Pushparaj
Re: Not able to use Verification Mechanism [message #125293 is a reply to message #125229] Tue, 04 March 2008 13:49 Go to previous message
Jimmy Jin is currently offline Jimmy JinFriend
Messages: 32
Registered: July 2009
Member
Hello, Pushparaj,

Look at your script carefully again, and find that there are 2 "New
Project" Shell, but I guess actually it only opens 1, and then do
something in it and then verify it, right? So I think you can try to
combine the 2 <shell> into 1 (see below). This is a problem when
recording the verification. Usually after recording, I will double check
(by reading it) if the script is doing what I expect it to do.

<macro version="1.0">
<shell descriptive="OpenClovis IDE - AutomatedGUITestSuite -
Eclipse S..." id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">

....

<shell descriptive="New Project"
id="org.eclipse.jface.wizard.WizardDialog" return-code="0">

....
<!-- Remove following 2 lines -->
</shell>
<shell descriptive="New Project"
id="org.eclipse.jface.wizard.WizardDialog" return-code="1">
<!-- Remove above 2 lines -->
<command type="verification"
contextId="shell/org.eclipse.jface.wizard.WizardDialog"
location="/TestContainer/src"
resource="org.eclipse.verification.tests.AutomatedGUITestSuite "
hook="verifyNameOfTheProject:Qorg.eclipse.swt.widgets.Shell; "/>

....

</shell>
</shell>
</macro>

Regards,
Jimmy Jin

Pushparaj wrote:
> Hi jimmy Jin,
>
> I tested my test script after removing those lines also. But there is no
> use.
> I think TPTP is not able to execute the script after the verification
> command. Because up to verification method it i sgoing fine. But after
> that it was hang for sometime then giving the error messages in some un
> expected line numbers.
>
> Thanks,
> Pushparaj
>
Previous Topic:Is timeline preserved within TPTPs?
Next Topic:UML Log Perspective
Goto Forum:
  


Current Time: Fri Apr 19 19:24:32 GMT 2024

Powered by FUDForum. Page generated in 0.03710 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top