Software Testing is not an easy topic, because of mass considerations.
So I just created a mindmap
to cover most perspectives around testing.
Sunday, December 14, 2008
Saturday, September 27, 2008
big-endian UTF16 or little-endian UTF16?
I was working on generating configuration file for mobile device on PC today.
From the example, I can tell that it is using two bytes Unicode.
Thus I am using 'UTF-16' encoding for InputStreamReader and OutputStreamWriter.
However, it seems that the server running on mobile device doesn't like my configuration file.
By looking into the example and generated files, I notice that it was using little-endian UTF-16.
So I changed to use the following statement to write content in little-endian UTF16 encoding.
Here are Unicode table for reference:
From the example, I can tell that it is using two bytes Unicode.
Thus I am using 'UTF-16' encoding for InputStreamReader and OutputStreamWriter.
However, it seems that the server running on mobile device doesn't like my configuration file.
By looking into the example and generated files, I notice that it was using little-endian UTF-16.
So I changed to use the following statement to write content in little-endian UTF16 encoding.
OutputStreamWriter out = new OutputStreamWriter(
new FileOutputStream(iniFile), "UTF-16LE");
Here are Unicode table for reference:
| Encoding | File initial signature | Java encoding name |
|---|---|---|
| UTF 8 | FF BB BF | UTF8 |
| UTF 16 Big-Endian | FE FF | UTF16-BE |
| UTF 16 Little-Endian | FF FE | UTF16-LE |
Tuesday, August 26, 2008
AntSys -- lightweight and powerful system test framwork
AntSys
Why write AntSys
I was looking for a well-know and easy to use open source tool for our system testing.
My requirements are:
* configure parameters
* setup environment variables
* able to redirect stand input, output, and error
* get back the process exit code
* check if output file is created as expect
* check the content of output file against expected file.
* check process exit code
* check the content of system.ouput.
* check the content of system.error.
such as create/delete directory, copy files, and even xml processing.
Although the requirements are quite generic, I can't find a well-known OSS project. Most companies are
using their own home-grow system test framework.
Let's create a OSS tool to solve this problem then!
What is AntSys
AntSys is a lightweight and powerful system test framwork built on top of Ant.
It is designed to be easy to work and user can create system/function test cases in xml file without writing single line of code.
AntSys Tasks
AntSys provides the following Ant tasks to write a system test:
Example test script
Here is one example of test script to test echo command.
<project name="antsys-systemtest" basedir="." default="systemtest">
<target name="systemtest">
<!-- this test suite is using AntSys to test echo shell commands -->
<testsuite name="CommandTestSuite" failonerror="false" todir="./report" htmlreport="true">
<!-- test echo command output -->
<testcase name="echo_test">
<!-- create working dir for testing -->
<mkdir dir="work"/>
<!-- use echo to create a test file -->
<exec vmlauncher="false" executable="echo" output="work/test.dat">
<arg value="testmessage"/>
</exec>
<!-- check the file exists or not -->
<assertfileexist file="./work/test.dat" errormsg="should generate test.dat" />
<assertfilegrep file="./work/test.dat" regexp="^test" errormsg="should start with test" />
<assertfileequal expectedfile="./work/test.dat" actualfile="./work/test.dat"/>
<delete dir="work"/>
</testcase>
</target>
</project>
Sunday, June 29, 2008
Something big is right around the corner!


The Symbian Foundation announcement this week will change the business strategy
for mobile space in the following years.
Android from Google is one big part of the reason for Nokia to pay 400M to buy Symbian and donate it to open source.
Thinking about the Symbian/Nokia relation, this is the milestone in the use of open source by large tech companies like Nokia,
Nine years ago, when i worked for Nokia, I found it is a company always ready to big change. I really respect to that.
However, things are not clear to some related parties yet:
- Employee
some time will shrink to fit the community driven mobel (How those managers find there position in community
model?). As a symbianer, Do i want to wait for the special bonus?
- Microsoft
- Apple
supported by major vendors and operators?
Monday, June 23, 2008
Symbian Fundation
Sunday, February 17, 2008
Config Idle Timeout for openSSH Fedora
With some ssh servers, you can config the time out in /etc/ssh/sshd_config like
IdleTimeOut=10m
However, the openssh shipped with Fedora doesn't support this option.
Two workarounds are:
#set the idle timeout for ssh to 10minutes
TMOUT=600
readonly TMOUT
export TMOUT
Notice here, need to set the TMOUT to readonly, otherwise users can override it.
IdleTimeOut=10m
However, the openssh shipped with Fedora doesn't support this option.
Two workarounds are:
- Apply openssh watchdog patch
- use TMOUT for shell
#set the idle timeout for ssh to 10minutes
TMOUT=600
readonly TMOUT
export TMOUT
Notice here, need to set the TMOUT to readonly, otherwise users can override it.
Thursday, January 31, 2008
On The Road -- Google Map Mashup
Just Created a google map mashup page to show those places i have visited.
The page is hosted on google http://multiroute.googlepages.com/ajaxGoogleMapsMashup.html
The draft version only show the list of places in the right side, and show marker and zoom in once you click the location.
Plan to add more stuff when have time:
polish the site
show to pictures for each trip (Already in Picasa Web Albums)
The page is hosted on google http://multiroute.googlepages.com/ajaxGoogleMapsMashup.html
The draft version only show the list of places in the right side, and show marker and zoom in once you click the location.
Plan to add more stuff when have time:
Subscribe to:
Posts (Atom)