Friday, July 20, 2007
Saturday, June 30, 2007
Tinderbox ....

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 myenv.sh attached)
2. Check out tinderbox client from community
$ . /path/to/myenv.sh
$ cvs co -d tinderbox mozilla/tools/tinderbox
3. Some modification to be done in the tinderbox source code
1) post-mozilla.pl
$ cd tinderbox; mv post-mozilla.pl post-mozilla.pl.bak
2) tinder-confg.pl (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) build-seamonkey-util.pl(see the patch file build-seamonkey-util.pl.diff)
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/myenv.sh
$ cd /path/to/tinderbox && ./build-firefox.pl --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.
export PATH=/opt/SUNWspro/bin:$PATH
export MANPATH=/opt/SUNWspro/man:$MANPATH
Omg, so now i had to install j2sdk. Downloaded the file "j2sdk-1_4_2_15-solaris-i586.sh" and when i ran that shell script, it created a folder in the current directory with quite a few files.
export JAVA_HOME=/opt/j2sdk1.4.2_15
export PATH=/opt/j2sdk1.4.2_15/bin:$PATH
Name "TreeSpecific::clobber_target" used only once: possible typo at ./build-firefox.pl line 33.
Name "TreeSpecific::build_target" used only once: possible typo at ./build-firefox.pl line 31.
Name "TreeSpecific::checkout_clobber_target" used only once: possible typo at ./build-firefox.pl line 13.
Name "TreeSpecific::extrafiles" used only once: possible typo at ./build-firefox.pl 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 sp2hari.com
uname -a = SunOS home 5.11 snv_64a i86pc i386 i86pc
AB_CARDCATALOG=/usr/dt/share/answerbooks/C/ab_cardcatalog
ADDON_PATH=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin:
COLORTERM=gnome-terminal
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
CVS_ROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-zAaS6sa66Z,guid=9c8119a191db027be12633004684e7cc
DESKTOP_STARTUP_ID=
DISPLAY=:0.0
DTAPPSEARCHPATH=/root/.dt/appmanager:/usr/dt/appconfig/appmanager/%L:/usr/dt/appconfig/appmanager/C
DTDATABASESEARCHPATH=/root/.dt/types,/usr/dt/appconfig/types/%L,/usr/dt/appconfig/types/C
DTDEVROOT=
DTHELPSEARCHPATH=/root/.dt/help/root-home-0/%H:/root/.dt/help/root-home-0/%H.sdl:/root/.dt/help/root-home-0/%H.hv:/root/.dt/help/%H:/root/.dt/help/%H.sdl:/root/.dt/help/%H.hv:/usr/dt/appconfig/help/%L/%H:/usr/dt/appconfig/help/%L/%H.sdl:/usr/dt/appconfig/help/%L/%H.hv:/usr/dt/appconfig/help/C/%H:/usr/dt/appconfig/help/C/%H.sdl:/usr/dt/appconfig/help/C/%H.hv
DTSCREENSAVERLIST=StartDtscreenSwarm StartDtscreenQix StartDtscreenFlame StartDtscreenHop StartDtscreenImage StartDtscreenLife StartDtscreenRotor StartDtscreenPyro StartDtscreenWorm StartDtscreenBlank
DTSOURCEPROFILE=true
DTUSERSESSION=root-home-0
DTXSERVERLOCATION=local
EDITOR=/usr/dt/bin/dtpad
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/var/tmp/keyring-a1aGab/socket
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=yes
G_FILENAME_ENCODING=@locale,UTF-8
HELPPATH=/usr/openwin/lib/locale:/usr/openwin/lib/help
HOME=/root
JAVA_HOME=/opt/j2sdk1.4.2_15
LANG=C
LC_ALL=C
LC_CTYPE=C
LD_LIBRARY_PATH=/root/tinderbox/SunOS_5.11_Depend/mozilla/dist/bin:
LIBPATH=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin:
LIBRARY_PATH=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin:/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin/components:
LOGNAME=root
MAIL=/var/mail/root
MANPATH=/opt/SUNWspro/man:/usr/dt/man:/usr/man:/usr/openwin/share/man
MOZCONFIG=/root/tinderbox/mozconfig
MOZILLA_FIVE_HOME=/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin
MOZ_BYPASS_PROFILE_AT_STARTUP=1
MOZ_CO_DATE=06/29/2007 15:01 +0000
MOZ_PACKAGE_MSI=0
MOZ_SYMBOLS_TRANSFER_TYPE=scp
NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat:/usr/dt/lib/nls/msg/C/%N.cat
NO_EM_RESTART=1
OLDPWD=/root
OPENWINHOME=/usr/openwin
PATH=/opt/csw/bin:/opt/SUNWspro/bin:/opt/SUNWspro/bin:/opt/j2sdk1.4.2_15/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:/root/tinderbox/SunOS_5.11_Depend/mozilla//dist/bin
PWD=/root/tinderbox
SDT_NO_DTDBCACHE=1
SDT_NO_TOOLTALK=1
SESSIONTYPE=altDt
SESSION_MANAGER=local/home:/tmp/.ICE-unix/316,inet6/home:35165,inet/home:60138
SESSION_SVR=home
SHELL=/bin/bash
SHLVL=2
SSH_AGENT_PID=321
SSH_AUTH_SOCK=/tmp/ssh-XXXAaGNa/agent.316
START_SPECKEYSD=no
TERM=xterm
TZ=Asia/Calcutta
USER=root
WINDOWID=41943093
XFILESEARCHPATH=/etc/dt/app-defaults/%L/%N:/etc/dt/app-defaults/C/%N:/usr/dt/app-defaults/%L/%N:/usr/dt/app-defaults/C/%N:/usr/openwin/lib/locale/%L/%T/%N%S:/usr/openwin/lib/%T/%N%S
XMBINDDIR=/usr/dt/lib/bindings
XMICONBMSEARCHPATH=/root/.dt/icons/%B%M.bm:/root/.dt/icons/%B%M.pm:/root/.dt/icons/%B:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B
XMICONSEARCHPATH=/root/.dt/icons/%B%M.pm:/root/.dt/icons/%B%M.bm:/root/.dt/icons/%B:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B
XPCOM_DEBUG_BREAK=warn
_=./build-firefox.pl
dtstart_sessionlogfile=/dev/null
-->mozconfig<----------------------------------------
# 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/post-mozilla.pl
===============================
Compiler is -- CC
===============================
Begin: Fri Jun 29 20:32:28 2007
cvs -q checkout -P -D "06/29/2007 15:01 +0000" mozilla/client.mk 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 client.mk checkout
make: Fatal error in reader: client.mk, 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 http://www.mozilla.org/projects/tinderbox/ .
2. Sun Studio 11
http://developers.sun.com/sunstudio/products/previous/11/index.jsp
On Solaris, Sun Studio is used to build Firefox, not gcc, so have to install Sun Studio.
3. Set up CBE (Common Build Environment)
http://opensolaris.org/os
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
<ldtp>
<group name="group1">
<script name="verifyaddressfield.py">
<test name="address field and go button">
<pass>1</pass>
</test>
</script>
<script name="verifybackforward.py">
<test name="Back and Forward buttons">
<pass>1</pass>
</test>
</script>
<script name="verifyhome.py">
<test name="verify home button">
<pass>1</pass>
</test>
</script>
<script name="verifynewtab.py">
<test name="Open a new tab ">
<pass>1</pass>
</test>
</script>
<script name="verifyyahoo.py">
<test name="topsite - yahoo">
<pass>1</pass>
</test>
</script>
<script name="verifymsn.py">
<test name="topsite - msn test">
<pass>1</pass>
</test>
</script>
<script name="verifyamazon.py">
<test name="topsite - amazon">
<pass>1</pass>
</test>
</script>
<script name="verifyftp.py">
<test name="navigate ftp">
<pass>1</pass>
</test>
</script>
<script name="verifysearch.py">
<test name="Open search by keyboard shortcuts">
<pass>1</pass>
</test>
</script>
<script name="verifyfindinpage.py">
<test name="Find in Page">
<pass>1</pass>
</test>
</script>
<timeinfo start="03:23:00 AM on 18-Jun-2007" elapsed="0:1:8"></timeinfo>
<groupsstatus total="10" pass="10" fail="0"></groupsstatus>
</group>
</ldtp>
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="verifyamazon.py">
<test name="topsite - amazon">
<ERROR>Traceback (most recent call last):
File "/usr/local/bin/ldtprunner", line 407, in executescript
execfile (scriptname, scriptglobal)
File "verifyamazon.py", line 52, in <module>
log (msg, 'error')
File "/usr/local/lib/python2.5/site-packages/ldtp.py", line 2500, in log
logger.error (message)
File "logging/__init__.py", line 1015, in error
File "logging/__init__.py", line 1100, in _log
File "/usr/local/lib/python2.5/site-packages/ldtp.py", line 2421, in makeRecord
return LdtpLogRecord (name, level, fn, lno, msg, args, exc_info)
File "/usr/local/lib/python2.5/site-packages/ldtp.py", line 2394, in __init__
msg = '<' + logging.getLevelName (level) +'>' + saxutils.escape (msg) + '</' + logging.getLevelName (level) + '>'
File "/usr/lib/python2.5/site-packages/_xmlplus/sax/saxutils.py", line 31, in escape
data = data.replace("&", "&")
AttributeError: 'LdtpExecutionError' object has no attribute 'replace'
</ERROR>
</script>
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
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 2.0.0.4 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 ...
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.
Installation
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
<logfileoverwrite>1</logfileoverwrite>
<logfile>log.xml</logfile>
<group>
<script>
<name>verifyaddress-autocomplete.py</name>
<data>firefox.xml</data>
</script>
</group>
</ldtp>
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.
Test
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 verifyaddress-autocomplete.py
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 ...
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 bugzilla.mozilla.org .
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
1. Bookmarks
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 ;)