Installer Dev Tests Automation framework Author: Sathyan Catari(Sathyan.Catari@oracle.com) Date: 11/22/2010. 1. IntroductionThis document details the testing infrastructure created for 3.1 GlassFish installer using Abbott tools. The intention of this document is not to introduce the GlassFish installer, Junit and automated test infrastructure, abbott. The reader is assumed to have a good understanding of GlassFish 3.1 installer and knowledge of Junit and abbott are required to develop test cases. 2. Purpose/Objective of this frameworkAutomate the process of installing GlassFish 3.1 installation programs(covering all bundles) in Graphical user interface mode by capturing the user input as abbott scripts and later running them. 3. Out of scopeUsing the procedure explained in this doc, one should be able to run the installers in various scenarios(covering different use-cases) without any intervention. This procedure replaces existing install procedure in the overall test suite. It does not substitute the pre-install test related environment setup and post-install validations. 4. How do I run these tests?Follow these steps 4.1. cvs :pserver:<userid>@jescvs.sfbay.sun.com:/m/jws get appserver-sqe/pe/installer/gui 4.2. Update appserver-sqe/pe/installer/gui/glassfish.properties. Refer to the table below for details on the properties stored in this file. glassfish.properties
4.3. Use the appropriate test script available under appserver-sqe/pe/installer/gui/src/test/xml. Refer to the table below for the scenarios supported by the currently checked in scripts. NOTE: These scripts read GlassFish specific properties from appserver-sqe/pe/installer/gui/glassfish.properties. Available Testing scenarios.
4.4. Run test here refers to running a single scenario from the table above. Running for each scenario involves three steps. Step 1). Make sure that you update appserver-sqe/pe/installer/gui/glassfish.properties with appropriate values Step 2). setup the pre-installed environment for the tests to run by running the following command from "appserver-sqe/pe/installer/gui" directory ant -Dtmpdir=<Provide any writable directory as a temporary directory> -Dtest.script=<Pick a script that matches your scenario from the table above> setuptest Ex: ant -Dtmpdir=/tmp -Dtest.script=Typical_Install.xml setuptest Step 3). Run the actual test scenario by running the following command from "appserver-sqe/pe/installer/gui" directory ant -Dtmpdir=<Provide any writable directory as a temporary directory> -Dtest.script=<Pick a script that matches your scenario from the table above> runtest Ex: ant -Dtmpdir=/tmp -Dtest.script=Typical_Install.xml runtest 5. Filelayout of Testing infrastructureThe source code is rooted under CVS as :pserver:<userid>@jescvs.sfbay.sun.com:/m/jws appserver-sqe/pe/installer/gui 5.1 Files/Directories of significanceappserver-sqe/pe/installer/gui/build.xml(Top level build.xml that contains various build/test related ant targets) appserver-sqe/pe/installer/gui/build/glassfish.properties (Properties file that contains both environment and GlassFish related properties to be set by user as a pre-run step) appserver-sqe/pe/installer/gui/openinstaller.properties(Generated by the build scripts, overwritten for every use, internal use only, not to be edited by users) appserver-sqe/pe/installer/gui/src/java/com/oracle/glassfish/installer/test(Test framework entry point) appserver-sqe/pe/installer/gui/src/test/xml(Location where abbott test scripts, *.xml are searched for by framework) appserver-sqe/pe/installer/gui/lib(Libraries used by the framework including abbott specific ones) appserver-sqe/pe/installer/gui/build(Output of Java compilation) appserver-sqe/pe/installer/gui/util(Framework utilities) appserver-sqe/pe/installer/gui/results(Results of the run are recorded here, to be extended to have meaningful results in future releases of GlassFish) 6. ReferencesAbbott Test framework: http://abbot.sourceforge.net/doc/overview.shtml |