Testing the caching component
In this section, you deploy the module to the test server and verify that the service behaves as expected.
- On the Assembly Diagram, right-click CachingComponent and select Test Component. The Integration Test Client pop-up opens.
- In the Initial request parameters panel, populate the
Country field of the request
object with the value of INDIA, as shown in
Figure 16. Verify that the Integration Test
Component contains the parameters as shown in Figure 16.
Figure 16. Test the caching component
- Continue the test by selecting the deployment location and click Finish. At this point, your test server starts and your module is deployed automatically.
- For the first run, the Java component fetches the country details
for INDIA from the properties file. It then
inserts the details into DynaCache. For any subsequent runs, it
reads the country details for INDIA from DynaCache. Verify the
response Business Object as shown in Figure 17.
Figure 17. View the output of the caching component
- Verify via the console, which is shown in Figure 18, that the
country details were fetched from the properties file and inserted
into the cache.
Figure 18. Verify the console for the properties file fetch and cache insert
- Rerun the same scenario and use the console (see Figure 19) to
verify that for this run, the country details were fetched
directly from the cache due to the insertion in the previous step.
Figure 19. View the console for the DynaCache fetch message
Note: You can test the module with different input data for the Country field based on the properties file.