TestGen4Ruby: One Point Oh

From regular versioning culture, one would think that TestGen4Ruby has just graduated and is now an all-mature big boy. False. Just as a clarification, I’m using the versioning scheme suggested by Rubygem’s manual, which can be summed up as: left number => breaks compatibility; middle number => adds new feature without breaking previous stuff; right number => bugfix, cleanup or some other minor change that doesn’t affect the API.

More explanation and arguments in favor of this strategy can be found at the manual itself.

This new version basically fixes a little problem with the input from TestGen4Web. It’s a dirty little fix that doesn’t cover all cases, because that is impossible from inside tg4rb. To fix this for good, a good many changes must be made to tg4w itself. I’m currently working on this.

Just so the “One Point Oh” spirit doesn’t get totally blown away by the clever versioning policy, there is a graduation of sorts going on for TestGen4Web today: this is the last change that is part of my work during the Google Summer of Code (I didn’t have time to commit this before the “pencils down” deadline so I’m releasing now, but it was coded inside that time window). So from now on I’ll just keep fiddling with it on my own. It is a good feeling knowing that now I have a little (my first!) baby free software project on my hands :-)

Well, to the official release notes already:

Subject: [ANN] tg4rb 1.0.0 Released

tg4rb version 1.0.0 has been released!

* <by Helder Ribeiro>
* <(http://tg4rb.googlecode.com)>

## FEATURES:

* takes an XML with actions from tg4w and outputs stand-alone Ruby code that can be run directly or embedded into existing code (e.g. for test automation).
* can be used as a library or as an executable script.
* takes the xpath from tg4w and uses only enough info to guarantee the uniqueness of the referenced element, allowing the generated script to keep working even with some change to page structure.

## PROBLEMS:

* the generated code is damn ugly.
* a few action types from the XML input still aren’t recognized.
* some dependencies aren’t very clearly sorted out yet. you might find you need something that is not specified. if yes, please report this as an issue in our issue tracker.
* i don’t know, find more and let me know =)

## SYNOPSIS:

Changes:

## 1.0.0 / 2007-08-21
* NOTE: This version breaks compatibility with previous version! Scripts written in previous versions won’t work.
* fixed small bug with escaping single quotes
* API change: changed the visibility of element_by_least_restrictive_xpath in Tg4rbToolbox to private
* API change: created public method element() in Tg4rbToolbox
* provided workaround for bug in xpath from tg4w: now clicks on links work with the link’s text (requires HPricot)

## 0.0.2 / 2007-07-09
* fixed silly import problem on generated script

* <by Helder Ribeiro>
* <(http://tg4rb.googlecode.com)>

Tunando o Gmail

Ok, pode ser que todo mundo já saiba, mas descobri isso agora: greasemonkey + gmail rulez!! =)

“mark as read” com uma tecla, “mark as read and archive” tb, atalho para navegar para labels como no GReader, usar “https” por default, e várias outras coisas show (e outras nem tanto) vem empacotados nessa extensão:

https://addons.mozilla.org/en-US/firefox/addon/4866

A descrição dos atalhos de teclado está em http://blog.persistent.info/2005/12/greasemonkey-christmas.html
Dá pra evitar o pacotão e pegar só o dos atalhos nesse site, pra quem quiser. Aí precisa instalar o GreaseMonkey:

https://addons.mozilla.org/en-US/firefox/addon/748

O de ir pra labels foi o killer feature, nossa, mto bom isso :)

Update: pressionar ‘h’ mostra as opções de teclas. Outra espetacular: X+u seleciona todas as não-lidas (e depois “r” marca como lidas).

Posted in Uncategorized. Tags: , , , , , , . 3 Comments »

TestGen4Web from SVN (or howto start contributing to it)

Yes, this is “from svn”, but first we need to install the current release and then replace it by the code from svn (there must be a better way of doing this, but this works). Go to

http://developer.spikesource.com/frs/?group_id=14&release_id=71

download and install the latest version (0.41.1-beta). This will create a directory {3c20433a-61bc-42fe-831d-415860e17283} under ~/.mozilla/firefox/vllrmpro.default/extensions (or wherever else your firefox extensions are kept).

Now we have to replace this directory by the TestGen4Web code from SVN. First, though, you’ll need an account at SpikeSource (yes, just to check the thing out; go figure).

Done that, choose a directory where you want to keep that code and check it out from SVN (mine is ~work/):

cd ~/work
svn co http://scm.spikesource.com/testgen4web

This will create a “testgen4web” directory in the chosen directory. Now we replace the old directory by a link to our checked out code:

cd ~/.mozilla/firefox/vllrmpro.default/extensions
rm \{3c20433a-61bc-42fe-831d-415860e17283\} -f
ln -s ~/work/testgen4web/extension \{3c20433a-61bc-42fe-831d-415860e17283\}

[If you're on Windows, emptying out the original directory and copying the contents of testgen4web/extension/ into it should work]

Well, that’s it, basically. Now you go around coding and changing things and, after you’re done, save your files and restart Firefox. It comes up again with your new code loaded automatically. Pretty cool, huh?

You can find more resources about TestGen4Web at:

http://developer.spikesource.com/wiki/index.php/Projects:TestGen4Web

Please drop a comment if you run into any problems while trying to do the above.

Happy Hacking ;-)

Posted in Uncategorized. Tags: , , , , , , , . Leave a Comment »
Follow

Get every new post delivered to your Inbox.