June 27, 2008

TestGen4Web update 1.0.0

I am excited to announce testgen4web 1.0.0
This is a great release with lots of new features.

Download here: http://developer.spikesource.com/frs/?group_id=14&release_id=107

Note: I have tested this on only firefox 3 - Please let me know if you need a firefox 2 version, and it can be tested there too!

Here are the list of features:

New features added:


  1. brand new shiny editor: All new editor with easy to use interface. Much more simplified from the previous versions of the editor. See screenshot!.

    tg4w-screenshot2.png

    New features include:


    • Nicer editing featues

    • Shows status of the current step when running the recording by adding a >> at the begining of the step in the editor

    • "Run Status" tab on the right pane of the editor shows the status of the player/recorder, status of the datasets and variables

      runstatus.png

    • "Debug" tab provides easy way to run javascript on the page, build a xpath and try it out before running the actual command

      debug.png



  2. execute-js action: execute random javascript during execution of the script. This would help developers work around some quirks of firefox and testgen4web. eg: http://developer.spikesource.com/forums/viewtopic.php?t=865

  3. assert-text with xpath: this action until now was pretty much ignored. Now the user has an option to select where to assert the text. There are 2 ways

    • * as xpath will search the entire page

    • specify an actual xpath will search in that area


  4. detachable bar: you don't have to be thethered to the main window anymore. detach the testgen4web toolbar and keep it on the side for editing long recordings easily. detach.gif

  5. Simple xpath support: Now you can record with simple xpath. This xpath generating script will be complete xpath (NOTE: that your recording might break if simple things on your webpagee changes. I would still recommend that you use the 'smart xpath' option.
    simple-xpath.png

December 20, 2007

TestGen4Web Tutorial Series - Using simple conditions

"Using Simple Conditions with TestGen4Web"
video.jpg

Prompted by a post on the forums, here comes the 2nd video tutorial demonstrating creating a "simple condition" with testen4web.

There was one other video tutorial before this. Find all the links here:
http://developer.spikesource.com/wiki/index.php/Projects:TestGen4WebDocs#Tutorials

New Video Tutorial Series - Using csv files to load data with TestGen4Web

First a little introduction for those who don't know what TestGen4Web is:

TestGen4Web is a 2 part tool.

1. A firefox extension where you can capture your navigation on the webpage and play it back.
2. A Unit Test generator to run tests on the command line without using firefox.


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

There was a comment on our forum about lack of documentation about features - I decided to take action - thanks for rholder.

I have introduced a video tutorial series - which I will hopefully keep up and add more videos in the future.

http://developer.spikesource.com/wiki/index.php/Projects:TestGen4WebDocs#Tutorials

And finally ... the first tutorial ... drum roll ... introducing ....

"Using CSV Files with TestGen4Web"
http://developer.spikesource.com/docman/view.php/14/850/tg4w-dataset.htm

November 5, 2007

[citation] Linus Torvalds on Open Source: 'A Much Better Way to Do Things'

"Linux really wouldn't have gone anywhere interesting at all if it hadn't been released as an open source product. I also think that the change to the GPLv2 from my original 'no money' license was important, because the commercial interests were actually very important from the beginning. The commercial distributions were what drove a lot of the nice installers and pushed people to improve usability," said Linux creator Linus

Complete story here:
http://www.technewsworld.com/story/60052.html


While this blog talks about the creator of Linux, I have heard many different ways people pronounce 'linux'. Here is how Linus Torvalds - the creator pronounces it himself.

http://www.paul.sladen.org/pronunciation/

September 24, 2007

[link] delete old mail in thunderbird

There are some folders on your mail which keep accumulating junk, and the only messages that matter are the latest ones.
You can set "Message Retention Policy" in thunderbird for each folder.

http://kb.mozillazine.org/Message_aging

Steps:
1. Right click on the desired folder - click on "Properties"
2. Click on "Retention Policy" tab
3. Set your desired preferences


Sample screenshot:
tb_retention_policy.png

September 14, 2007

[link] Autolinkification in bugzilla

Type "Bug 1234" in bugzilla comment text and when viewing bug details, it is automagically linked to the bug. If the bug is closed, there is a strike through!

It is not limited to just "Bug #". The feature extends to attachments, comments, urls etc. More details in the link to bugzilla documentation.

http://www.bugzilla.org/docs/tip/html/hintsandtips.html

A very handy feature some bugzilla users may not know about!

September 13, 2007

tomcat jdbc connection pool configuration

Over time, I have tried many combinations to keep jdbc connections from tomcat's connection pool fresh. I frequently got stale connections until after many tweaks, I found the winning combination.

    <Resource name="jdbc/myresource" scope="Shareable"
        type="javax.sql.DataSource"
        url="jdbc:mysql://localhost:3306/db"
        driverClassName="com.mysql.jdbc.Driver"
        username="myuser"
        password="xxxxx"
        maxIdle="3"
        maxActive="10"
        removeAbandoned="true"
        removeAbandonedTimeout="60"
        testOnBorrow="true"
        validationQuery="select count(*) from sometablename"
        logAbandoned="true"
      />

August 30, 2007

revelation: embedded images in html

Did not know I could ship the entire image embedded in html - encoded in base 64.
View source on this page and see how Powerd by apache image is shown!

eg:
< img src="data:image/gif;base64,
BINARY DATA HERE" />



Ref: http://www.unixreview.com/documents/s=8217/ur0305h/

August 17, 2007

Javascript array sort with custom comparators

Did you know that you can write custom comparator to sort an array in javascript?

By default, it is a string sort
var arr1 = [10,1,5,4,3,2];
arr1.sort(); // 1,10,2,3,5
Say we want a numeric sort, we could write a custom comparator
function numAscending(a, b) 
{ 
    return a - b; 
}
var arr1 = [10,1,5,4,3,2];
arr1.sort(numAscending); // 1, 2, 3, 4, 5 10

August 10, 2007

custom keywords in firefox

How do you get work done faster? By typing less -

My requirement was to jump to a specific url in bugzilla given a bug number, and it would be nice - if you can just type "bug 1122" in the address bar and it jumps to the url http://bugzilla.domain.com/show_bug.cgi?id=1122

I realized today, that, it is a feature in firefox which I had not noticed until now. It is called "Keyword Searches"

The feature enables you to define a "keyword" for a bookmark which has a "%s" in it for substitution.

Now, my bookmark will look like http://bugzilla.domain.com/show_bug.cgi?id=%s, and the bookmark itself has the keyword "bug"

More information at the mozilla knowledge base