Saturday, June 30, 2007

Tinderbox ....

You never know when things will work and but if you believe that they will work ,they will. Ha, finally my own quote :P .

The Solaris download which i asked my friend to do failed :-( . Crap . I waited for that for more than 2 days and finally it failed. Now i can't to afford to wait more. I have to proceed with Tinderbox, that too with real pace. With Emily's trip to GUADEC and college reopening soon, i really have to do some magic.

Emily wanted me to update from Solaris Nevada snv_55 to Solaris Nevada snv_64. Even i wanted to see what's new in next version but looks like fate was against me.

As such i had to reinstall my Solaris Nevada snv_55 because while installing i made a stupid mistake of selecting the default options. If you are ever planning to install Solaris, never ever do that. Do choose the custom install . After some two steps it will ask you which hard disk to choose and after that you can edit the partition size. If you fail to do this, Solaris by default allocates only required space to / and rest all to /export/home. For me it ended up having only 400MB free space in / while my /export/home had around 15GB free space :-(. I never wanted to try gparted and other things. A reinstall will fix all the problems and it did.

So finally my partition size fixed and i am ready to start Tinderbox, when the postman gave a parcel for me. It was Solaris Nevada snv_64 from SUN, which i had registered few days back. I didn't know whether to cry or laugh. Felt like banging my head on the monitor. Murphy is GOD . :-)

So made another install of Solaris Nevada snv_64 and finally was ready to start with Tinderbox. Now i had Solaris Nevada snv_64 and all the softwares required. A new and nice thing about this version is a Shutdown button in the start menu. I really missed that in the previous version.

Another small thing about networking in Solaris. If you want your Solaris box to work with dns entries provided, then you should edit the /etc/nsswitch.conf as follows .

A line in /etc/nsswitch.conf will be as follows
hosts: files
Change that line to
hosts: files dns
This will make sure that first /etc/hosts and then dns entires are looked during networking.

The mail from Emily had the following details with this attachment.

1. Install the latest Solaris Express(s11)
2. Install SunOne Studio compiler
3. Install JDS CBE

1. Set up environment var. (See attached)
2. Check out tinderbox client from community
$ . /path/to/
$ cvs co -d tinderbox mozilla/tools/tinderbox
3. Some modification to be done in the tinderbox source code
$ cd tinderbox; mv
2) (modify the one attached and use it)
$BuildAdministrator = "%YOUR_ALIAS"
$CVS = 'runsocks cvs -q': (only necessary if you use proxy to access Internet)
3) mozconfig (use the one attached)

4, this step is necessary only if you access Internet via proxy
1) the patch file
2) set http_proxy and ftp_proxy in $HOME/.wgetrc since tinderbox client uses wget to send test result to server

5, let's go -- start up your tinderbox client
$ . /path/to/
$ cd /path/to/tinderbox && ./ --depend -t MozillaTest > ~/build-firefox.log 2>&1 &

So things were really were clear in her mail.
As of now, i was in pre-steps with just Solaris 11 and neither a Solaris studio nor a CBE . So i started with Solaris studio.

The nice thing about Solaris is that the installing a new software is a matter of few clicks. Almost all the installers in Solaris works right out of the box. So with a few seconds i had Solaris studio installed . I had to change my PATH variables like

export PATH=/opt/SUNWspro/bin:$PATH
export MANPATH=/opt/SUNWspro/man:$MANPATH

So after this, you will have to run sunstudio, but i got the following error saying "java 2 SDK not found"
Omg, so now i had to install j2sdk. Downloaded the file "" and when i ran that shell script, it created a folder in the current directory with quite a few files.

No i had no clue what to do that. Finally pinging a few of my friends, came to know that i had to set JAVA_HOME and change PATH variable again. I copied the folder that shell script created (j2sdk1.4.2_15) to /opt and had to modify the environment variables as shown below.

export JAVA_HOME=/opt/j2sdk1.4.2_15
export PATH=/opt/j2sdk1.4.2_15/bin:$PATH

Now if you run sunstudio, things work fine :-) . So now 2/3 pre-steps done. The only step remaining is Common Build Environment (CBE).
Now this again wasn't that difficult. The only catch is to give the proper C compiler. As such, i was supposed to use the Solaris compiler that comes along with Sun studio and not gcc. So first time i made a mistake of giving the path to gcc but next time did that fine.

Phew, all pre-steps done. Now to setup tinderbox. All the steps mentioned there worked right out of box. In step 2, it needed the environment variable $CVSROOT. As such $CVS_ROOT was configured in Emily's script. So just changed that to $CVSROOT and things worked fine :-)

Now finally i ran tinderbox and i am not quite sure about the ouput it produced . It surely generates a lot of output . I had no clue what the output meant and what i am supposed to do with that.
The output i got was like

Name "TreeSpecific::clobber_target" used only once: possible typo at ./ line 33.
Name "TreeSpecific::build_target" used only once: possible typo at ./ line 31.
Name "TreeSpecific::checkout_clobber_target" used only once: possible typo at ./ line 13.
Name "TreeSpecific::extrafiles" used only once: possible typo at ./ line 34.
Possible unintended interpolation of @gmail in string at (eval 318) line 23.
Starting dir is : /root/tinderbox/SunOS_5.11_Depend

tinderbox: tree: MozillaTest
tinderbox: builddate: 1183129260
tinderbox: status: building
tinderbox: build: SunOS/i386 5.11 home Depend trunk
tinderbox: errorparser: unix
tinderbox: buildfamily: unix
tinderbox: version: $Revision: 1.1 $
tinderbox: END

Opening SunOS_5.11_Depend.log
current dir is -- home:/root/tinderbox/SunOS_5.11_Depend
Build Administrator is
uname -a = SunOS home 5.11 snv_64a i86pc i386 i86pc
DTSCREENSAVERLIST=StartDtscreenSwarm StartDtscreenQix StartDtscreenFlame StartDtscreenHop StartDtscreenImage StartDtscreenLife StartDtscreenRotor StartDtscreenPyro StartDtscreenWorm StartDtscreenBlank
MOZ_CO_DATE=06/29/2007 15:01 +0000
# Make flags
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_CO_MODULE="mozilla/tools/codesighs"

# Configure flags
ac_add_options --enable-application=browser
ac_add_options --enable-optimize
ac_add_options --enable-codesighs
ac_add_options --enable-crypto
ac_add_options --enable-xft
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --disable-freetype2
ac_add_options --disable-debug
ac_add_options --disable-tests
-->end mozconfig<----------------------------------------
Didn't find /root/tinderbox/
Compiler is -- CC
Begin: Fri Jun 29 20:32:28 2007
cvs -q checkout -P -D "06/29/2007 15:01 +0000" mozilla/ mozilla/browser/config
End: Fri Jun 29 20:32:31 2007
/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin/firefox-bin does not exist.
No binary detected; none deleted.
Begin: Fri Jun 29 20:32:31 2007
make -f checkout
make: Fatal error in reader:, line 126: Unexpected end of line seen
End: Fri Jun 29 20:32:32 2007
Error: CVS checkout failed.

The last line is scary :-(. Have to ask about that to emily or nags soon. And oh yeah, now that i have setup a Tinderbox in Solaris, i want to setup one in Linux. Just want to see whether it is so easy in Linux. ;).

Have to figure out something about the Tinderbox log.
Bye for now.

Thursday, June 21, 2007

Hello World to Tinderbox...

sp2hari (Harishankaran)

Installed solaris neveda_55 finally. Configured network after struggling a little bit. Had to install new softwares. Taggy gave me the this link. And this one was also very useful. So within a matter of 5 mins, i installed most of the softwares i might need.

As such i had three main things to do in Solaris according to the mail Emily Chen sent me. They are

1. Read about tinderbox setup from .

2. Sun Studio 11
On Solaris, Sun Studio is used to build Firefox, not gcc, so have to install Sun Studio.

3. Set up CBE (Common Build Environment)

Still network configuration has few glitches. I have to enter the DNS entries every time i reboot the system. And even though i have configured it to activate on boot, the Ethernet card has to manually activated after every time. This is strange since, i have a file called hostname.rtls0 in / (which should activate the Ethernet card on boot )

Anyways now it is time to say Hello World to Tinderbox :P.

Monday, June 18, 2007

Finally 10 ...

--sp2hari (Harishankaran)

Ok, i am certainly not talking anything about my GPA. After fighting (fighting is an understatement i suppose) with Firefox and LDTP for 3 hours (well this is actually few days), finally managed to get 10 test cases work properly.

At least these 10 test cases will work properly for integration with Tinderbox. Have to send these test cases to emily soon and get them integrated with tinderbox.

The output log is
<group name="group1">
<script name="">
<test name="address field and go button">
<script name="">
<test name="Back and Forward buttons">
<script name="">
<test name="verify home button">
<script name="">
<test name="Open a new tab ">
<script name="">
<test name="topsite - yahoo">
<script name="">
<test name="topsite - msn test">
<script name="">
<test name="topsite - amazon">
<script name="">
<test name="navigate ftp">
<script name="">
<test name="Open search by keyboard shortcuts">
<script name="">
<test name="Find in Page">
<timeinfo start="03:23:00 AM on 18-Jun-2007" elapsed="0:1:8"></timeinfo>
<groupsstatus total="10" pass="10" fail="0"></groupsstatus>

Well looks like i have underestimated how bugs can trouble a poor coder like me :P.

Each test case has its unique problem :P.
The major problem is the Firefox crash :(. Though the test case work individually, Firefox crashes if all the test cases were run under a single runner xml :-(. I have downloaded Firefox firefox-3.0a6pre now ( was using firefox-3.0a5pre all these days). Hopefully Firefox 6 is stable against the test cases :-).

Anyway the 10 is not the final list. I am supposed to test 30 test cases properly for the Functionality subgroup of smoketests testgroup for Firefox 3.0. Not to mention about the lots and lots of test cases from other test groups.

Let me post the issues i am facing with the other test cases, so that it is easier for me to fix them later.

Before that, the 10 test cases which worked in my favour are :)

3954: Address Field and Go button
4032: Back and Forward buttons
4031: Home button
4086: Open a new tab
3955: Top Site - Yahoo
3956: Top Site - MSN
3957: Top Site - Amazon
3959: Navigate FTP
4245: Open search by keyboard shortcuts
3967: Find in Page

The test cases having issues are
1. 4137: Add an RSS feed/Livemark
This is the strangest test case i have ever found :(. This doesn't work for the first time. Next time without any modification, if i run the test case it works like properly. Third time it is not working and fourth time it again works properly . Well, that is more than enough for me, i either end up banging the computer monitor or beating myself that there is no 5 th time :-(. Should check this test case properly.

Looks like this is the only test case which troubles me as of now. Have the rest of the code ready but looks like new problems are starting soon. For the same runner xml, same files , same Firefox, test case 2 shows come error. Have to check that soon. Got firefox-3.0a6pre few mins back. Have to run the test cases with that.

And yes, tried something with the list not getting selected problem. Even nags confirmed this problem some time back and finally able to find out the exact line where the error occurs .

if (AccessibleSelection_selectChild (selection, text_index)) { }
That is line 110 from list.c. The if statement is returning false ending up in "LDTP_ERROR_UNABLE_TO_SELECT_CHILD" . Hoping to fix this soon. Will be really happy if i fix this one as i will be able to add something to the ldtp source code. Been a long time since my name appeared in the Changelog ;-) ;-)

Only thing i am happy about is both Ubuntu Linux and Solaris responds similarly for the test cases. So no separate Firefox issues and Solaris issues as of now. Let us see how this proceeds.

Another small issue.
Whenever i get any error in any of the test cases, i get the following error
<script name="">
<test name="topsite - amazon">
<ERROR>Traceback (most recent call last):
File "/usr/local/bin/ldtprunner", line 407, in executescript
execfile (scriptname, scriptglobal)
File "", line 52, in <module>
log (msg, 'error')
File "/usr/local/lib/python2.5/site-packages/", line 2500, in log
logger.error (message)
File "logging/", line 1015, in error
File "logging/", line 1100, in _log
File "/usr/local/lib/python2.5/site-packages/", line 2421, in makeRecord
return LdtpLogRecord (name, level, fn, lno, msg, args, exc_info)
File "/usr/local/lib/python2.5/site-packages/", line 2394, in __init__
msg = '<' + logging.getLevelName (level) +'>' + saxutils.escape (msg) + '</' + logging.getLevelName (level) + '>'
File "/usr/lib/python2.5/site-packages/_xmlplus/sax/", line 31, in escape
data = data.replace("&", "&amp;")
AttributeError: 'LdtpExecutionError' object has no attribute 'replace'

I am giving the error message properly in the try block, but not in the except block. If i give the error in the except block then i get the error message in the log file properly. But i am supposed to pass the error message from the try block to the except block. Should learn a bit of python exceptions to know more about this.

Anyway the files for the test cases which are working can be obtained from here.

Note :: Have added many more test cases to the above file now, but didn't like to change the title.

Monday, June 11, 2007

Mozilla's visit to Sun China Engineer and Research Institute

By Emily Chen

On May 30th, we were happy to invite Mozilla people Mike, Li Gong and Johnny to visit Sun Beijing office. Alfred Peng organized this meeting, he also write a very detail blog about this meeting.

I am happy to had a chance to talk about the QE work we did in this meeting. The slides of Sun Browser team is posted here.I mainly talked about our QE work from three points:

1. Work on Litmus

In the past, Sun Mozilla testing work are relatively independent with Mozilla community. We have our own test tool -- Aptest, we have our own bug system -- Bugster. During last year, we made some changes to our testing process. Generally speaking, we work more closely with Mozilla community. We switch from Aptest to Litmus, from Bugster to Bugzilla. Now we got the administrator account of Litmus, we also contribute test cases in Litmus, especially on the accessibility test cases. Litmus is a really good open source test tool, we also use Litmus to do Testday.

2. Organize the Testday/Bugday in China

We promote Testday in China. The time for Testday organized by Mozilla community are not suitable for Chinese people, so we organized a special Testday in China. In order to promote Testday, we gave presentation in China university. This attract interests of some students, so we invited some of the students come to Sun ERI office and launch a Testday in ERI office. Mozilla QA are also gave a great support to our China Testday. Till now, we launched two Testday in China: Firefox 2.0 FFT and Firefox RC on Solaris Neveda.

For the Bugday, most of our team will attend the Mozilla Bugday session, Sun Mozilla developer also join Bugday. Every week, we will spend at least 2 hours to attend Bugday, triaging bugs and either confirming or closing them, moving them into the right component. Thanks for Tomcat, Tracy walker's help, they add a Solaris bug list as the second topic in Bugday. The number of Solaris bugs decreased every week. We also help review bugs on other platform. Here I take the opportunity to appreciate the help from Mozilla QA team, especially, Tim Riley, Tomcat, Tracy, Jay, Chris Cooper, Marcia Knous etc. Thanks for their help and support.

3. Automation Test Development

About automation testing tool, we mainly use Linux Desktop Testing Project (LDTP), Dogtail and Orca test tools. This year, Nagappan and I proposed a project in Google summer of code under Mozilla organization, developing automation test for Firefox using LDTP and integrated automation test cases into Firefox Tinderbox on Solaris. This project start from May, will complete in August. Then we will using the automation test case into Tinderbox.

After the launch, Li Gong invite us to visit Mozilla China office.It is about 300 m2. Mozilla China plan to hire 10 people and most of them will do marketing work, especially working on the relationship with government and bank. There will be no cubicle for each employee, instead, there will be sofa and chairs, everyone are supposed to use laptop in this office. Sounds like a coffee bar! Li Gong also invite us to Mozilla China office whenever we want good coffee or chat with him.

Meeting with Mozilla people was a big success, we have lots of actions to do after the meeting.It is a great experience to talk with Mozilla people and understand Mozilla's culture. Mozilla community is a great community full of enthusiastic and smart people, I am happy to work and learn from them.

Running a test case ...

Having written the test scripts for Firefox, this time going to tell how to test Firefox with these scripts. The test scripts can be found here

There is a wiki page in LDTP website which gives quick tips about how to run LDTP test cases.

First quick steps to get LDTP installed . If you have LDTP already installed, then you can skip this.

Get the source/binary from the downloads section of LDTP web page. Any other dependencies which LDTP might need while installation is libxml2 and libat-spi. (I generally install the debug and dev packages of the above two). After this installation of LDTP shouldn't have any issues :-)

Runner XML
Runner XML files makes testing many test cases one after another in a batch mode easy. A sample runner XML can be found here. A very simple runner XML needed to run a single test case will be like


The tags are self explanatory.
You can have any number of script blocks and thereby test any number of test cases one after another. The data tag is not necessary but it is better to have a separate data file.

Well, that's all you have to do. Start Firefox and then

hari@home:~$ ldtprunner run.xml

The above command starts testing the application with the test case provided in the run.xml .

Note :: It is also possible to test simply by giving

hari@home:~$ python

But i prefer doing it using runner XML, as that has more features.

There is a complete tutorial for LDTP here. This explains everything needed to write a test script clearly and is worth reading :)

Saturday, June 9, 2007

SOC report ...

My SoC is going fine and great. Hoping to finish this well ahead of time:) This is a blog + report :)

So i have started with Automation of Firefox.
For the current status of all the test cases i have mentioned here, check this link

The categories under which i have written test cases till now are
1. Firefox 3.0 :: SmokeTests :: Functionality
Most of the test cases in this category are done. certain test cases which are yet to be done are marked as TODO in the status page.

2. Firefox 2.0 :: Basic Functional Tests :: Help
This is a really small category, with just two cases. Both of them working fine, but have to check the closewindow() function which didn't close the help window.

3. Firefox 2.0 :: Basic Functional Tests :: Options (Preferences)
Have done almost all the test cases. There is again a small issue in this. The objects shown in the preferences window are list-items whose parent is a list. We tried to copy the code for combobox for list but it didn't work. Have to add functions specific for list in list.c

4. Firefox 2.0 :: Basic Functional Tests :: Printing
This had bug in the print preview option. The CPU just hangs and processor takes 100% load . This bug is already reported in .

5. Firefox 2.0 :: Basic Functional Tests :: Location bar
Works perfectly. Had to use LTFX functions activatewin and typekey .

6. Firefox 2.0 :: Basic Functional Tests :: Popup and Annoyance Blocking
Most of the test cases have been automated. Testing Java and Javascript is a small issue in this.

Some of the important categories which i have started tesing and is in near completion are
2. MenuBar
3. RSS
4. Downloading
5. Addons Manager

Finally, the code for the above tests can be found here.
Finally one small and interesting thing ;-). The icon which shows that the loading of a page ( the circular thing which rotates while a page is loading) is a push button :-) . Was really surprised when i noticed it :P. No clue why is it that way ;)