Lynk HIROSUE | 1 Jun 2006 11:13
Picon
Favicon

Abbot & Costello, can't select my class to run a recording session...

Hi everybody...

 

Just to ask you :

 

how can I chose my own class and run it for make a recording script? I can run all classes in the abbot folder but not mine, and I don't understand why...

 

please help me...

 

thx a lot.

 

talk to you later.

 

HIROSUE Lynk..


MSN Hotmail : 5 bonnes raisons de l'utiliser en e-mail principal
<div>
<p>Hi everybody...</p>
<p>&nbsp;</p>
<p>Just to ask you :</p>
<p>&nbsp;</p>
<p>how can I chose my own class and run it for make a recording script? I can run all classes in the abbot folder but not mine, and I don't understand why...</p>
<p>&nbsp;</p>
<p>please help me... </p>
<p>&nbsp;</p>
<p>thx a lot.</p>
<p>&nbsp;</p>
<p>talk to you later.</p>
<p>&nbsp;</p>
<p>HIROSUE Lynk..</p>
<br>MSN Hotmail : <a href="http://www.imagine-msn.com/Hotmail/Post/GettingStarted/PrimaryAccount.aspx" target="_new"> 5 bonnes raisons de l'utiliser en e-mail principal</a>
</div>
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users
Lynk HIROSUE | 1 Jun 2006 11:16
Picon
Favicon

HELP -- Abbot & Costello, can't select my class to run a recording session...




.ExternalClass P {padding:0px;} .ExternalClass {font-size:10pt;font-family:Tahoma;}

Hi everybody...

 

Just to ask you :

 

how can I chose my own class and run it for make a recording script? I can run all classes in the abbot folder but not mine, and I don't understand why...

 

please help me...

 

thx a lot.

 

talk to you later.

 

HIROSUE Lynk..



MSN Hotmail : 5 bonnes raisons de l'utiliser en e-mail principal
<div>
<br><br><blockquote>
<br> .ExternalClass P {padding:0px;} .ExternalClass {font-size:10pt;font-family:Tahoma;} <p>Hi everybody...</p>
<p>&nbsp;</p>
<p>Just to ask you :</p>
<p>&nbsp;</p>
<p>how can I chose my own class and run it for make a recording script? I can run all classes in the abbot folder but not mine, and I don't understand why...</p>
<p>&nbsp;</p>
<p>please help me... </p>
<p>&nbsp;</p>
<p>thx a lot.</p>
<p>&nbsp;</p>
<p>talk to you later.</p>
<p>&nbsp;</p>
<p>HIROSUE Lynk..</p>
<br>
</blockquote>
<br>MSN Hotmail : <a href="http://www.imagine-msn.com/Hotmail/Post/GettingStarted/PrimaryAccount.aspx" target="_new"> 5 bonnes raisons de l'utiliser en e-mail principal</a>
</div>
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users
twall | 1 Jun 2006 15:45
Picon

Re: Abbot & Costello, can't select my class to run a recording session...

Could you please provide a little more detail about what you are trying to do
(it would be hard to provide less...)?

Do you want to control the recorder yourself?
Do you want to extend the recorder to handle custom components?
Are you having problems launching your application?

On Thu, 1 Jun 2006 at 05:15:10, Lynk HIROSUE wrote:
>  
> how can I chose my own class and run it for make a recording script? I can
> run all classes in the abbot folder but not mine, and I don't understand
> why...
>  
twall | 1 Jun 2006 19:01
Picon

Re: Abbot & Costello, can't select my class to run a recording session...

If you refer to the value against which you are asserting as "${text.contents}",
the script will replace that expression with the value of the text.contents
property, first looking in the script itself for a definition (usually set with
the "sample" step), and falling back to a system property.  Just change the
expected value of the Assert step to be the expression of the form ${property.name}.

You could run the script several times with different definitions of
text.contents, e.g.

java -cp ... -Dtext.contents=hello junit.extensions.abbot.ScriptFixture {filename}
java -cp ... -Dtext.contents=goodbye junit.extensions.abbot.ScriptFixture {filename}

Bon chance.

On Thu, 1 Jun 2006 at 10:04:38, Lynk HIROSUE wrote:
>  
> imagine I've just record a session. Now, I wanna change some values in my
> abbot classtest for make an other test (like JUnit) and have a report of
> failure and succes... Do you undertand what I mean?
>  
> In fact, to say that in an other way. I just want to record test, to change
> values and have a report of failure and succes about all tests.
>  
> for example: I record an entry in a textfield and I push a button to put this
> values in a label. This is my recorded script. Now, in my testclass, I want
> to improve the program and change the value entered in the textfield; instead
> of put "hello" I put "good bye" and I still want to see if the value wich
> will appear in the label will be hello. so I can change easily the entry and
> I can see, when I lauch the testclass that it's not good. So, it will make a
> report...
>  
twall | 3 Jun 2006 18:28
Picon

Re: mouseMove bug in Robot

You can use -Dabbot.robot.verify=false to disable the check.  A bug has been
filed with Apple, but to my knowledge it is not yet fixed.

The delay on startup, however, is no longer widely required, so it will likely
be removed from OSX on the next release.

On Sat, 3 Jun 2006 at 03:56:04, Emmanuel Puybaret wrote:

> Hi,
> 
> I'm working on Mac OS X with Abbot and just discovered the mouseMove bug in
> Robot that you try to detect in abbot.tester.RobotVerifier.
> 
> Do you have any news from Apple about this bug ?
> Meanwhile, couldn't you fire a mouseMoved event yourself when you detect
> this bug ?
> 
> Thank you for developping Abbot and for your answer.
> 
> Best regards
> -- 
> Emmanuel PUYBARET
> Email  : puybaret <at> eteks.com
> Web    : http://www.eteks.com
Timothy Wall | 6 Jun 2006 01:54
Picon

subversion

I've finally managed to get the CVS repo migrated to subversion.   
However, the repo organization is somewhat less than ideal, since  
abbot, abbot.swt, abbot.swt.eclipse et al. are all sharing the same  
trunk.

I'm going to reorg the AWT stuff, but I'll need some assistance  
moving the SWT stuff (branches, tags, etc) to their proper locations  
(each CVS module will have its own trunk/branches/tags, rather than a  
shared trunk/branches/tags for everything).

Any volunteers?  Currently SVN write access is disabled until the  
migration is completed, and has to be enabled on a per-developer basis.

Timothy Wall
http://abbot.sf.net
Timothy Wall | 6 Jun 2006 06:29
Picon

subversion conversion done

Please take a look and report any issues.  Developer write access has  
not yet been enabled.

Timothy Wall
http://abbot.sf.net
Timothy Wall | 9 Jun 2006 04:34
Picon

Re: Abbot & Costello, can't select my class to run a recording session...


On Jun 6, 2006, at 3:31 AM, Lynk HIROSUE wrote:

> Dear Timothy,
>
> Thank you for help me but... I'm a little bad in java... I'm  
> starting... and I want to now if you can help me once again... I  
> send you 2 txt file the first one is my appli the second one, my  
> test and at the end of the second one, I've put comments...
>
> Votre nouvelle utilisation de la messagerie : Windows Live  
> Messenger Beta
> <MonAppli.txt>
> <MonAppliTest.txt>

(asking if a script may be parameterized)

Basically, in the script, reference a asserted value as $ 
{prop.value}.  In the code surrounding the invocation of the script,  
do System.setProperty("prop.value", "value"), or Script.setProperty 
("prop.value", "value").  See ScriptFixture as an example of invoking  
a script from code.

Note: there are some places in scripts which probably *should*  
support property substitution but currently do not.  I believe there  
is a bug or RFE filed for substitution to happen in method call  
arguments.

Timothy Wall
http://abbot.sf.net
Timothy Wall | 9 Jun 2006 04:53
Picon

Re: Abbot


On Jun 8, 2006, at 2:59 AM, Hendrik Faenger wrote:

> Dear Mr. Wall,
>
> we are using Abbot for GUI Testing.
> Thank you for this great pice of software. We are trying to get a  
> lot of test on their way for
> our Software.
>
> Since our application has serveral custom GUI Elements, we need  
> serveral custom tester's and recorders.
> Also we like to have similar functionalty like your Image Capture  
> Function. (pressing a hotKey
> and performe some data capturing)
>
> The ScriptEditor class was modified to archive this.
> But to seperate our code from Abbot's one, some new functionality  
> would be nice, which allows to add more "hot key" functions.
>
> Browsing the code in original ScriptEditor.java brings:
>
> if (!handleEditorTransient(event)
>  && !handleRecordingControl(event)
>  && !handleImageCaptureControl(event)
>  && !handleComponentSelection(event)
>  && recorder != null && recording && !isFiltered) {
>  Log.debug("recorder process event");
> try {
>  recorder.record(event);
> }
>
> To add new functions here we have to write and insert our new  
> function here. This is a bad idea, because in the case of an update
> of the Abbott Framework all changes would be lost.

I never considered hot keys to be an area requiring extension, but  
then who ever does?

>
> A better approch would be the use of an "PlugIn" System.
>
> I've tried to put up a solution:
>
> 1. Define an Interface
>
> package abbot.editor;
> import java.awt.AWTEvent;
>
> public interface AbbotPlugIn {
> 	public boolean handleEvent(AWTEvent e);
> }	
>
>
> 2. Adding new functions to the ScriptEditor.java:
>
>     private static Vector<AbbotPlugIn> plugInVector = new  
> Vector<AbbotPlugIn>();
>
>     public void addPlugin(AbbotPlugIn p) {
>     	if (!plugInVector.contains(p)) plugInVector.add(p);
>     }
>
>     public void removePlugin(AbbotPlugIn p) {
>     	if (plugInVector.contains(p)) plugInVector.remove(p);
>     }
>
>     private boolean handlePlugins(AWTEvent e) {
>     	boolean ret=false;
>     	for (int i=0;i<plugInVector.size();i++) {
>     		ret&=plugInVector.get(i).handleEvent(e);
>     	}
>     	return ret;
>     }
>
>     private void scanAddPlugIns() {
>         String path=this.getClass().getResource 
> ("ScriptEditor.java").getPath();
>         path=path.substring(1,path.lastIndexOf("/"))+"/plugins/";
>         String[] dir;
>         File testd= new File(path);
>         if (testd.isDirectory()) {
>         	dir = testd.list();
>         	for (int i=0;i<dir.length;i++) {
>         		if (dir[i].startsWith("PlugIn") && dir[i].endsWith 
> (".class")) {
>         			dir[i] = dir[i].substring(0,dir[i].indexOf(".class"));
>         			System.out.println("Plugin found: "+dir[i]);
>         			try {
> 						Class aClass = ClassLoader.getSystemClassLoader().loadClass 
> ("abbot.editor.plugins."+dir[i]);
> 						Object plugin = aClass.getConstructor(this.getClass 
> ()).newInstance(this);
> 						if (plugin instanceof AbbotPlugIn) {
> 							this.addPlugin((AbbotPlugIn)plugin);
> 						}
> 					} catch (ClassNotFoundException e) {
> 						Log.debug("Plugin load failed.");
> 					} catch (SecurityException e) {
> 						Log.debug("Plugin load failed.");						
> 					} catch (NoSuchMethodException e) {
> 						Log.debug("Plugin load failed.");						
> 					} catch (IllegalArgumentException e) {
> 						Log.debug("Plugin load failed.");						
> 					} catch (InstantiationException e) {
> 						Log.debug("Plugin load failed.");						
> 					} catch (IllegalAccessException e) {
> 						Log.debug("Plugin load failed.");						
> 					} catch (InvocationTargetException e) {
> 						Log.debug("Plugin load failed.");						
> 					}
>         		}
>         	}
>         }
>     }
> 	
> 3. Modifiy the ScriptEditor.java:
>
> 	if (!handleEditorTransient(event)
> 	&& !handleRecordingControl(event)
> 	&& !handleImageCaptureControl(event)
> 	&& !handlePlugins(event)
> 	&& !handleComponentSelection(event)
> 	&& recorder != null && recording && !isFiltered) {
> 	Log.debug("recorder process event");
> 	try {
> 		recorder.record(event);
> 	}
>
> 	
> Plugins must start with Plugin and must be in the pakage  
> abbot.editor.plugins to be reconized.
> Also they had to implement the AbbotPlugIn Interface.
>
> This would make it possible to do a clear seperation between your's  
> und our code.
>
> Since there is enough time during the record phase, time is not  
> critical and therefore the introduction of
> the new PlugInHandler should't be a problem.
>
>
> It would be great if you could think about this suggestion and if  
> you like it, integrate it into the Abbot's Testing Framework.

That looks like the start of a good idea.  Let me contribute a bit.

If you're just thinking about handling "hotkeys", it might be better  
to establish an InputMap and an ActionMap for actions to be invoked  
during recording.  The real issue is how to dynamically define and  
load actions.  Since these things don't need to be changed while the  
editor is running (or do they?), a custom wrapper class could hotkey  
mappings prior to launching the editor.

The scheme you suggest, however, could be applied such that some of  
the existing "options" could be converted to plugins, which might  
make that bit of code a little cleaner (assuming there are no issues  
with order of checking).

It's far simpler to trigger from matching keystrokes than to parse  
generic AWTEvents; the "plugins" should be able to simply specify  
what event triggers them, then not have to worry about checking  
whether it's an appropriate event.

Another alternative might be to simply refactor the event handling  
such that there exists a method which can be overridden to add the  
functionality you wish.  This avoids the overhead and complexity of  
making a generic plugin system.

Timothy Wall
http://abbot.sf.net
lamail | 12 Jun 2006 11:33
Picon
Favicon

Separated testcases in a suite

Hi,

I'm experimenting with Abbot and gui testing with junit. I
use only the tester APIs, I don't use Costello or recorded
scripts.
I'd like to run my testcases in a suite completely isolated
from eachother. That is each testcase should run in a
separate classloader. 
I start my application in the fixtureSetup() method, the
testcases extends ComponentTestFixture. But according to the
logs produced by -verbose:class the singletons are only get
loaded once. How can the 100% separation be achieved?
The tested code doesn't use the system class loader, but
uses its own classloader replacing the context classloader.

thanks in advance,
  Kineas

Gmane