Systems and methods for a bootstrap mechanism for software execution
A mechanism to acquire and deploy (“bootstrap”) software files, particularly testcase files, across multiple hosts and platforms is provided. A software package is created and a predetermined bootstrap executable file is built into the package. A process on each host on which the software files are to be deployed extracts the bootstrap file and executes it. Each bootstrap executable builds corresponding software files into the software package. The process then extracts the files corresponding to its particular process from the software package.
Latest Patents:
The present invention is related to the following U.S. patent applications which are incorporated herein by reference, and filed concurrently herewith:
Serial No. ______, (Attorney Docket No. AUS9-2003-0279US1) entitled “Systems and Methods for Cooperatively Building Public File Packages”;
-
- Serial No. ______, (Attorney Docket No. AUS9-2003-0126US1) entitled “Systems and Methods for Packaging Files Having Automatic Conversion Across Platforms”; amid
Serial No. ______, (Attorney Docket No. AUS9-2003-0125US1) entitled “Systems and Methods for Synchronizing Software Execution Across Data Processing Systems and Platforms.”
TECHNICAL FIELDThe present invention relates to the field of software automation in data processing systems, and in particular, to the acquisition and deployment of software (which may include executables, data files, instructions, etc.) across multiple hosts.
BACKGROUND INFORMATIONSoftware applications in modern enterprise data processing environments typically constitute many thousands of lines of source code and implement complex functionality. For example, the Apache web server, a widely available, open source web server, comprises at least 80,000 lines of source code. The Linux operating system, exceeds 1.6 million lines of source code. Testing such software products is a time-consuming task. Testing of software involves the invocation of the program functionality, and, typically, validating the correctness of the results of that functionality.
The testing of software includes the execution of one or more testcases which are designed to exercise the operations that implement the functionality of the software under task. The testcases are run to verify that the software under test does not fail for the testcase conditions, and additionally verify that the output generated is correct.
Generally, software testing includes activities that are performed by members of the software development team, and other activities that are automated, that is, performed by another software program.
Data processing systems, particularly in an enterprise environment, typically constitute a networked data processing system in which a set of commonly-accessed resources provide services to a multiplicity of users attached to the network. These services may include electronic mail (e-mail) services, Internet access, distributed computing services, input/output services, such as printing, etc. Moreover, the software deployed to provide such services as well as to access those services may be deployed across a multiplicity of platforms, that is, operating systems. Corresponding thereto, in the testing of a software product, may be desirable to run testcases across multiple hosts and platforms. Such a multihost testcase includes multiple testcase processes. Additionally, multiple testcase processes may run on a single host.
The testcases typically include multiple software files containing executable code and data. The set of files to execute the testcase on a particular host may depend on the host and runtime environment. The runtime environment may include the operating system deployed on the particular host, program environment (byte-code interpreted, such as Java or native) and the results of prior testcase runs.
The acquisition and deployment of the files to effect a particular testcase run on each host may represent a substantial effort in the software test cycle.
Consequently, there is a need in the art for systems and methods to automate the acquisition and deployment of software testcase files, particularly across multiple hosts and runtime environments.
SUMMARY OF THE INVENTIONThe aforementioned needs are addressed by the present invention. Accordingly, there is provided in one embodiment a computer program product embodied in a tangible storage medium for bootstrapping software applications. The program product includes programming instructions for acquiring a file set for an application operable across multiple processes deployed on corresponding hosts. The programming instructions for acquiring said file set comprise a set of instructions in a bootstrap executable file included in a software package. For each host, programming instructions for copying one or more selected files from said file set to the host are included in the program product.
The foregoing has outlined rather broadly the features and technical advantages of one or more embodiments of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention.
BRIEF DESCRIPTION OF THE DRAWINGSFor a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
A mechanism to acquire and deploy (“bootstrap”) software files, particularly testcase files, across multiple hosts and platforms is provided. A software package is created and a predetermined bootstrap executable file is built into the package. A process on each host on which the software files are to be deployed extracts the bootstrap file and executes it. Each bootstrap executable builds corresponding software files into the software package. The process then extracts the files corresponding to its particular testcase (or other application) process from the software package.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention. For example, particular file transfer protocols and file archive formats may be described, however, it would be recognized by those of ordinary skill in the art that the present invention may be practiced without such specific details, and in other instances, well-known circuits have been shown in block diagram form in order not to obscure the present invention in unnecessary detail. Refer now to the drawings wherein depicted elements are not necessarily shown to scale and wherein like or similar elements are designated by the same reference numeral for the several views.
The execution of a testcase across such a multiple hardware multiple platform architecture is mediated by dispatcher 106. The operation of dispatcher 106 will be discussed further hereinbelow. In particular, dispatcher 106 may provide synchronization services with respect to execution of the testcase, as discussed in conjunction with
A testcase may be executed in phases. In any particular phase, execution may be asynchronous across data processing systems and/or platforms. This may be effected using a testcase definition structure 200 illustrated in
Refer now to
In step 302, a file set is acquired from one or more repositories. For the purposes herein, the repository may be an FTP (File Transport Protocol) or HTTP (using the Hypertext Transfer Protocol) file server accessed via the respective transport protocol. Other file repository schemes are the Configuration Management and Version Control system (CMVC), a proprietary revision control system from IBM Corporation, Armonk, N.Y., and the Concurrent Version System (CVS), an open source file revision and control system based on a shared directory architecture. Note that the particular repository mechanisms used do not implicate the present inventive principles, and those of ordinary skill in the art would understand that any such repository may be used in conjunction therewith.
In step 304, process 300 loops over each testcase process. In step 306, the appropriate files are copied to the corresponding host and test run process. That is, in step 306, the files are copied to a directory corresponding to the test run process. Additionally, in step 306, any text file translation that may be necessary is performed (308) and any executable file tagging that is needed (310), based on the host platform and the originating platform for the testcase. Recall that testcases (or other applications) may be distributed across hosts having different operating systems. At least some of these may represent whitespace (particularly, carriage return and linefeed characters, collectively, “hard returns”) in text files differently, and may also tag file types (such as text, binary and executable) files differently. Thus, translation of the hard return and file tagging may be needed to conform the files to the host platform on the host on which the files are being deployed. (Alternatively, code page translation between character sets may be performed.) Mechanisms for automatically performing such translations are described in the commonly-owned co-pending U.S. patent application, Ser. No. 10/______, entitled “Systems and Methods for Packaging Files Having Automatic Conversion Across Platforms,” which is hereby incorporated herein by reference. Process 300 will be described in additional detail in conjunction with
Refer now to
In step 402, testcase metadata is read. Testcase metadata constitutes data about the testcase itself. This may include the location (such as a pathname within a file repository) of a bootstrap file. In step 404, the location of a bootstrap file is acquired. The bootstrap file is an executable which builds the testcase files into a testcase bootstrap package. The testcase bootstrap file may be a shell script or other executable file, such as Java class file. The testcase bootstrap process corresponding to the executable will be discussed in conjunction with
In step 406, a “File Set Assembly Complete Event” is created. This event may be used, as described below, to signal the completion of testcase package builds across a multiplicity of hosts.
In step 408, construction of the bootstrap file package is started. The bootstrap file package may be built using the mechanism described in the commonly-owned, co-pending U.S. patent application, Ser. No. 10/______, entitled “System and Method for Cooperatively Building Public File Packages,” which is incorporated herein in its entirety by reference. In accordance with the mechanism therein, step 408 may be performed by issuing a START PUBPKG command to a public package builder server embodying the public package “builder” mechanism discussed therein. Parameters passed with the START PUBPKG command may be used to specify the package name, a list of builder names and other options, such as an autodelete option, etc. Note that the builder names may be associated with an instance of a testcase bootstrap process described in conjunction with
In step 412, the testcase phase execution testcase builder processes are started. The testcase phase execution testcase builder process is described in conjunction with
Referring now to
In step 501, metadata (such as metadata 206,
In step 502, the testcase bootstrap file built into the public package in step 410,
The bootstrap file is executed in step 504. The bootstrap file may be executed using the command acquired in step 501. As noted above, a bootstrap logic that may be embodied in the bootstrap file will be described in conjunction with
On completion of the execution of the bootstrap file, process 500 blocks on the event created in step 406,
Refer now to
If, in step 601, the runtime environment is to be examined, in step 602, process 600 examines the runtime environment. Note that step 601 need not necessarily be embodied in an explicit conditioned test. Step 601 may be implicit in step 602 in that the determination that a examination of the runtime environment is to be executed may be indicated by the inclusion of a command to perform the operation. In other words, if no command is included in the bootstrap executable to effect the examination of the runtime environment, then, perforce, the “outcome” of step 601 is “false.” The converse is indicated by the presence of such a command. For example, in a Unix platform, the examination of the runtime environment may be performed by a shell command such as uname which may be included in a shell script embodying process 600. Examination of the runtime environment may be useful to effect interoperability of testcases across multiple versions of a software application, for example. Each process may build the corresponding set of files into the testcase package appropriate to the particular version of the application deployed on the target host.
If there are files to build, step 603, process 600 enters a loop over the files in the file set constituting the files for the testcase run. If there are no files to build, process 600 proceeds to step 610, described below.
In step 606, the files are built into the testcase software package. The files may be built into the package by issuing a corresponding build pubpkg command to the public package server. These commands may also determine where in the software package the respective files are stored. As noted above, files stored in the archive may be specified by a file pathname, representing a hierarchy of directories/subdirectories. This may be used to associate the files with a particular testcase execution service via a user-supplied identifier (i.e. name) of the service.
Step 608 closes the loop over files in the file set, and the process breaks out of the loop if the current build corresponds to the last file to be built into the package. If so, the last command may include the “Done” parameter, step 610 and process 600 terminates in step 612.
In an embodiment of the public package mechanism described in the U.S. patent application, entitled “System and Method for Cooperatively Building Public File Packages,” the public package builder server may trigger the event “File Set Assembly Complete” created in step 406,
In an embodiment of the present invention using the phase execution service described in the aforementioned U.S. patent application Ser. No. 10/______ entitled “Systems and Methods for Synchronizing Software Execution Across Data Processing Systems and Platforms, the execution of the testcase processes may then be executed by the respective phase execution services with sequencing of the phases operating as described therein. In this respect, recall that in step 414,
Referring now to
Preferred implementations of the invention include implementations as a computer system programmed to execute the method or methods described herein, and as a computer program product. According to the computer system implementation, sets of instructions for executing the method or methods are resident in the random access memory 714 of one or more computer systems configured generally as described above. In one embodiment, these sets of instructions, in conjunction with system components that execute them may effect the bootstrapping of software applications across multiple hosts and platforms as described in conjunction with
Note that the invention may describe terms such as comparing, validating, selecting, identifying, or other terms that could be associated with a human operator. However, for at least a number of the operations described herein which form part of at least one of the embodiments, no action by a human operator is desirable. The operations described are, in large part, machine operations processing electrical signals to generate other electrical signals.
Though the present inventive principles have been described in the context of a multihost, multiplatform testcase correspondingly distributed across a multiplicity of testcase processes, those of ordinary skill in the art would recognize such a testcase as an exemplar of a scaleable, distributed application. It would be further appreciated by those of ordinary skill in the art that any such distributed application may be “bootstrapped” in accordance with the principles of the present invention, and such embodiments would fall within the spirit and scope of the present invention.
Although the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims
1. A computer program product embodied in a tangible storage medium, the program product for bootstrapping application execution, the program product including programming instructions for:
- acquiring a file set for an application operable across multiple processes deployed on a set of hosts, said programming instructions for acquiring said file set comprising a set of instructions in a bootstrap executable file included in a software package;
- building each said selected file into said software package wherein programming instructions for building each file of said file set into said software package are included in said bootstrap executable file; and
- executing said bootstrap file.
2. The computer program product of claim 1 and further comprising programming instruction for creating an event operable for triggering in response to a completion of an assembly of the software package on each host.
3. The computer program product of claim 1 and further comprising programming instructions for extracting files from the software package onto a corresponding host.
4. The computer program product of claim 1 and further comprising programming instructions for reading metadata to determine a command for executing said bootstrap file.
5. The computer program product of claim 1 and further comprising programming instructions for acquiring a location of said bootstrap executable file.
6. The computer program product of claim 2 and further comprising programming instructions for starting construction of said software package.
7. The computer program product of claim 6 and further comprising programming instructions for building said bootstrap executable into said software package.
8. The computer program product of claim 7 further comprising programming instructions for extracting said bootstrap executable file from said software package.
9. A method for bootstrapping a software application comprising:
- acquiring a file set for an application operable across multiple processes deployed on corresponding hosts, said step of acquiring said file set performed in response to a set of instructions in a bootstrap executable file included in a software package;
- building each said selected file into said software package wherein programming instructions for building each file of said file set into said software package are included in said bootstrap executable file; and
- executing said bootstrap file
10. The method of claim 9 and further comprising creating an event operable for triggering in response to a completion of an assembly of the software package on each host.
11. The method of claim 9 and further comprising extracting files from the software package onto a corresponding host.
12. The method of claim 12 and further comprising reading metadata to determine a command for executing said bootstrap file.
13. The method of claim 12 and further comprising acquiring a location of said bootstrap executable file.
14. The method of claim 11 and further comprising starting construction of said software package.
15. The method of claim 14 and further comprising building said bootstrap executable into said software package.
16. The method of claim 15 and further comprising extracting said bootstrap executable file from said software package.
17. A data processing system for bootstrapping a software application comprising:
- circuitry operable for acquiring a file set for an application operable across multiple processes deployed on corresponding hosts, wherein said acquiring said file set is performed in response to a set of instructions in a bootstrap executable file included in a software package;
- circuitry operable for building each said selected file into said software package wherein programming instructions for building each file of said file set into said software package are included in said bootstrap executable file; and
- circuitry operable for executing said bootstrap file.
18. The data processing system claim of 17 and further comprising circuitry operable for creating an event operable for triggering in response to a completion of an assembly of the software package on each host.
19. The data processing system of claim 17 and further comprising circuitry operable for extracting files from the software package onto a corresponding host.
20. The data processing system of claim 17 and further comprising circuitry operable for reading metadata to determine a command for executing said bootstrap file.
21. The data processing system of claim 17 and further comprising circuitry operable for acquiring a location of said bootstrap executable file.
22. The data processing system of claim 18 and further comprising circuitry operable for starting construction of said software package.
23. The data processing system of claim 22 and further comprising circuitry operable for building said bootstrap executable into said software package.
24. The data processing system of claim 23 and further comprising circuitry operable for extracting said bootstrap executable file from said software package.
Type: Application
Filed: Aug 7, 2003
Publication Date: Feb 10, 2005
Patent Grant number: 7100039
Applicant:
Inventor: Jeffrey Fisher (Austin, TX)
Application Number: 10/637,067