Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » ArrayIndexOutofBoundsException
ArrayIndexOutofBoundsException [message #121590] Wed, 30 January 2008 20:59 Go to next message
Pushparaj is currently offline Pushparaj
Messages: 62
Registered: July 2009
Member
Hi All,
I am trying to get familiar with TPTP's Automated GUI Recorder. During
these investigations I have problems while running my recorded test cases.

org.eclipse.core.runtime.CoreException
Error while executing a macro command: MacroCommand [choice-select, line
34]
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.eclipse.tptp.test.auto.gui.internal.commands.ChoiceSelec tionCommand.playback(ChoiceSelectionCommand.java:143)


My recorded macro is,
<macro version="1.0">
<shell descriptive="OpenClovis IDE - ProjectCreationTestSuite -
Eclips..." referenceId="0" return-code="-1">
<command descriptive="Project..." type="select" referenceId="4"/>
<shell descriptive="New Project" referenceId="2" return-code="0">
<command descriptive="New Project" type="item-select" referenceId="5">
<item referenceId="13"/>
</command>
<command type="focus" referenceId="5"/>
<command descriptive="Next &amp;gt;" type="select" referenceId="8"/>
<command type="modify" referenceId="9">
<![CDATA[Test]]>
</command>
<command type="modify" referenceId="22">
<![CDATA[/home/my/pkg]]>
</command>
<command type="modify" referenceId="15">
<![CDATA[/home/my/pkg]]>
</command>
<command type="modify" referenceId="15">
<![CDATA[/usr/bin]]>
</command>
<command descriptive="Next &amp;gt;" type="select" referenceId="8"/>
<command descriptive="Add" type="select" referenceId="16"/>
<command descriptive="Add" type="select" referenceId="16"/>
<command descriptive="Next &amp;gt;" type="select" referenceId="8"/>
<command descriptive="Add" type="select" referenceId="17"/>
<command descriptive="Add" type="select" referenceId="17"/>
<command descriptive="Next &amp;gt;" type="select" referenceId="8"/>
<command descriptive="Add" type="select" referenceId="18"/>
<command descriptive="Add" type="select" referenceId="18"/>
<command descriptive="Node0" type="item-select" referenceId="19">
<item referenceId="20"/>
</command>
<command descriptive="Node1" type="choice-select" referenceId="21"
choiceId="item#1"/>
<command descriptive="Finish" type="select" referenceId="11"/>
</shell>
</shell>
</macro>

Thanks,
Pushparaj
Re: ArrayIndexOutofBoundsException [message #121605 is a reply to message #121590] Thu, 31 January 2008 08:46 Go to previous messageGo to next message
Jimmy Jin is currently offline Jimmy Jin
Messages: 32
Registered: July 2009
Member
I guess you are using AGR version 4.3.x or earlier, right? Because as I
see in latest version (4.4.x), this error message will be shown
correctly as "Cannot locate view control: ...".

Your line 34 is
"<command descriptive="Node1" type="choice-select" referenceId="21"
choiceId="item#1"/>". So I think it cannot find the widget (with
referenceId 21). I suggest you do the steps manually in the EXACT
environment where you playback your script to see what the difference
is. There may be sometime that when you recording the script, some
widget is there, but when you playback, due to some environment
difference (such as number of project in workspace), something can be
different.

Regards,
Jimmy Jin


Pushparaj wrote:
> Hi All,
> I am trying to get familiar with TPTP's Automated GUI Recorder. During
> these investigations I have problems while running my recorded test cases.
>
> org.eclipse.core.runtime.CoreException
> Error while executing a macro command: MacroCommand [choice-select, line
> 34]
> java.lang.ArrayIndexOutOfBoundsException: 0
> at
> org.eclipse.tptp.test.auto.gui.internal.commands.ChoiceSelec tionCommand.playback(ChoiceSelectionCommand.java:143)
>
>
>
> My recorded macro is,
> <macro version="1.0">
> <shell descriptive="OpenClovis IDE - ProjectCreationTestSuite -
> Eclips..." referenceId="0" return-code="-1">
> <command descriptive="Project..." type="select" referenceId="4"/>
> <shell descriptive="New Project" referenceId="2" return-code="0">
> <command descriptive="New Project" type="item-select"
> referenceId="5">
> <item referenceId="13"/>
> </command>
> <command type="focus" referenceId="5"/>
> <command descriptive="Next &amp;gt;" type="select"
> referenceId="8"/>
> <command type="modify" referenceId="9">
> <![CDATA[Test]]>
> </command>
> <command type="modify" referenceId="22">
> <![CDATA[/home/my/pkg]]>
> </command>
> <command type="modify" referenceId="15">
> <![CDATA[/home/my/pkg]]>
> </command>
> <command type="modify" referenceId="15">
> <![CDATA[/usr/bin]]>
> </command>
> <command descriptive="Next &amp;gt;" type="select"
> referenceId="8"/>
> <command descriptive="Add" type="select" referenceId="16"/>
> <command descriptive="Add" type="select" referenceId="16"/>
> <command descriptive="Next &amp;gt;" type="select"
> referenceId="8"/>
> <command descriptive="Add" type="select" referenceId="17"/>
> <command descriptive="Add" type="select" referenceId="17"/>
> <command descriptive="Next &amp;gt;" type="select"
> referenceId="8"/>
> <command descriptive="Add" type="select" referenceId="18"/>
> <command descriptive="Add" type="select" referenceId="18"/>
> <command descriptive="Node0" type="item-select"
> referenceId="19">
> <item referenceId="20"/>
> </command>
> <command descriptive="Node1" type="choice-select"
> referenceId="21" choiceId="item#1"/>
> <command descriptive="Finish" type="select" referenceId="11"/>
> </shell>
> </shell>
> </macro>
>
> Thanks,
> Pushparaj
>
Re: ArrayIndexOutofBoundsException [message #121663 is a reply to message #121605] Fri, 01 February 2008 00:51 Go to previous messageGo to next message
Pushparaj is currently offline Pushparaj
Messages: 62
Registered: July 2009
Member
Hi,
I am using 4.3.0.
"Node1" is not a widget it is one of the item in CCombo. While recording
the script i select "Node1".

Thanks,
Pushparaj
Re: ArrayIndexOutofBoundsException [message #121823 is a reply to message #121663] Sat, 02 February 2008 04:04 Go to previous messageGo to next message
Jimmy Jin is currently offline Jimmy Jin
Messages: 32
Registered: July 2009
Member
Hi,

I think it is the CCombo which is not found. If you can send the plug-in
you are testing against, and the AGR testsuite file, maybe I can try it
for you to see what's the problem.

BTW, what's the version of Eclipse and TPTP you are using?

Regards,
Jimmy Jin

Pushparaj wrote:
> Hi,
> I am using 4.3.0.
> "Node1" is not a widget it is one of the item in CCombo. While
> recording the script i select "Node1".
>
> Thanks,
> Pushparaj
>
Re: ArrayIndexOutofBoundsException [message #122183 is a reply to message #121823] Tue, 05 February 2008 07:59 Go to previous message
Pushparaj is currently offline Pushparaj
Messages: 62
Registered: July 2009
Member
Hi Jimmy Jin,

I am using Eclips 3.2.1 and tptp 4.3.0

I think it is not able to find the items which are displayed in the
CCombo. Becuase i can able to playback the script if i didn't select the
item in. It is giving error only if i select the item in CCombo.

Note: Items which are displayed in the CCombo is captured in the previous
page.

Thanks,
Pushparaj.
Previous Topic:AGR stacktraces but testcase passes
Next Topic:listener methods are not getting called while playback the script
Goto Forum:
  


Current Time: Thu Apr 17 05:38:38 EDT 2014

Powered by FUDForum. Page generated in 0.01756 seconds