diff --git a/maketestrpm b/maketestrpm
new file mode 100755
index 000000000..e57209832
--- /dev/null
+++ b/maketestrpm
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+OSNAME=$(uname)
+VER=`cat Version`
+
+if [ "$OSNAME" = "AIX" ]
+then
+ source=/opt/freeware/src/packages
+ echo '.svn' > /tmp/xcat-excludes
+ tar -X /tmp/xcat-excludes -cf $source/SOURCES/xCAT-test-$VER.tar xCAT-test
+ gzip -f $source/SOURCES/xCAT-test-$VER.tar
+ rm -f $source/SRPMS/xCAT-test*rpm $source/RPMS/ppc/xCAT-test*rpm
+ rpm -ba xCAT-test/xCAT-test.spec
+ #rpm -ta $source/SOURCES/xCAT-test-$VER.tar.gz
+else
+ if [ -f /etc/redhat-release ]
+ then
+ pkg="redhat"
+ else
+ pkg="packages"
+ fi
+
+ set -x
+ tar --exclude=.svn -czhf /usr/src/$pkg/SOURCES/xCAT-test-$VER.tar.gz xCAT-test
+ rm -f /usr/src/$pkg/SRPMS/xCAT-test-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-test-$VER*rpm
+ rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-test-$VER.tar.gz
+fi
diff --git a/xCAT-test/autotest/aix.conf.template b/xCAT-test/autotest/aix.conf.template
new file mode 100644
index 000000000..a91793300
--- /dev/null
+++ b/xCAT-test/autotest/aix.conf.template
@@ -0,0 +1,40 @@
+#add rows to xCAT database table tablename
+#[Table_tablename]
+#key=value
+[Table_passwd]
+key=system
+username=root
+password=cluster
+#add object definition to xCAT database
+#[Object_objecttype]
+#Name=object name
+#Attribute=value
+[Object_network]
+Name=autotest_ent
+net=192.168.10.0
+mask=255.255.255.0
+gateway=192.168.10.2
+[Object_node]
+Name=w1v3hmc05.ppd.pok.ibm.com
+groups=all
+nodetype=hmc
+mgt=hmc
+username=hscroot
+password=abc123
+[Object_node]
+Name=lpar6
+hcp=w1v3hmc05.ppd.pok.ibm.com
+#script to run before test
+[Script_Prev]
+#scripts to run after test
+[Script_Post]
+#varible can be referenced in command and output check string in the test case by $$VARIABLE
+#system VARIABLE,xCAT automated test predefined variable
+[System]
+CN=lpar6 #computenode name
+SOURCE=/61L #the source used by mknimimage
+SSHPKG=/tmp/xcat/ssh #put additional package and bundle here
+MaxLparID=32 #Max LPAR ID on target CEC, used by cases for mkvm,chvm,lsvm,rmvm
+#customerize VARIABLE, user can add variable for new cases here
+[Custom]
+#VARNAME=value
diff --git a/xCAT-test/autotest/bundle/bat.bundle b/xCAT-test/autotest/bundle/bat.bundle
new file mode 100644
index 000000000..440ec5a99
--- /dev/null
+++ b/xCAT-test/autotest/bundle/bat.bundle
@@ -0,0 +1,114 @@
+chdef_null
+chdef_t_o_attr
+chdef_p_t_o_attr
+chdef_m_t_o_attr
+chdef_z
+chdef_t_o_attr_noderange
+chdef_t_o_error
+chtab_null
+chtab_delete
+chtab_modify
+chvm_null
+chvm_p
+chvm_attr
+chvm_node
+chvm_err_node
+copycds_iso
+copycds_n
+copycds_a
+copycds_n_a
+copycds_a_err
+copycds_n_err
+geninitrd_i_n_o_p
+getmacs_noderange
+getmacs_d
+getmacs_f_D
+gettab_key_table
+lsdef_null
+lsdef_a
+lsdef_t_o_l
+lsdef_t_o_l_z
+lsdef_t
+lsdef_t_i_o
+lsdef_t_w
+lsdef_t_err
+lsvm_null
+lsvm_node
+lsvm_err_node
+makeconservercf_null
+makeconservercf_noderange
+makeconservercf_d
+makedhcp_n
+makedhcp_a
+makedhcp_a_d
+makedhcp_d
+mkdef_null
+mkdef_t_o_attr
+mkdef_f_t_o_attr
+mkdef_z
+mkdef_t_o_error
+mkvm_i_l
+nodeadd_noderange
+nodeadd_err_symbol
+nodech_noderange_table
+nodech_noderange_table_comma
+nodech_noderange_table_arrow
+nodech_noderanage_table_at
+nodech_delete
+nodech_delete_error
+nodech_error_node
+nodech_error_table
+nodels_null
+nodels_H
+nodels_noderange
+nodels_err_symbol
+nodels_err_noderange
+noderm_noderange
+nodeset_stat
+nodeset_noderange
+nodestat_noderange
+nodestat_err_node
+rinv_null
+rinv_bus
+rinv_config
+rinv_serial
+rinv_model
+rinv_firm
+rinv_all
+rinv_noderange_err
+rmdef_null
+rmdef_t_o_attr
+rmdef_f_all
+rmdef_t_err
+rmvm_noderange
+rpower_off
+rpower_stat
+rpower_boot
+rpower_on
+rpower_reset
+rpower_noderange
+rpower_noderange_nodeps
+rpower_err_noderange
+rscan_noderange
+rscan_x
+rscan_z
+rscan_w
+rscan_x_w
+rscan_z_w
+rvitals_temp
+rvitals_voltage
+rvitals_power
+rvitals_state
+rvitals_lcds
+rvitals_all
+rvitals_noderange_err
+sinv_c_p_t_r_o
+sinv_c_s_p_t_o
+tabdump_table
+tabdump_d
+tabgrep_node
+tabrestore_table
+xcatstart
+xcatstop
+xdcp_src_dst
+xdcp_P
diff --git a/xCAT-test/autotest/linux.conf.template b/xCAT-test/autotest/linux.conf.template
new file mode 100644
index 000000000..ca7309272
--- /dev/null
+++ b/xCAT-test/autotest/linux.conf.template
@@ -0,0 +1,81 @@
+#Table configuration
+[Table_passwd]
+key=system
+username=root
+password=cluster
+
+[Table_site]
+key=nameservers
+value=192.168.10.1
+key=forwarders
+value=9.114.1.1
+key=domain
+value=ppd.pok.ibm.com
+[Object_network]
+Name=autotest_ent
+net=192.168.10.0
+mask=255.255.255.0
+gateway=192.168.10.3
+
+#Object configuration
+[Object_node]
+Name=w1v3hmc05.ppd.pok.ibm.com
+groups=hmc,all
+nodetype=hmc
+mgt=hmc
+username=hscroot
+password=abc123
+
+[Object_node]
+Name=Server-9117-MMA-SN10F6F3D
+nodetype=fsp
+mtm=9117-MMA
+serial=10F6F3D
+side=A
+hcp=9.114.47.165
+groups=fsp,all
+mgt=hmc
+
+[Object_node]
+Name=lpar5
+hcp=w1v3hmc05.ppd.pok.ibm.com
+netboot=yaboot
+tftpserver=192.168.10.1
+nfsserver=192.168.10.1
+monserver=192.168.10.1
+xcatmaster=192.168.10.1
+installnic=eth1
+primarynic=eth0
+arch=ppc64
+profile=compute
+os=rhels5.4
+
+#system varible for autotest
+[System]
+CN=lpar5
+ISO=/iso/RHEL5.4-Server-20090819.0-ppc-DVD.iso
+NETDRIVER=ibmveth #network infterface card driver used by diskless installation
+NETBOOTDIR=/opt/xcat/share/xcat/netboot/rh #path of netboot directory, used by diskless installation
+MaxLparID=32
+[Custom]
+
+#commands run before test
+[Script_Prev]
+rpm -e xCAT xCAT-server xCAT-client perl-xCAT
+rm -rf /etc/xcat
+rm -rf /root/.xcat
+rm -rf /root/.ssh
+rm -rf /install/autoinst
+rm -rf /install/postscripts
+wget http://xcat.sourceforge.net/yum/devel/core-rpms-snap.tar.bz2
+tar jxf core-rpms-snap.tar.bz2
+./xcat-core/mklocalrepo.sh
+mount -o loop /iso/RHEL5.4-Server-20090819.0-ppc-DVD.iso /iso/1 -t iso9660
+yum -y install xCAT
+umount /iso/1
+rm -f core-rpms-snap.tar.bz2
+rm -rf xcat-core
+
+#commands run after test
+[Script_Post]
+
diff --git a/xCAT-test/autotest/testcase/chdef/cases0 b/xCAT-test/autotest/testcase/chdef/cases0
new file mode 100644
index 000000000..0aaeb6104
--- /dev/null
+++ b/xCAT-test/autotest/testcase/chdef/cases0
@@ -0,0 +1,77 @@
+start:chdef_null
+cmd:chdef
+check:rc==0
+check:output=~Usage
+end
+start:chdef_t_o_attr
+cmd:chdef -t network -o testnetwork net=111.222.33.0 mask=255.255.255.254
+check:rc==0
+cmd:lsdef -t network -l testnetwork
+check:rc==0
+check:output=~net=111.222.33.0
+check:output=~mask=255.255.255.254
+cmd:chdef -t network -o testnetwork net=111.222.34.0 mask=255.255.255.254 gateway=111.222.34.1
+check:rc==0
+cmd:lsdef -t network -l testnetwork
+check:rc==0
+check:output=~net=111.222.34.0
+check:output=~mask=255.255.255.254
+check:output=~gateway=111.222.34.1
+cmd:rmdef -t network testnetwork
+end
+start:chdef_p_t_o_attr
+cmd:mkdef -t node -o testnode groups=all
+check:rc==0
+cmd:chdef -p -t node -o testnode groups=aix
+check:rc==0
+cmd:lsdef -t node -l testnode
+check:output=~groups=all,aix
+cmd:rmdef -t node testnode
+end
+start:chdef_m_t_o_attr
+cmd:mkdef -t node -o testnode groups=all,testgroup
+check:rc==0
+cmd:chdef -m -t node -o testnode groups=testgroup
+check:rc==0
+cmd:lsdef -t node -l testnode
+check:output!~testgroup
+cmd:rmdef -t node testnode
+end
+start:chdef_z
+cmd:mkdef -t node -o testnode groups=all
+check:rc==0
+cmd:lsdef -l $$CN -z > /tmp/testnode.stanza
+check:rc==0
+cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/testnode.stanza
+cmd:cat /tmp/testnode.stanza | chdef -z
+check:rc==0
+cmd:lsdef -l testnode -z > /tmp/testnode1.stanza
+check:rc==0
+cmd:diff /tmp/testnode.stanza /tmp/testnode1.stanza
+check:rc==0
+cmd:rm -f /tmp/testnode1.stanza
+cmd:rm -f /tmp/testnode.stanza
+cmd:rmdef -t node testnode
+end
+start:chdef_t_o_attr_noderange
+cmd:chdef -t node -o orignode mgt=fsp cons=hmc pprofile=orignode groups=lpar,all
+check:rc==0
+cmd:lsdef -l orignode -z > /tmp/orignode.stanza
+check:rc==0
+cmd:perl -pi -e 's/orignode/testnode/g' /tmp/orignode.stanza
+cmd:cat /tmp/orignode.stanza | chdef -z
+check:rc==0
+cmd:lsdef -l testnode -z > /tmp/testnode.stanza
+check:rc==0
+cmd:diff /tmp/orignode.stanza /tmp/testnode.stanza
+check:rc==0
+cmd:rm -f /tmp/orignode.stanza
+cmd:rm -f /tmp/testnode.stanza
+cmd:rmdef -t node testnode
+cmd:rmdef -t node orignode
+end
+start:chdef_t_o_error
+cmd:chdef -t testtype -o testnode groups=all,aix
+check:rc!=0
+check:output=~Usage
+end
diff --git a/xCAT-test/autotest/testcase/chtab/cases0 b/xCAT-test/autotest/testcase/chtab/cases0
new file mode 100644
index 000000000..5059c7517
--- /dev/null
+++ b/xCAT-test/autotest/testcase/chtab/cases0
@@ -0,0 +1,29 @@
+start:chtab_null
+cmd:chtab
+check:rc!=0
+check:output=~Usage
+end
+start:chtab_delete
+cmd:chtab key=rsh_test site.value=/opt/xcat/bin/rcp site.comments="the rcp command" site.disable=no
+check:rc==0
+cmd:tabdump site | grep rsh_test
+check:output=~/opt/xcat/bin/rcp
+cmd:chtab -d key=rsh_test site
+check:rc==0
+cmd:tabdump site | grep rsh_test
+check:output!=rsh_test
+end
+start:chtab_modify
+cmd:chtab key=rsh_test site.value=/opt/xcat/bin/rcp site.comments="the rcp command" site.disable=no
+check:rc==0
+cmd:tabdump site | grep rsh_test
+check:output=~/opt/xcat/bin/rcp
+check:output=~no
+check:output=~the rcp command
+cmd:chtab key=rsh_test site.value=/opt/xcat/bin/scp site.disable=yes
+check:rc==0
+cmd:tabdump site | grep rsh_test
+check:output=~/opt/xcat/bin/scp
+check:output=~yes
+cmd:chtab -d key=rsh_test site
+end
diff --git a/xCAT-test/autotest/testcase/chvm/cases0 b/xCAT-test/autotest/testcase/chvm/cases0
new file mode 100644
index 000000000..ca74b8841
--- /dev/null
+++ b/xCAT-test/autotest/testcase/chvm/cases0
@@ -0,0 +1,47 @@
+start:chvm_null
+cmd:chvm
+check:rc!=0
+check:output=~Usage
+end
+start:chvm_p
+hcp:hmc
+cmd:lsvm $$CN > /tmp/autotest.profile
+check:rc==0
+cmd:mkdef -t node -o testnode mgt=hmc groups=all
+cmd:mkvm testnode -i $$MaxLparID -l $$CN
+check:rc==0
+cmd:perl -pi -e 's/min_mem=\d+/min_mem=1024/g' /tmp/autotest.profile
+cmd:cat /tmp/autotest.profile|chvm testnode
+check:rc==0
+cmd:lsvm testnode
+check:output=~min_mem=1024
+cmd:chvm testnode -p __GETNODEATTR($$CN, pprofile)__
+check:rc==0
+check:output=~Success
+cmd:lsvm testnode
+check:output!~min_mem=1024
+cmd:rmvm testnode
+cmd:rm -f /tmp/autotest.profile
+end
+start:chvm_attr
+hcp:hmc
+cmd:mkdef -t node -o testnode mgt=hmc groups=all
+cmd:mkvm testnode -i $$MaxLparID -l $$CN
+check:rc==0
+cmd:chvm testnode min_mem=1024
+check:rc==0
+check:output=~Success
+cmd:lsvm testnode
+check:output=~min_mem=1024
+cmd:rmvm testnode
+end
+start:chvm_node
+cmd:chvm $$CN
+check:rc!=0
+check:output=~Error
+end
+start:chvm_err_node
+cmd:chvm testnode
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/copycds/cases0 b/xCAT-test/autotest/testcase/copycds/cases0
new file mode 100644
index 000000000..36f5e6f9a
--- /dev/null
+++ b/xCAT-test/autotest/testcase/copycds/cases0
@@ -0,0 +1,54 @@
+start:copycds_iso
+os:Linux
+cmd:umount /mnt/xcat
+cmd:copycds $$ISO
+check:rc==0
+check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/
+check:output=~Media copy operation successful
+cmd:ls /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/.treeinfo
+check:rc==0
+end
+start:copycds_n
+os:Linux
+cmd:umount /mnt/xcat
+cmd:copycds -n __GETNODEATTR($$CN,os)__ $$ISO
+check:rc==0
+check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/
+check:output=~Media copy operation successful
+cmd:ls /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/.treeinfo
+check:rc==0
+end
+start:copycds_a
+os:Linux
+cmd:umount /mnt/xcat
+cmd:copycds -a __GETNODEATTR($$CN,arch)__ $$ISO
+check:rc==0
+check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/
+check:output=~Media copy operation successful
+cmd:ls /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/.treeinfo
+check:rc==0
+end
+start:copycds_n_a
+os:Linux
+cmd:umount /mnt/xcat
+cmd:copycds -n __GETNODEATTR($$CN,os)__ -a __GETNODEATTR($$CN,arch)__ $$ISO
+check:rc==0
+check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/
+check:output=~Media copy operation successful
+cmd:ls /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/.treeinfo
+check:rc==0
+end
+start:copycds_a_err
+os:Linux
+cmd:umount /mnt/xcat
+cmd:copycds -a 386 $$ISO
+check:rc!=0
+check:output=~Error
+end
+start:copycds_n_err
+os:Linux
+cmd:umount /mnt/xcat
+cmd:copycds -n aix $$ISO
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/geninitrd/cases0 b/xCAT-test/autotest/testcase/geninitrd/cases0
new file mode 100644
index 000000000..cd7bc8733
--- /dev/null
+++ b/xCAT-test/autotest/testcase/geninitrd/cases0
@@ -0,0 +1,8 @@
+start:geninitrd_i_n_o_p
+os:Linux
+cmd:copycds $$ISO
+cmd:$$NETBOOTDIR/genimage -i __GETNODEATTR($$CN,installnic)__ -n $$NETDRIVER -o __GETNODEATTR($$CN,os)__ -p compute
+check:rc==0
+cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/initrd.gz
+check:rc==0
+end
diff --git a/xCAT-test/autotest/testcase/getmacs/cases0 b/xCAT-test/autotest/testcase/getmacs/cases0
new file mode 100644
index 000000000..ea52f453f
--- /dev/null
+++ b/xCAT-test/autotest/testcase/getmacs/cases0
@@ -0,0 +1,34 @@
+start:getmacs_noderange
+cmd:tabdump mac > /tmp/mac.csv
+cmd:chtab -d node=$$CN mac
+cmd:getmacs $$CN
+check:rc==0
+check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}
+cmd:tabdump mac | grep $$CN
+check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}
+cmd:tabrestore /tmp/mac.csv
+cmd:rm /tmp/mac.csv
+end
+start:getmacs_d
+cmd:tabdump mac > /tmp/mac.csv
+cmd:chtab -d node=$$CN mac
+cmd:getmacs $$CN -d
+check:rc==0
+check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}
+cmd:tabdump mac | grep $$CN
+check:output!~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}
+cmd:tabrestore /tmp/mac.csv
+cmd:rm /tmp/mac.csv
+end
+start:getmacs_f_D
+cmd:tabdump mac > /tmp/mac.csv
+cmd:chtab -d node=$$CN mac
+cmd:getmacs $$CN -f -D
+check:rc==0
+check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}
+cmd:tabdump mac | grep $$CN
+check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}
+cmd:tabrestore /tmp/mac.csv
+cmd:rm /tmp/mac.csv
+cmd:rpower $$CN on
+end
diff --git a/xCAT-test/autotest/testcase/gettab/cases0 b/xCAT-test/autotest/testcase/gettab/cases0
new file mode 100644
index 000000000..379627df4
--- /dev/null
+++ b/xCAT-test/autotest/testcase/gettab/cases0
@@ -0,0 +1,5 @@
+start:gettab_key_table
+cmd:gettab key=xcatdport site.value
+check:rc==0
+check:output==3001
+end
diff --git a/xCAT-test/autotest/testcase/installation/aix_diskless_installation b/xCAT-test/autotest/testcase/installation/aix_diskless_installation
new file mode 100644
index 000000000..8e784a81c
--- /dev/null
+++ b/xCAT-test/autotest/testcase/installation/aix_diskless_installation
@@ -0,0 +1,53 @@
+start:aix_diskless_installation_flat
+os:AIX
+cmd:mknimimage -V -r -t diskless -s $$SOURCE autotestcosi
+check:rc==0
+cmd:lsnim | grep autotestcosi
+check:rc==0
+check:output=~lpp_source
+check:output=~spot
+check:output=~paging
+check:output=~shared_root
+cmd:nim -o update -a packages=all -a source=$$SSHPKG autotestcosi_lpp_source
+check:rc==0
+cmd:mkdir -p /install/nim/installp_bundle
+cmd:cp $$SSHPKG/xCATaixCN.bnd /install/nim/installp_bundle/
+check:rc==0
+cmd:nim -o define -t installp_bundle -a server=master -a location=/install/nim/installp_bundle/xCATaixCN.bnd xCATaixCN
+cmd:chdef -t osimage -o autotestcosi installp_bundle="xCATaixCN"
+check:rc==0
+cmd:xcatchroot -i autotestcosi "/usr/bin/echo root:cluster|/usr/bin/chpasswd -c"
+check:rc==0
+cmd:mknimimage -u autotestcosi
+check:rc==0
+cmd:rscan __GETNODEATTR($$CN, hcp)__ -w
+check:rc==0
+cmd:makeconservercf
+check:rc==0
+cmd:cat /etc/conserver.cf | grep $$CN
+check:output=~$$CN
+cmd:getmacs $$CN -f -D
+check:rc==0
+cmd:mkdsklsnode -i autotestcosi $$CN
+check:rc==0
+cmd:lsnim | grep $$CN
+check:output=~machines
+cmd:lsnim -l $$CN
+check:output=~diskless or dataless boot is enabled
+cmd:cat /etc/bootptab | grep $$CN
+check:output=~__GETNODEATTR($$CN, mac)__
+cmd:ls -l /tftpboot/$$CN*
+check:output=~$$CN
+cmd:cat /etc/exports | grep $$CN
+check:output=~autotestcosi_shared_root
+check:output=~spot/autotestcosi/usr
+check:output=~autotestcosi_paging
+cmd:rnetboot $$CN
+check:rc==0
+cmd:sleep 300
+cmd:lsdef -l $$CN| grep status
+check:output=~booted
+cmd:xdsh $$CN date
+check:rc==0
+check:output=~\d\d:\d\d:\d\d
+end
diff --git a/xCAT-test/autotest/testcase/installation/aix_full_installation b/xCAT-test/autotest/testcase/installation/aix_full_installation
new file mode 100644
index 000000000..b33be3062
--- /dev/null
+++ b/xCAT-test/autotest/testcase/installation/aix_full_installation
@@ -0,0 +1,52 @@
+start:aix_full_installation_flat
+os:AIX
+cmd:mknimimage -V -s $$SOURCE autotest
+check:rc==0
+cmd:lsnim | grep autotest
+check:rc==0
+check:output=~lpp_source
+check:output=~spot
+check:output=~bosinst_data
+cmd:nim -o update -a packages=all -a source=$$SSHPKG autotest_lpp_source
+check:rc==0
+cmd:mkdir -p /install/nim/installp_bundle
+cmd:cp $$SSHPKG/xCATaixCN.bnd /install/nim/installp_bundle/
+check:rc==0
+cmd:nim -o define -t installp_bundle -a server=master -a location=/install/nim/installp_bundle/xCATaixCN.bnd xCATaixCN
+cmd:chdef -t osimage -o autotest installp_bundle="xCATaixCN"
+check:rc==0
+cmd:rscan __GETNODEATTR($$CN, hcp)__ -w
+check:rc==0
+cmd:makeconservercf
+check:rc==0
+cmd:cat /etc/conserver.cf | grep $$CN
+check:output=~$$CN
+cmd:getmacs $$CN -f -D
+check:rc==0
+cmd:xcat2nim -t node -o $$CN
+check:rc==0
+cmd:lsnim | grep $$CN
+check:output=~machines
+cmd:nimnodeset -i autotest $$CN
+check:rc==0
+cmd:lsnim -l $$CN
+check:output=~BOS installation has been enabled
+cmd:cat /etc/bootptab | grep $$CN
+check:output=~__GETNODEATTR($$CN, mac)__
+cmd:ls -l /tftpboot/$$CN*
+check:output=~$$CN
+cmd:cat /etc/exports | grep $$CN
+check:output=~autotest_bosinst_data
+check:output=~spot/autotest/usr
+check:output=~xcataixscript
+check:output=~xCATaixCN.bnd
+check:output=~autotest_lpp_source
+cmd:rnetboot $$CN
+check:rc==0
+cmd:sleep 1800
+cmd:lsdef -l $$CN| grep status
+check:output=~booted
+cmd:xdsh $$CN date
+check:rc==0
+check:output=~\d\d:\d\d:\d\d
+end
diff --git a/xCAT-test/autotest/testcase/installation/linux_diskless_installation b/xCAT-test/autotest/testcase/installation/linux_diskless_installation
new file mode 100644
index 000000000..e522e4937
--- /dev/null
+++ b/xCAT-test/autotest/testcase/installation/linux_diskless_installation
@@ -0,0 +1,42 @@
+start:Linux_diskless_installation_flat
+os:Linux
+cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
+check:rc==0
+cmd:makedns
+check:rc==0
+cmd:service named restart
+check:rc==0
+cmd:nslookup $$CN
+check:rc==0
+check:output=~Address:\s+\d+.\d+.\d+.\d+
+cmd:makeconservercf
+check:rc==0
+cmd:cat /etc/conserver.cf | grep $$CN
+check:output=~$$CN
+cmd:getmacs $$CN -f -D
+check:rc==0
+cmd:makedhcp -n
+check:rc==0
+cmd:makedhcp -a
+check:rc==0
+cmd:service dhcpd restart
+check:rc==0
+cmd:cat /var/lib/dhcpd/dhcpd.leases| grep lpar5
+check:output=~lpar5
+#cmd:copycds $$ISO
+#check:rc==0
+cmd:$$NETBOOTDIR/genimage -i __GETNODEATTR($$CN,installnic)__ -n $$NETDRIVER -o __GETNODEATTR($$CN,os)__ -p compute
+check:rc==0
+cmd:$$NETBOOTDIR/packimage -o __GETNODEATTR($$CN,os)__ -p compute -a __GETNODEATTR($$CN,arch)__
+check:rc==0
+cmd:nodeset $$CN netboot
+check:rc==0
+cmd:rnetboot $$CN
+check:rc==0
+cmd:sleep 600
+cmd:lsdef -l $$CN | grep status
+check:output=~booted
+cmd:xdsh $$CN date
+check:rc==0
+check:output=~\d\d:\d\d:\d\d
+end
diff --git a/xCAT-test/autotest/testcase/installation/linux_full_installation b/xCAT-test/autotest/testcase/installation/linux_full_installation
new file mode 100644
index 000000000..09d17874a
--- /dev/null
+++ b/xCAT-test/autotest/testcase/installation/linux_full_installation
@@ -0,0 +1,40 @@
+start:Linux_full_installation_flat
+os:Linux
+cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
+check:rc==0
+cmd:makedns
+check:rc==0
+cmd:service named restart
+check:rc==0
+cmd:nslookup $$CN
+check:rc==0
+check:output=~Address:\s+\d+.\d+.\d+.\d+
+cmd:makeconservercf
+check:rc==0
+cmd:cat /etc/conserver.cf | grep $$CN
+check:output=~$$CN
+cmd:getmacs $$CN -f -D
+check:rc==0
+cmd:makedhcp -n
+check:rc==0
+cmd:makedhcp -a
+check:rc==0
+cmd:service dhcpd restart
+check:rc==0
+cmd:cat /var/lib/dhcpd/dhcpd.leases| grep lpar5
+check:output=~lpar5
+cmd:copycds $$ISO
+check:rc==0
+cmd:nodeset $$CN install
+check:rc==0
+cmd:rnetboot $$CN
+check:rc==0
+cmd:sleep 1200
+cmd:ping $$CN -c 3
+check:output=~64 bytes from $$CN
+cmd:lsdef -l $$CN | grep status
+check:output=~booted
+cmd:xdsh $$CN date
+check:rc==0
+check:output=~\d\d:\d\d:\d\d
+end
diff --git a/xCAT-test/autotest/testcase/lsdef/cases0 b/xCAT-test/autotest/testcase/lsdef/cases0
new file mode 100644
index 000000000..53d07bd7c
--- /dev/null
+++ b/xCAT-test/autotest/testcase/lsdef/cases0
@@ -0,0 +1,101 @@
+start:lsdef_null
+cmd:mkdef -t node -o testnode groups=all
+cmd:lsdef
+check:rc==0
+check:output=~testnode\s*\(node\)
+cmd:rmdef testnode
+end
+start:lsdef_a
+cmd:mkdef -t node -o testnode groups=all
+check:rc==0
+cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
+check:rc==0
+cmd:lsdef -a
+check:output=~testnode
+check:output=~testnetwork
+cmd:lsdef --all
+check:output=~testnode
+check:output=~testnetwork
+cmd:rmdef -t network testnetwork
+cmd:rmdef -t node testnode
+end
+start:lsdef_t_o_l
+cmd:mkdef -t node -o testnode groups=all
+check:rc==0
+cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
+check:rc==0
+cmd:lsdef -t node -l testnode
+check:rc==0
+check:output=~groups=all
+check:output!~testnetwork
+cmd:lsdef -t network -l testnetwork
+check:rc==0
+check:output=~net=1.2.3.0
+check:output=~mask=255.255.255.0
+check:output!~testnode
+cmd:rmdef -t network testnetwork
+cmd:rmdef -t node testnode
+end
+start:lsdef_t_o_l_z
+cmd:mkdef -t node -o testnode groups=all
+check:rc==0
+cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
+check:rc==0
+cmd:lsdef -t node -l testnode -z
+check:rc==0
+check:output=~testnode:
+check:output=~objtype=node
+check:output=~groups=all
+cmd:lsdef -t network -l testnetwork -z
+check:output=~testnetwork:
+check:output=~objtype=network
+check:output=~mask=255.255.255.0
+check:output=~net=1.2.3.0
+cmd:rmdef -t network testnetwork
+cmd:rmdef -t node testnode
+end
+start:lsdef_t
+cmd:mkdef -t node -o testnode groups=all
+check:rc==0
+cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
+check:rc==0
+cmd:lsdef -t network
+check:rc==0
+check:output=~testnetwork
+check:output!~testnode
+cmd:rmdef -t network testnetwork
+cmd:rmdef -t node testnode
+end
+start:lsdef_t_i_o
+cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0
+check:rc==0
+cmd:lsdef -t network -i net
+check:rc==0
+check:output=~net=1.2.3.0
+check:output!~mask
+cmd:rmdef -t network testnetwork
+end
+start:lsdef_t_w
+cmd:mkdef -t node -o testnode1-testnode2 cons=hmc groups=all
+check:rc==0
+cmd:mkdef -t node -o testnode3-testnode4 cons=ipmi groups=linux
+check:rc==0
+cmd:lsdef -t node -w cons==ipmi
+check:rc==0
+check:output=~testnode3
+check:output=~testnode4
+check:output!=testnode1
+check:output!=testnode2
+cmd:lsdef -t node -w cons!~hmc
+check:rc==0
+check:output=~testnode3
+check:output=~testnode4
+check:output!=testnode1
+check:output!=testnode2
+cmd:rmdef -t node testnode1-testnode4
+end
+start:lsdef_t_err
+cmd:lsdef -t test -o test
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/lsvm/cases0 b/xCAT-test/autotest/testcase/lsvm/cases0
new file mode 100644
index 000000000..c185842a5
--- /dev/null
+++ b/xCAT-test/autotest/testcase/lsvm/cases0
@@ -0,0 +1,16 @@
+start:lsvm_null
+cmd:lsvm
+check:rc!=0
+check:output=~Usage
+end
+start:lsvm_node
+hcp:hmc,ivm
+cmd:lsvm $$CN
+check:rc==0
+check:output=~name=$$CN
+end
+start:lsvm_err_node
+cmd:lsvm testnode
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0
new file mode 100644
index 000000000..c0259c0ad
--- /dev/null
+++ b/xCAT-test/autotest/testcase/makeconservercf/cases0
@@ -0,0 +1,31 @@
+start:makeconservercf_null
+cmd:chdef -t node -o testnode cons=hmc
+cmd:makeconservercf
+check:rc==0
+cmd:cat /etc/conserver.cf
+check:output=~console testnode {
+check:output=~ exec /opt/xcat/share/xcat/cons/hmc testnode;
+check:output=~}
+cmd:rmdef -t node testnode
+end
+start:makeconservercf_noderange
+cmd:chdef -t node -o testnode cons=hmc
+cmd:makeconservercf testnode
+check:rc==0
+cmd:cat /etc/conserver.cf
+check:output=~console testnode {
+check:output=~ exec /opt/xcat/share/xcat/cons/hmc testnode;
+check:output=~}
+cmd:rmdef -t node testnode
+end
+start:makeconservercf_d
+cmd:chdef -t node -o testnode cons=hmc
+cmd:makeconservercf testnode
+check:rc==0
+cmd:makeconservercf -d testnode
+check:rc==0
+cmd:cat /etc/conserver.cf | grep testnode
+check:output!~testnode
+cmd:rmdef -t node testnode
+end
+
diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0
new file mode 100644
index 000000000..8ebbadd5a
--- /dev/null
+++ b/xCAT-test/autotest/testcase/makedhcp/cases0
@@ -0,0 +1,52 @@
+start:makedhcp_n
+os:Linux
+cmd:mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak
+cmd:makedhcp -n
+check:rc==0
+cmd:ls /etc/dhcpd.conf
+check:rc==0
+cmd:ps -e | grep dhcpd
+check:rc==0
+check:output=~dhcpd
+cmd:mv -f /etc/dhcpd.conf.bak /etc/dhcpd.conf
+end
+start:makedhcp_a
+os:Linux
+cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
+cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
+cmd:makedhcp -a
+check:rc==0
+cmd:cat /var/lib/dhcpd/dhcpd.leases
+check:output=~$$CN
+check:output=~11:22:33:44:55:66
+cmd:chdef -t node -o $$CN mac=
+cmd:cat /tmp/$$CN.stanza | chdef -z
+end
+start:makedhcp_a_d
+os:Linux
+cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
+cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
+cmd:mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak
+cmd:makedhcp -a
+cmd:makedhcp -a -d
+check:rc==0
+cmd:cat /var/lib/dhcpd/dhcpd.leases | grep deleted
+check:output=~deleted
+cmd:chdef -t node -o $$CN mac=
+cmd:cat /tmp/$$CN.stanza | chdef -z
+cmd:mv -f /etc/dhcpd.conf.bak /etc/dhcpd.conf
+end
+start:makedhcp_d
+os:Linux
+cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
+cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
+cmd:mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak
+cmd:makedhcp -a
+cmd:makedhcp -d $$CN
+check:rc==0
+cmd:cat /var/lib/dhcpd/dhcpd.leases | grep deleted
+check:output=~deleted
+cmd:chdef -t node -o $$CN mac=
+cmd:cat /tmp/$$CN.stanza | chdef -z
+cmd:mv -f /etc/dhcpd.conf.bak /etc/dhcpd.conf
+end
diff --git a/xCAT-test/autotest/testcase/mkdef/cases0 b/xCAT-test/autotest/testcase/mkdef/cases0
new file mode 100644
index 000000000..e4bd86495
--- /dev/null
+++ b/xCAT-test/autotest/testcase/mkdef/cases0
@@ -0,0 +1,52 @@
+start:mkdef_null
+cmd:mkdef
+check:rc!=0
+check:output=~Usage
+end
+start:mkdef_t_o_attr
+cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
+check:rc==0
+cmd:lsdef -i groups testnode
+check:rc==0
+check:output=~groups=all,aix
+cmd:lsdef -i groups testnode1
+check:rc==0
+check:output=~groups=all,aix
+cmd:rmdef -t node -o testnode,testnode1
+end
+start:mkdef_f_t_o_attr
+cmd:mkdef -t node -o testnode groups=all,aix
+check:rc==0
+cmd:mkdef -f -t node -o testnode nodetype=lpar,osi groups=all
+check:rc==0
+cmd:lsdef -i groups,nodetype testnode
+check:rc==0
+check:output=~nodetype=lpar,osi
+check:output!=aix
+cmd:rmdef -t node -o testnode
+end
+start:mkdef_z
+cmd:mkdef -t node -o orignode mgt=fsp cons=hmc pprofile=orignode groups=lpar,all
+check:rc==0
+cmd:lsdef -l orignode -z > /tmp/orignode.stanza
+check:rc==0
+cmd:perl -pi -e 's/orignode/testnode/g' /tmp/orignode.stanza
+cmd:cat /tmp/orignode.stanza | mkdef -z
+check:rc==0
+cmd:lsdef -l testnode -z > /tmp/testnode.stanza
+check:rc==0
+cmd:diff /tmp/orignode.stanza /tmp/testnode.stanza
+check:rc==0
+cmd:rm -f /tmp/orignode.stanza
+cmd:rm -f /tmp/testnode.stanza
+cmd:rmdef -t node testnode
+cmd:rmdef -t node orignode
+end
+start:mkdef_t_o_error
+cmd:mkdef -t testtype -o testnode groups=all,aix
+check:rc!=0
+check:output=~Usage
+end
+
+
+
diff --git a/xCAT-test/autotest/testcase/mkvm/cases0 b/xCAT-test/autotest/testcase/mkvm/cases0
new file mode 100644
index 000000000..6b252679b
--- /dev/null
+++ b/xCAT-test/autotest/testcase/mkvm/cases0
@@ -0,0 +1,14 @@
+start:mkvm_i_l
+hcp:hmc
+cmd:mkdef -t node -o testnode1,testnode2 mgt=hmc groups=all
+cmd:mkvm testnode1,testnode2 -i $$MaxLparID -l $$CN
+check:rc==0
+check:output=~testnode1\s*:\s*Success\ntestnode2\s*:\s*Success
+cmd:lsvm testnode1
+check:rc==0
+check:output=~testnode1:.*lpar_name=testnode1,lpar_id=$$MaxLparID
+cmd:lsvm testnode2
+check:rc==0
+check:output=~testnode2:.*lpar_name=testnode2,lpar_id=__INC($$MaxLparID)__
+cmd:rmvm testnode1,testnode2
+end
diff --git a/xCAT-test/autotest/testcase/nodeadd/cases0 b/xCAT-test/autotest/testcase/nodeadd/cases0
new file mode 100644
index 000000000..2d522764e
--- /dev/null
+++ b/xCAT-test/autotest/testcase/nodeadd/cases0
@@ -0,0 +1,20 @@
+start:nodeadd_noderange
+cmd:nodeadd testnode1-testnode2 groups="lpar,all" nodetype.nodetype="lpar,osi"
+check:rc==0
+cmd:lsdef -i groups,nodetype testnode1
+check:rc==0
+check:output=~testnode1
+check:output=~groups=lpar,all
+check:output=~nodetype=lpar,osi
+cmd:lsdef -i groups,nodetype testnode2
+check:rc==0
+check:output=~testnode2
+check:output=~groups=lpar,all
+check:output=~nodetype=lpar,osi
+cmd:rmdef -t node -o testnode1-testnode2
+end
+start:nodeadd_err_symbol
+cmd:nodeadd testnode magt=unknown
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/nodech/cases0 b/xCAT-test/autotest/testcase/nodech/cases0
new file mode 100644
index 000000000..8171cdcdb
--- /dev/null
+++ b/xCAT-test/autotest/testcase/nodech/cases0
@@ -0,0 +1,74 @@
+start:nodech_noderange_table
+cmd:chdef -t node -o testnode groups=all,rhels5.4
+check:rc==0
+cmd:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
+check:rc==0
+cmd:lsdef -t node -i groups,os,mgt testnode
+check:output=~groups=all,rhels5.5
+check:output=~os=rhels5.5
+check:output=~mgt=hmc
+cmd:rmdef -t node testnode
+end
+start:nodech_noderange_table_comma
+cmd:chdef -t node -o testnode groups=all
+check:rc==0
+cmd:nodech testnode groups,=rhels5.5
+check:rc==0
+cmd:lsdef -t node -i groups testnode
+check:output=~groups=rhels5.5,all
+cmd:rmdef -t node testnode
+end
+start:nodech_noderange_table_arrow
+cmd:chdef -t node -o testnode groups=all,rhels5.5
+check:rc==0
+cmd:nodech testnode groups^=rhels5.5
+check:rc==0
+cmd:lsdef -t node -i groups testnode
+check:output!=rhels5.5
+cmd:rmdef -t node testnode
+end
+start:nodech_noderanage_table_at
+cmd:chdef -t node -o testnode os=hello
+check:rc==0
+cmd:nodech testnode nodetype.os=@=helloworld
+check:rc==0
+cmd:lsdef -t node -i os testnode
+check:output=~os==helloworld
+cmd:rmdef -t node testnode
+end
+start:nodech_delete
+cmd:chdef -t node -o testnode os=hello
+check:rc==0
+cmd:nodech -d testnode nodetype
+check:rc==0
+cmd:tabdump nodetype | grep testnode
+check:output!~testnode
+cmd:rmdef -t node testnode
+end
+start:nodech_delete_error
+cmd:chdef -t node -o testnode os=hello
+check:rc==0
+cmd:nodech --delete
+check:rc!=0
+check:output=~Usage
+cmd:nodech -d
+check:rc!=0
+check:output=~Usage
+cmd:rmdef -t node testnode
+end
+start:nodech_error_node
+cmd:chdef -t node -o testnode groups=all,rhels5.4
+check:rc==0
+cmd:nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc
+check:rc!=0
+check:output=~Error
+cmd:rmdef -t node testnode
+end
+start:nodech_error_table
+cmd:chdef -t node -o testnode groups=all,rhels5.4
+check:rc==0
+cmd:nodech testnode groups=all,rhels5.5 nodetypes.os=rhels5.5 nodehm.mgt=hmc
+check:rc!=0
+check:output=~Error
+cmd:rmdef -t node testnode
+end
diff --git a/xCAT-test/autotest/testcase/nodels/cases0 b/xCAT-test/autotest/testcase/nodels/cases0
new file mode 100644
index 000000000..08336f837
--- /dev/null
+++ b/xCAT-test/autotest/testcase/nodels/cases0
@@ -0,0 +1,39 @@
+start:nodels_null
+cmd:chdef -t node -o testnode groups="all,aix"
+check:rc==0
+cmd:nodels | grep testnode
+check:rc==0
+check:output=~testnode
+cmd:rmdef -t node -o testnode
+end
+
+start:nodels_H
+cmd:chdef -t node -o testnode groups="all,aix" mgt="hmc"
+check:rc==0
+cmd:nodels -H all groups mgt | grep testnode
+check:rc==0
+check:output=~groups:\s*all,aix
+check:output=~mgt:\s*hmc
+cmd:rmdef -t node -o testnode
+end
+
+start:nodels_noderange
+cmd:chdef -t node -o testnode groups="all,aix"
+check:rc==0
+cmd:nodels testnode
+check:rc==0
+check:output==testnode
+cmd:rmdef -t node -o testnode
+end
+
+start:nodels_err_symbol
+cmd:nodels -H all unknown
+check:rc!=0
+check:output=~Error
+end
+
+start:nodels_err_noderange
+cmd:nodels douniwan
+check:rc!=0
+check:output=~Error
+end
\ No newline at end of file
diff --git a/xCAT-test/autotest/testcase/noderm/cases0 b/xCAT-test/autotest/testcase/noderm/cases0
new file mode 100644
index 000000000..d055f3f34
--- /dev/null
+++ b/xCAT-test/autotest/testcase/noderm/cases0
@@ -0,0 +1,12 @@
+start:noderm_noderange
+cmd:nodeadd testnode1,testnode2 groups=all
+check:rc==0
+cmd:lsdef -t node testnode1,testnode2
+check:output=~testnode1
+check:output=~testnode2
+cmd:noderm testnode1,testnode2
+check:rc==0
+cmd:lsdef -t node testnode1,testnode2
+check:output=~Could not find an object named 'testnode1' of type 'node'.
+check:output=~Could not find an object named 'testnode2' of type 'node'.
+end
diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0
new file mode 100644
index 000000000..d9a82dcc4
--- /dev/null
+++ b/xCAT-test/autotest/testcase/nodeset/cases0
@@ -0,0 +1,12 @@
+start:nodeset_stat
+os:Linux
+cmd:nodeset $$CN stat
+check:rc==0
+check:output=~$$CN:\s+[discover|boot|reboot|install|netboot|shell|standby]
+end
+start:nodeset_noderange
+os:Linux
+cmd:nodeset $$CN test
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/nodestat/cases0 b/xCAT-test/autotest/testcase/nodestat/cases0
new file mode 100644
index 000000000..2dc30a714
--- /dev/null
+++ b/xCAT-test/autotest/testcase/nodestat/cases0
@@ -0,0 +1,10 @@
+start:nodestat_noderange
+cmd:nodestat $$CN
+check:rc==0
+check:output=~noping|sshd|install|snmp|pbs
+end
+start:nodestat_err_node
+cmd:nodestat testnode
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/restartxcatd/cases0 b/xCAT-test/autotest/testcase/restartxcatd/cases0
new file mode 100644
index 000000000..21c7d8f6b
--- /dev/null
+++ b/xCAT-test/autotest/testcase/restartxcatd/cases0
@@ -0,0 +1,7 @@
+start:restartxcatd
+os:AIX
+cmd:restartxcatd
+check:rc==0
+check:output=~The xcatd Subsystem was requested to stop
+check:output=~The xcatd Subsystem has been started. Subsystem PID is \d+
+end
diff --git a/xCAT-test/autotest/testcase/reventlog/cases0 b/xCAT-test/autotest/testcase/reventlog/cases0
new file mode 100644
index 000000000..d772ed285
--- /dev/null
+++ b/xCAT-test/autotest/testcase/reventlog/cases0
@@ -0,0 +1,22 @@
+start:reventlog_null
+cmd:reventlog
+check:rc!=0
+check:output=~Usage
+end
+start:reventlog_all
+cmd:reventlog $$CN all
+check:rc==0
+check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+
+end
+start:reventlog_clear
+cmd:reventlog $$CN clear
+check:rc==0
+check:output=~$$CN\s*:\s*clear
+end
+start:reventlog_numofentries
+cmd:reventlog $$CN 5
+check:rc==0
+check:output=~$$CN\s*:\s*.*\d\d/\d\d/\d\d\s*\S+
+cmd:reventlog $$CN 3 | wc -l
+check:output=~\s*3\s*
+end
diff --git a/xCAT-test/autotest/testcase/rinv/cases0 b/xCAT-test/autotest/testcase/rinv/cases0
new file mode 100644
index 000000000..a09285742
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rinv/cases0
@@ -0,0 +1,55 @@
+start:rinv_null
+cmd:rinv
+check:rc!=0
+check:output=~Usage
+end
+start:rinv_bus
+arch:ppc
+cmd:rinv $$CN bus
+check:rc==0
+check:output=~I/O Bus Information
+end
+start:rinv_config
+arch:ppc
+cmd:rinv $$CN config
+check:rc==0
+check:output=~Machine Configuration Info
+check:output=~Number of Processors:\s*\d+
+check:output=~Total Memory \(\w+\):\s*\d+
+end
+start:rinv_serial
+arch:ppc
+cmd:rinv $$CN serial
+check:rc==0
+check:output=~Serial Number:\s*\w{7}
+end
+start:rinv_model
+arch:ppc
+cmd:rinv $$CN model
+check:rc==0
+check:output=~Machine Type/Model\s*:\s*\w{4}-\w{3}
+end
+start:rinv_firm
+arch:ppc
+cmd:rinv $$CN firm
+check:rc==0
+check:output=~Release Level\s*:\s*\w+
+end
+start:rinv_all
+arch:ppc
+cmd:rinv $$CN all
+check:rc==0
+check:output=~I/O Bus Information
+check:output=~Machine Configuration Info
+check:output=~Number of Processors:\s*\d+
+check:output=~Total Memory \(\w+\):\s*\d+
+check:output=~Serial Number:\s*\w{7}
+check:output=~Machine Type/Model\s*:\s*\w{4}-\w{3}
+check:output=~Release Level\s*:\s*\w+
+end
+start:rinv_noderange_err
+cmd:rinv testnode
+check:rc!=0
+check:output=~Error
+end
+
diff --git a/xCAT-test/autotest/testcase/rmdef/cases0 b/xCAT-test/autotest/testcase/rmdef/cases0
new file mode 100644
index 000000000..f719911a4
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rmdef/cases0
@@ -0,0 +1,43 @@
+start:rmdef_null
+cmd:rmdef
+check:rc!=0
+check:output=~Usage
+end
+start:rmdef_t_o_attr
+cmd:mkdef -t node -o testnode,testnode1 groups=all,aix
+check:rc==0
+cmd:lsdef -t node testnode,testnode1
+check:output=~testnode
+check:output=~testnode1
+cmd:rmdef -t node -o testnode,testnode1
+check:rc==0
+cmd:lsdef -t node testnode,testnode1
+check:output=~Could not find an object named 'testnode' of type 'node'.
+check:output=~Could not find an object named 'testnode1' of type 'node'.
+end
+start:rmdef_f_all
+cmd:mkdir -p /tmp/db
+cmd:dumpxCATdb -p /tmp/db
+check:rc==0
+cmd:rmdef -f -a
+check:rc==0
+cmd:XCATBYPASS=yes lsdef -a
+check:rc==0
+check:output!~group
+check:output!~node
+check:output!~network
+check:output!~osimage
+check:output!~policy
+check:output!~notification
+check:output!~eventlog
+check:output!~boottarget
+check:output!~firmware
+check:output!~monitoring
+cmd:XCATBYPASS=yes restorexCATdb -a -p /tmp/db
+check:rc==0
+end
+start:rmdef_t_err
+cmd:rmdef -t testtype -o testnode
+check:rc!=0
+check:output=~Usage
+end
diff --git a/xCAT-test/autotest/testcase/rmvm/cases0 b/xCAT-test/autotest/testcase/rmvm/cases0
new file mode 100644
index 000000000..6f1f63f72
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rmvm/cases0
@@ -0,0 +1,23 @@
+start:rmvm_noderange
+hcp:hmc
+cmd:mkdef -t node -o testnode1,testnode2 mgt=hmc groups=all
+cmd:mkvm testnode1,testnode2 -i $$MaxLparID -l $$CN
+check:rc==0
+cmd:lsvm testnode1,testnode2
+check:rc==0
+check:output=~testnode1:
+check:output=~testnode2:
+cmd:rmvm testnode1,testnode2
+check:rc==0
+check:output=~testnode1:\s*Success
+check:output=~testnode2:\s*Success
+cmd:lsvm testnode1
+check:output=~Invalid nodes
+cmd:lsvm testnode2
+check:output=~Invalid nodes
+cmd:lsdef | grep testnode1
+check:output!~testnode1
+cmd:lsdef | grep testnode2
+check:output!=testnode2
+end
+
diff --git a/xCAT-test/autotest/testcase/rpower/cases0 b/xCAT-test/autotest/testcase/rpower/cases0
new file mode 100644
index 000000000..d4c893377
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rpower/cases0
@@ -0,0 +1,72 @@
+start:rpower_off
+cmd:rpower $$CN stat
+check:ouptut=~Running
+cmd:rpower $$CN off
+check:rc==0
+check:output=~Success
+cmd:sleep 30
+cmd:rpower $$CN stat
+check:output=~Not Activated
+cmd:rpower $$CN on
+cmd:sleep 300
+end
+start:rpower_stat
+cmd:rpower $$CN stat
+check:rc==0
+check:output=~Running
+cmd:rpower $$CN state
+check:rc==0
+check:output=~Running
+end
+start:rpower_boot
+cmd:rpower $$CN off
+cmd:sleep 30
+cmd:rpower $$CN stat
+check:output=~Not Activated
+cmd:rpower $$CN boot
+check:rc==0
+check:output=~Success
+cmd:sleep 30
+cmd:rpower $$CN stat
+check:output=~Running
+cmd:sleep 300
+end
+start:rpower_on
+cmd:rpower $$CN off
+cmd:sleep 30
+cmd:rpower $$CN stat
+check:output=~Not Activated
+cmd:rpower $$CN on
+check:rc==0
+check:output=~Success
+cmd:sleep 30
+cmd:rpower $$CN stat
+check:output=~Running
+cmd:sleep 300
+end
+start:rpower_reset
+cmd:rpower $$CN stat
+check:ouptut=~Running
+cmd:rpower $$CN reset
+check:rc==0
+check:output=~Success
+cmd:sleep 30
+cmd:rpower $$CN stat
+check:output=~Running
+cmd:sleep 300
+end
+start:rpower_noderange
+cmd:rpower $$CN
+check:rc!=0
+check:output=~Usage
+end
+start:rpower_noderange_nodeps
+cmd:rpower $$CN --nodeps
+check:rc!=0
+check:output=~Usage
+end
+start:rpower_err_noderange
+cmd:rpower testnode stat
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/rscan/cases0 b/xCAT-test/autotest/testcase/rscan/cases0
new file mode 100644
index 000000000..e8c8aa68e
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rscan/cases0
@@ -0,0 +1,77 @@
+start:rscan_noderange
+hcp:hmc
+cmd:rscan __GETNODEATTR($$CN,hcp)__
+check:rc==0
+check:output=~lpar\s+\w+\s+\d+\s+\w{4}-\w{3}\s+\w{7}\s+[\w|-]+
+check:output=~fsp\s+[\w|-]+\s+\w{4}-\w{3}\s+\w{7}
+check:output=~hmc\s+__GETNODEATTR($$CN,hcp)__\s+\w{4}-\w{3}\s+\w{7}
+end
+start:rscan_x
+hcp:hmc
+cmd:rscan __GETNODEATTR($$CN,hcp)__ -x
+check:rc==0
+check:output=~[\w-]+
+end
+start:rscan_z
+hcp:hmc
+cmd:rscan __GETNODEATTR($$CN,hcp)__ -z
+check:rc==0
+check:output=~hcp=__GETNODEATTR($$CN,hcp)__
+end
+start:rscan_w
+hcp:hmc
+cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza
+check:rc==0
+cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/$$CN.stanza
+cmd:cat /tmp/$$CN.stanza | mkdef -z
+cmd:rmdef $$CN
+cmd:rscan __GETNODEATTR(testnode,hcp)__ -w
+check:rc==0
+check:output=~lpar\s+\w+\s+\d+\s+\w{4}-\w{3}\s+\w{7}\s+[\w|-]+
+check:output=~fsp\s+[\w|-]+\s+\w{4}-\w{3}\s+\w{7}
+check:output=~hmc\s+__GETNODEATTR($$CN,hcp)__\s+\w{4}-\w{3}\s+\w{7}
+cmd:lsdef -l $$CN
+check:rc==0
+check:output=~hcp=__GETNODEATTR($$CN,hcp)__
+cmd:rmdef $$CN,testnode
+cmd:perl -pi -e 's/testnode/$$CN/g' /tmp/$$CN.stanza
+cmd:cat /tmp/$$CN.stanza | mkdef -z
+cmd:rm -f /tmp/$$CN.stanza
+end
+start:rscan_x_w
+hcp:hmc
+cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza
+check:rc==0
+cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/$$CN.stanza
+cmd:cat /tmp/$$CN.stanza | mkdef -z
+cmd:rmdef $$CN
+cmd:rscan __GETNODEATTR(testnode,hcp)__ -x -w
+check:rc==0
+check:output=~[\w-]+
+cmd:lsdef -l $$CN
+check:rc==0
+check:output=~hcp=__GETNODEATTR($$CN,hcp)__
+cmd:rmdef $$CN,testnode
+cmd:perl -pi -e 's/testnode/$$CN/g' /tmp/$$CN.stanza
+cmd:cat /tmp/$$CN.stanza | mkdef -z
+cmd:rm -f /tmp/$$CN.stanza
+end
+start:rscan_z_w
+hcp:hmc
+cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza
+check:rc==0
+cmd:perl -pi -e 's/$$CN/testnode/g' /tmp/$$CN.stanza
+cmd:cat /tmp/$$CN.stanza | mkdef -z
+cmd:rmdef $$CN
+cmd:rscan __GETNODEATTR(testnode,hcp)__ -z -w
+check:rc==0
+check:output=~parent=[\w-]+
+check:lsdef -l $$CN
+check:rc==0
+check:output=~parent=[\w-]+
+cmd:rmdef $$CN,testnode
+cmd:perl -pi -e 's/testnode/$$CN/g' /tmp/$$CN.stanza
+cmd:cat /tmp/$$CN.stanza | mkdef -z
+cmd:rm -f /tmp/$$CN.stanza
+end
+
diff --git a/xCAT-test/autotest/testcase/rspconfig/cases0 b/xCAT-test/autotest/testcase/rspconfig/cases0
new file mode 100644
index 000000000..d44e21732
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rspconfig/cases0
@@ -0,0 +1,42 @@
+#Need to test later
+start:rspconfig_autopower
+hcp:fsp
+cmd:rspconfig $$CEC autopower
+check:rc==0
+check:output=~$$CEC: autopower: \w+
+end
+start:rspconfig_iocap
+hcp:fsp
+cmd:rspconfig $$CEC iocap
+check:rc==0
+check:output=~$$CEC: iocap: \w+
+end
+start:
+start:rspconfig_time
+hcp:fsp
+cmd:rspconfig $$CEC time
+check:rc==0
+check:output=~$$CEC: Time: \d\d:\d\d:\d\d
+end
+start:rspconfig_date
+hcp:fsp
+cmd:rspconfig $$CEC date
+check:rc==0
+check:output=~$$CEC: Date: \d\d-\d\d-\d\d\d\d
+end
+start:rspconfig_decfg
+hcp:fsp
+cmd:rspconfig $$CEC decfg
+check:rc==0
+check:output=~$$CEC
+check:output=~floating point unit
+check:output=~predictive
+check:output=~system bus
+check:output=~functional
+end
+start:rspconfig_sshcfg
+hcp:hmc
+cmd:rspconfig __GETNODEATTR($$CN,hcp)__ sshcfg
+check:rc==0
+check:output=~__GETNODEATTR($$CN,hcp)__: \w+
+end
diff --git a/xCAT-test/autotest/testcase/rvitals/cases0 b/xCAT-test/autotest/testcase/rvitals/cases0
new file mode 100644
index 000000000..055317a88
--- /dev/null
+++ b/xCAT-test/autotest/testcase/rvitals/cases0
@@ -0,0 +1,40 @@
+start:rvitals_temp
+cmd:rvitals $$CN temp
+check:rc==0
+check:output=~System Temperature
+end
+start:rvitals_voltage
+hcp:hmc,ivm,fsp,ipmi
+cmd:rvitals $$CN voltage
+check:rc==0
+check:output=~Frame Voltages
+end
+start:rvitals_power
+cmd:rvitals $$CN power
+check:rc==0
+check:output=~Current Power Status:\s*(on|off)
+end
+start:rvitals_state
+cmd:rvitals $$CN state
+check:rc==0
+check:output=~System State:
+end
+start:rvitals_lcds
+hcp:hmc,ivm,fsp,ipmi
+cmd:rvitals $$CN lcds
+check:rc==0
+check:output=~Current LCD
+end
+start:rvitals_all
+cmd:rvitals $$CN all
+check:rc==0
+check:output=~System Temperature
+check:output=~Frame Voltages
+check:output=~Current Power Status:\s*(on|off)
+check:output=~System State:
+end
+start:rvitals_noderange_err
+cmd:rvitals testnode
+check:rc!=0
+check:output=~Error
+end
diff --git a/xCAT-test/autotest/testcase/sinv/cases0 b/xCAT-test/autotest/testcase/sinv/cases0
new file mode 100644
index 000000000..9916fb479
--- /dev/null
+++ b/xCAT-test/autotest/testcase/sinv/cases0
@@ -0,0 +1,17 @@
+start:sinv_c_p_t_r_o
+cmd:xdsh $$CN rpm -qa | xdshbak > /tmp/sinv.template
+check:rc==0
+cmd:sinv $$CN -c "xdsh $$CN rpm -qa" -p /tmp/sinv.template -t 2 -r -o /tmp/sinv.output
+check:rc==0
+cmd:cat /tmp/sinv.output
+check:output=~$$CN
+cmd:rm -f /tmp/sinv.template /tmp/sinv.output
+end
+start:sinv_c_s_p_t_o
+cmd:sinv $$CN -c "xdsh $$CN rpm -qa" -s $$CN -p /tmp/sinv.template -t 2 -o /tmp/sinv.output
+check:rc==0
+cmd:cat /tmp/sinv.output
+check:output=~$$CN
+cmd:rm -f /tmp/sinv.template /tmp/sinv.output
+end
+
diff --git a/xCAT-test/autotest/testcase/tabdump/cases0 b/xCAT-test/autotest/testcase/tabdump/cases0
new file mode 100644
index 000000000..b9644b1e7
--- /dev/null
+++ b/xCAT-test/autotest/testcase/tabdump/cases0
@@ -0,0 +1,10 @@
+start:tabdump_table
+cmd:tabdump site | grep xcatiport
+check:rc==0
+check:output=="xcatiport","3002",,
+end
+start:tabdump_d
+cmd:tabdump -d site | grep xcatiport
+check:rc==0
+check:output=~xcatiport
+end
diff --git a/xCAT-test/autotest/testcase/tabgrep/cases0 b/xCAT-test/autotest/testcase/tabgrep/cases0
new file mode 100644
index 000000000..232fae50c
--- /dev/null
+++ b/xCAT-test/autotest/testcase/tabgrep/cases0
@@ -0,0 +1,8 @@
+start:tabgrep_node
+cmd:mkdef -t node testnode groups=all
+check:rc==0
+cmd:tabgrep testnode
+check:rc==0
+check:output=~nodelist
+cmd:rmdef -t node testnode
+end
diff --git a/xCAT-test/autotest/testcase/tabrestore/cases0 b/xCAT-test/autotest/testcase/tabrestore/cases0
new file mode 100644
index 000000000..ec9246705
--- /dev/null
+++ b/xCAT-test/autotest/testcase/tabrestore/cases0
@@ -0,0 +1,13 @@
+start:tabrestore_table
+cmd:tabdump site > /tmp/site.csv
+check:rc==0
+cmd:chtab key=xcatdport site.value=3333
+check:rc==0
+cmd:tabrestore /tmp/site.csv
+check:rc==0
+cmd:tabdump site > /tmp/site1.csv
+check:rc==0
+cmd:diff /tmp/site1.csv /tmp/site.csv
+check:rc==0
+cmd:rm -f /tmp/site.csv /tmp/site1.csv
+end
diff --git a/xCAT-test/autotest/testcase/xdcp/cases0 b/xCAT-test/autotest/testcase/xdcp/cases0
new file mode 100644
index 000000000..c8bd2976e
--- /dev/null
+++ b/xCAT-test/autotest/testcase/xdcp/cases0
@@ -0,0 +1,20 @@
+start:xdcp_src_dst
+cmd:xdsh $$CN rm -f /tmp/hosts
+cmd:xdcp $$CN /etc/hosts /tmp/hosts
+check:rc==0
+cmd:xdsh $$CN cat /tmp/hosts > /tmp/hosts
+cmd:perl -pi -e 's/$$CN: //g' /tmp/hosts
+cmd:diff /tmp/hosts /etc/hosts
+check:rc==0
+cmd:xdsh $$CN rm -f /tmp/hosts
+cmd:rm -f /tmp/hosts
+end
+start:xdcp_P
+cmd:xdcp $$CN -P /etc/inittab /tmp/
+check:rc==0
+cmd:xdsh $$CN cat /etc/inittab > /tmp/inittab1
+cmd:perl -pi -e 's/$$CN: //g' /tmp/inittab1
+cmd:diff /tmp/inittab._$$CN /tmp/inittab1
+check:rc==0
+cmd:rm -f /tmp/inittab._$$CN /tmp/inittab1
+end
diff --git a/xCAT-test/pods/man1/xcattest.1.pod b/xCAT-test/pods/man1/xcattest.1.pod
new file mode 100644
index 000000000..71232d36a
--- /dev/null
+++ b/xCAT-test/pods/man1/xcattest.1.pod
@@ -0,0 +1,122 @@
+=head1 NAME
+
+B - Run xcat test cases.
+
+=head1 B
+
+B [B<-?|-h>]
+
+B [B<-f> I] [B<-b> I] [B<--restore>]
+
+B [B<-f> I] [B<-t> I] [B<--restore>]
+
+B [B<-f> I] [B<-c> I] [B<-l>] [B<--restore>]
+
+=head1 B
+
+This command is used to run xCAT automated test and output the result to /opt/xcat/share/xcat/tool/xcat/result. All test cases is in the directory /opt/xcat/share/xcat/tools/autotest. Now there are some cases for basic function of xCAT. Each case has a unique case name. The cases for I is place in directory /opt/xcat/share/xcat/tools/autotest/I. When xcattest is run with -c , it will run all cases in the specified directory. User can add custom cases in the corresponding directory or add new directory if there is no corresponding directory.
+
+=head1 OPTIONS
+
+B<-?|-h> Display usage message.
+
+B<-f> I
+
+ Read configuration information from the configure file, default configure file is /opt/xcat/share/xcat/tools/autotest/default.conf. See /opt/xcat/share/xcat/tools/autotest/*.conf.template for example.
+
+B<-b> I
+ Comma separated list of file which contains cases which will be run. Default to run all cases.
+
+B<-t> I
+ Comma separated list of cases which will be run. Default to run all cases.
+
+B<-c> I
+ Comma separated list of commands which the related cases will be run. Default to run all cases.
+
+B<-l>
+ Display all available cases.
+
+B<--restore>
+ Restore test environment after test.
+
+=head1 RETURN VALUE
+
+0 The command completed successfully.
+
+1 An error has occurred.
+
+=head1 TEST CASE
+
+The cases is specified as:
+ #required, case name
+ B:case name
+ #optional, precondition
+ B:AIX|Linux
+ #optional, precondition
+ B:ppc/x86
+ #optional, precondition
+ B:hmc/mm/bmc/fsp
+ #required, command need to run
+ B:comand
+ #optional, check return code of last executed command
+ B == or != return code
+ #optional, check output of last executed command
+ B== or != or =~ or !~ I