• Keine Ergebnisse gefunden

7. Testing and Evaluation

7.1. Framework Functionality Tests

91 | P a g e

92 | P a g e

Figure 7.1: Application front page version 1

It can therefore be concluded that facelet resources can be resolved in the new framework regardless of where they are located within an application. Furthermore, resources like images and style sheets (CSS) are also resolved by the framework.

7.1.2. JSF functionality

In order to test the functionality of Managed Beans228, the facelets of the de.clintworld.clintweb.ui bundle was made to reference Managed Bean properties. User inputted information on JSF UI components (e.g. Radio button and text boxes) and the inputted values were stored in Managed Beans. Figure 7.2 shows a facelet in the de.clintworld.clintweb.ui bundle which contains text boxes where users can input text which is stored in a Managed Bean object on the server side.

228See section 2.2

93 | P a g e

Figure 7.2: Storing values in Managed Beans

Text was inputted on the text boxes shown above and by clicking on the button; the text was stored in a Managed Bean. The stored information was displayed on another facelet which can be navigated to by clicking on the button.

For testing the Navigation Rules functionality, the home page contains a link which prompts a Navigation Rule to be executed. When this link was clicked, the application was able to successfully navigate to the facelets specified by the Navigation Rule.

Custom components229 were also implemented in the application. A radio button component (Figure 7.3) was created and declared on a facelet to display values stored in a Managed Bean.

Figure 7.3: Custom component

As seen in Figure 7.3, the values inputted in the facelet displayed on Figure 7.2 were used by the custom radio button component. Users were able to select one of the values displayed by the Radio buttons component. By clicking the button, the selected radio button value was

229See section 6.2.4.3

94 | P a g e

stored in a Managed Bean. The framework was additionally able to resolve custom UI components located in application bundles other than the core bundle.

According to the tests conducted in this section, it can be concluded that JSF components are fully functional in the new framework. Application bundles can provide Managed Beans, Navigation Rules and Custom Components which can be resolved by the framework.

7.1.3. Dynamic Bundles

Figure 7.4 shows the UI of the administrator software230 which was created for managing application bundles within the Equinox - Jetty Framework231. The administrator functions are displayed in the middle panel of the application window.

Figure 7.4: Administrator application

When the framework is started, the active bundles are displayed on the list on the left panel of Figure 7.4. The panel on the right side specifies bundles which are INSTALLED, STOPPED or RESOLVED. The button is for hot swapping232 bundles which are of the same name but different versions. In order to test the swapping of bundles feature, the de.clintworld.clintweb.ui bundle version 1.0.0.2 was swapped out and the bundle version 1.0.0.1 was swapped in. When bundles are being swapped, user requests are delayed until the swapping process is done. In this test, the bundle swap process was quick; therefore active users were not able to notice any delays in the application response. They noticed the

230See section 5.8

231 See section 3.2.2.1

232See section 3.1

95 | P a g e

immediate effects233 of the bundle swap, which was represented by the change in the facelets layout and style.

When the framework was started, if the user requested the application home page, the facelet in Figure 7.1 would be displayed. However after the bundle swapping process, upon requesting the home page, the following facelet was displayed:

Figure 7.5: Home page version 2

Figure 7.5 shows that the above facelet is different from the one shown in Figure 7.1. The text has changed and there is an additional panel on the right side of the facelet. The facelet in Figure 7.1 belonged to the de.clintworld.clintweb.ui version 1.0.0.2 which was replaced by the bundle version 1.0.0.1. The facelets in both bundle versions have the same name (view ID234) but their contents are different as shown in Figure 7.5.

After the bundle swap, the user inputted information contained in the Managed Beans belonging to the swapped out bundle was restored into the swapped in bundle. The name of the facelet shown in Figure 7.6 is the same as the facelet shown in Figure 7.3; however the contents in the facelets are different:

233The term “immediate effects” means that the effects were seen right after clicking on a button or refreshing the page. It does not mean “automatically“ (via Javascript)

234See section 2.3

96 | P a g e

Figure 7.6: User input data page version 2

It can be seen in Figure 7.6, that the information in Figure 7.3 has been restored in the newly installed bundle. Furthermore, the table on Figure 7.6 contains a new column called ‘provider’

which is not available in the table in Figure 7.3. The addition of this new column corresponds to the fact that the data structure of the new Managed Bean class is different from the data structure of the Managed Bean class contained in the bundle version 1.0.0.2. The new Bean class contains more functionality as compared to the Bean in the bundle version 1.0.0.2. In order to preserve the Managed Beans belonging to a bundle. The core bundle contains a configuration page where the user can specify whether the Managed Beans should be preserved on the disk or on the application memory (RAM). The following figure shows the configuration page:

Figure 7.7: Configuration page

97 | P a g e

The check box in Figure 7.7 specifies whether session objects are stored on the disk under a specified directory or application memory.

According to the tests conducted in this section, it was concluded that bundles can be swapped in and out of an application without disrupting a user’s interaction with the application. Managed Beans in swapped out bundles which contain user data are always restored in a swapped in bundle. The Managed Bean restoration process is successfully able to adapt to changes in the class structure of a Managed Bean during the Bean restoration process.