James Doyle | 7 May 2012 16:44

Java 7 and JTextComponentTester.actionClick error

Hi,

Last week I was running my Abbot test scripts in Java 7 using a build of 
the latest  trunk code from SVN 
(http://abbot.svn.sourceforge.net/viewvc/abbot/abbot/trunk/?pathrev=2828), 
and the fixes in SVN definitely make the scripts complete faster.

But I noticed a problem specific to Java 7.

In Java 6, text component clicks like this:

    <action args="IsoNumericTextField Instance 8,0" 
class="javax.swing.text.JTextComponent" method="actionClick" />

work fine.  In Java 7 (same trunk SVN build of Abbot, same test script, 
same test host environment), it results in an error:

Error: abbot.tester.ActionFailedException: Text click failed: requested 
string "0", but wasnt found in component
in step 'Click(IsoNumericTextField Instance 8,0)'
at 
/home/jdoyle/WorkingCopies/2012-Q3/sms/docs/testing/guiscripts/FRui-checkout-hourly-settlement-employee.xml:140
abbot.tester.ActionFailedException: Text click failed: requested string 
"0", but wasnt found in component
    at 
abbot.tester.JTextComponentTester.actionClick(JTextComponentTester.java:70)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
(Continue reading)

Gerard Davison | 8 May 2012 11:52
Picon
Favicon

Re: Java 7 and JTextComponentTester.actionClick error


James,

So the problem here is that the method matching is slightly different in JDK 7, probably because of
something simple like the method list is in a different order.

Abbot should deal with this though so could you raise a bug so that it will match on the version of the method
that takes a number first then the one that takes the string?

Thanks for taking the time to report this issue, hopefully I can have most of the issues dealt with soon..

Gerard

On 7 May 2012, at 15:44, James Doyle wrote:

> Hi,
> 
> Last week I was running my Abbot test scripts in Java 7 using a build of 
> the latest  trunk code from SVN 
> (http://abbot.svn.sourceforge.net/viewvc/abbot/abbot/trunk/?pathrev=2828), 
> and the fixes in SVN definitely make the scripts complete faster.
> 
> But I noticed a problem specific to Java 7.
> 
> In Java 6, text component clicks like this:
> 
>    <action args="IsoNumericTextField Instance 8,0" 
> class="javax.swing.text.JTextComponent" method="actionClick" />
> 
> work fine.  In Java 7 (same trunk SVN build of Abbot, same test script, 
(Continue reading)

James Doyle | 8 May 2012 15:54

Re: Java 7 and JTextComponentTester.actionClick error

Gerard,

Thanks!  I raised the new bug 
http://sourceforge.net/tracker/?func=detail&aid=3524725&group_id=50939&atid=461490

Thanks,
Jim

Gerard Davison wrote:
> James,
>
> So the problem here is that the method matching is slightly different in JDK 7, probably because of
something simple like the method list is in a different order.
>
> Abbot should deal with this though so could you raise a bug so that it will match on the version of the method
that takes a number first then the one that takes the string?
>
> Thanks for taking the time to report this issue, hopefully I can have most of the issues dealt with soon..
>
> Gerard
>
>
> On 7 May 2012, at 15:44, James Doyle wrote:
>
>   
>> Hi,
>>
>> Last week I was running my Abbot test scripts in Java 7 using a build of 
>> the latest  trunk code from SVN 
>> (http://abbot.svn.sourceforge.net/viewvc/abbot/abbot/trunk/?pathrev=2828), 
(Continue reading)

Gerard Davison | 9 May 2012 18:38
Picon
Favicon

Re: Java 7 and JTextComponentTester.actionClick error


I think I have a fix for this, can you verify in:

https://sourceforge.net/projects/abbot/files/abbot/1.3/

Thanks,

Gerard

On 8 May 2012, at 14:54, James Doyle wrote:

> Gerard,
> 
> Thanks!  I raised the new bug 
> http://sourceforge.net/tracker/?func=detail&aid=3524725&group_id=50939&atid=461490
> 
> Thanks,
> Jim
> 
> Gerard Davison wrote:
>> James,
>> 
>> So the problem here is that the method matching is slightly different in JDK 7, probably because of
something simple like the method list is in a different order.
>> 
>> Abbot should deal with this though so could you raise a bug so that it will match on the version of the method
that takes a number first then the one that takes the string?
>> 
>> Thanks for taking the time to report this issue, hopefully I can have most of the issues dealt with soon..
>> 
(Continue reading)

James Doyle | 10 May 2012 22:10

Re: Java 7 and JTextComponentTester.actionClick error

Thanks, I downloaded 1.3.0 RC 1 and it no longer has the 
JTextComponentTester.actionClick bug.

I used 1.3.0 RC 1 to run our application's 27 Abbot scripts in both JDK 
1.6.0_29 and JRE 1.7.0_04 and get the same results in both JRE versions now.

And the Copy/Paste functionality is going to be a huge help!

Thanks!
Jim

Gerard Davison wrote:
> I think I have a fix for this, can you verify in:
>
> https://sourceforge.net/projects/abbot/files/abbot/1.3/
>
> Thanks,
>
> Gerard
>
> On 8 May 2012, at 14:54, James Doyle wrote:
>
>   
>> Gerard,
>>
>> Thanks!  I raised the new bug 
>> http://sourceforge.net/tracker/?func=detail&aid=3524725&group_id=50939&atid=461490
>>
>> Thanks,
>> Jim
(Continue reading)

Gerard Davison | 11 May 2012 12:45
Picon
Favicon

Re: Java 7 and JTextComponentTester.actionClick error


On 10 May 2012, at 21:10, James Doyle wrote:

> Thanks, I downloaded 1.3.0 RC 1 and it no longer has the 
> JTextComponentTester.actionClick bug.

Jolly good, I have unit testing in place; but good to have it confirmed.

> 
> I used 1.3.0 RC 1 to run our application's 27 Abbot scripts in both JDK 

Jolly good, last count we run around 800 as I haven't had any regressions reported to me yet.

> 1.6.0_29 and JRE 1.7.0_04 and get the same results in both JRE versions now.

In order get ahead of myself I have my Hudson small holding running 1.6/1.7/1.8ea regression testing.
There doesn't appear to be much difference between then as far as abbot is concerned. There are still a
bunch of intermittent failures; but I am working on them slowly but surely.

Always welcome more help.... hint hint. :-)

> 
> And the Copy/Paste functionality is going to be a huge help!

Jolly good, It hope to improve it in the future so you can copy cross scripts and bring the component
references with them, but that was more than the couple of hours I had free.

Let me know if there is anything else in the editor I can fix.

Gerard
(Continue reading)


Gmane