Adding a Custom Configuration Test
To take you step-by-step through the procedure for building a new configuration test, this section takes the help of two examples. In the first example, a descriptor-based test named NetShare will be added, which will report the names of shared folders on a target system, the full path to each of the shared folders, and the user-defined remarks associated with each shared folder. In the second example, a non-descriptor-based test named NetShareCount will be added, which will report the number of shared folders on a target system. This test too will later be associated with the NetShare component-type.
Adding a Descriptor-based Configuration Test
To add a descriptor-based configuration test, first, click the Add New Test button in the integration console - test page (see Figure 2). In the new test details page (see) that appears next, specify the Test name (see Figure 1). For the purpose of our example, set Duplicate flag to No (as the test being added is not a duplicate of any existing IC-based test), set Execution mode to Internal, Port based to Yes, and Test type to Custom.
Figure 1 : Adding a descriptor-based configuration test
Then, click the Add button in Figure 1 to add the new test. Figure 2 will then appear.
Note:
- While adding a configuration test, make sure the Test name ends with _cf_ex. Therefore, the name of the test in our example will be NetShare_cf_ex.
- Using the Integration Console plugin, you can add an internal or an external test, but you cannot add tests that need to be run by a remote agent – i.e., tests that need to be executed in an agentless manner.
Figure 2 : Specifying the parameters of the new test
Since the NetShare_cf_ex test does not take any input parameters, proceed to configure the measures for the test by clicking the Measure tab page in Figure 2.
Figure 3 will then appear. Click the Add New Measure button in the Measure tab page of Figure 3. In the new measure details window that pops up, specify Resource as the name of the first measure in the Measure name text box. This measure will report the full path to the shared folders on a target.
Figure 3 : Configuring the first measure for the configuration test
Then, click the Add button in Figure 3. When you are prompted to add more measures for the test (see Figure 4), click Yes to continue adding measures.
Figure 4 : A message box requesting your confirmation to continue adding measures for the NetShare_cf_ex test
This will invoke Figure 5, wherein you can add the second measure – Remark.
Figure 5 : Adding the second measure of the NetShare_cf_ex test
Click the Add button in Figure 5 to add the second measure. Now, proceed to generate the test. For this, once the Generate tab page appears, specify the directory in which the test’s implementation exists in the input box corresponding to the Class file specification. The test implementation must exist in a Java class file with the same name as the test name – e.g., the implementation of NetShare_cf_ex test in our example must exist in a class file named NetShare_cf_ex.class (see Figure 6).
If the class file is present in a remote location, then you can upload it to the eG manager, by clicking on the Choose button adjacent to the Class file text box. This will invoke a pop-up window using which you can Browse for the class file and specify its location, and click on the Upload button to upload the class file to the eG manager. If the class file has already available on the eG manager system, just specify the location of the file against the Class file text box. Some class files may require certain library files (eg., “.jar” or “.so” (shared object files) files) for their execution. The name of the file along with the directory in which these files exist has to be specified in the Library file specification. Please note that the size of these files should not exceed 0.5 MB in order to prevent excessive load while uploading. If the library file is present in a remote location, then you can upload it to the eG manager, by clicking on the Choose button adjacent to the Library file text box. Note that the Load class file checkbox should be selected if the class file has to be loaded every time the test is implemented. The Load library file checkbox should be selected if the library file has to be loaded every time the test is implemented.
Next, indicate the Database column size of both the configured measures by picking an option from the drop-down list with the same name.
Since the NetShare_cf_ex test in our example is a descriptor-based test, select the Descriptor based test check box in Figure 6. Finally, click the Generate button. In the case of descriptor-based configuration tests, the eG Enterprise system will automatically append a measure named Installed to the list of measures that pre-exist for the test. This is done to enable the test to keep track of the installed status of the descriptors - this way, if a descriptor is removed, then the configuration monitoring module will be able to automatically capture this change and update the change tracker with it.
With that, the new descriptor-based configuration test is added.
Adding a Non-Descriptor-based Configuration Test
To add a non-descriptor-based test, first click on the Add New Test button in integration console – test page (see Figure 2). When the new test details page appears (see Figure 7), type NetShareCount_cf_ex against Test name, for the purpose of our example. Then, set Duplicate flag to No as the test being added is not a duplicate of any existing IC-based test. Next, set Internal as the Execution mode, set the Port based flag to Yes, and Test type to Custom. Finally, click on the Add button to add the new test.
Figure 7 : Adding a new non-descriptor-based test
Figure 8 will then appear. To configure measures for the NetShareCount_cf_ex test, click the Measure tab page in Figure 8.
Figure 8 : Viewing the details of the non-descriptor-based test
When Figure 9 appears, click the Add New Measure button therein to add a measure for the NetShareCount_cf_ex test.
Figure 9 : Clicking the Add New Measure button to add a new measure for the NetShareCount_cf_ex test
Figure 10 then appears. The NetShareCount_cf_ex test reports the count of shared folders on the target system. Therefore, type No_of_share_folders as the Measure name in Figure 10 and click the Add button.
Figure 10 : Configuring the No_of_share_folders measure of the NetShareCount_cf_ex test
When you are prompted to add more measures for the test (see Figure 11), click No to indicate that you have finished adding measures for the test.
Figure 11 : A message box requesting your confirmation to continue adding measures for the NetShareCount_cf_ex test
This will automatically take you to the Generate tab page. To generate the test, by specifying the full path to the Class file that holds the test’s implementation logic.
Figure 12 : Generating the non-descriptor-based test
The test implementation must exist in a Java class file with the same name as the test name – e.g., the implementation of NetShareCount_cf_ex test in our example must exist in a class file named NetShareCount_cf_ex.class (see Figure 12).
If the class file is in a remote location, then you can upload it to the eG manager, by clicking on the Choose button adjacent to the Class file text box. This will invoke a pop-up window using which you can Browse for the class file and specify its location, and click on the Upload button to upload the class file to the eG manager. If the class file has already available on the eG manager system, just specify the location of the file against the Class file text box. Some class files may require certain library files (eg., “.jar” or “.so” (shared object files) files) for their execution. The name of the file along with the directory in which these files exist has to be specified in the Library file specification. Please note that the size of these files should not exceed 0.5 MB in order to prevent excessive load while uploading. If the library file is present in a remote location, then you can upload it to the eG manager, by clicking on the Choose button adjacent to the Library file text box. Note that the Load class file check box should be selected if the class file has to be loaded every time the test is implemented. The Load library file check box should be selected if the library file has to be loaded every time the test is implemented.
Next, indicate the Database column size of the configured measure.
Since the NetShareCount_cf_ex test in our example is a non-descriptor-based test, just click the Generate button to generate the test.