--- title: "Test the application" url: https://docs.catalyst.zoho.com/en/tutorials/newsapp/java/test-application/ description: "Build a web news application that automatically fetches news from a third-party service periodically using the Catalyst Job Scheduling Cron component, and a Job Function and Advanced I/O function coded in Java." last_updated: 2026-08-17T12:16:04Z service: All Services type: tutorial related_links: - name: "Serve Resources" url: /en/cli/v1/serve-resources/introduction/ --- # Test the Application Before you deploy the application to the remote console, you can test the application on a local server and check if everything works fine using the Catalyst CLI. We will first test the cron function using the [functions shell](https://docs.catalyst.zoho.com/en/cli/v1/working-with-functions/functions-shell/) in the CLI, and then [serve the Advanced I/O function and the client locally](https://docs.catalyst.zoho.com/en/cli/v1/serve-resources/introduction/) to test the frontend of the application. Let's first execute the below command to generate a sample payload to pass in the functions shell which we will be accessing later: ```sh catalyst event:generate:job 10108000007982015 // Replace with the required Job Pool ID ``` You can copy the job pool ID from the job pool that was created in [Step 3](https://docs.catalyst.zoho.com/en/tutorials/newsapp/nodejs/create-job-pool) using the Catalyst console. ![job-pool-id](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/job-pool-id.webp) The generated payload will look like this : ![payload](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/payload.webp) Now open the functions shell in your CLI by executing the following command from your project directory (CATALYST_PROJECT_HOME): ```sh catalyst functions:shell ``` This will open the functions shell for the cron function in the CLI where you can test its execution. To invoke the function, enter `NewsFetch()` in the shell, pass the generated payload within the braces and press **Enter**. ![function-invoke-java](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/function-invoke-java.webp) When testing the Job Function using the shell command, the response indicates the execution status of the function, either `success` or `failure`. ![invoke-success-java](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/invoke-success-java.webp) The function's execution status is returned as success. This will make the API call to NewsAPI and fetch the news items from each category, and populate them in the Data Store. You can check the Data Store component if the data has been populated as expected. ![test-datastore-java](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/test-datastore-java.webp) Now, let's host the client component locally and check the frontend of the application. To serve the Catalyst project locally, execute the following command from your project directory (CATALYST_PROJECT_HOME): ```sh catalyst serve ``` The news application will now be served at default port 3000. The local endpoint URLs of the components (the client and the Advanced I/O function) are displayed. > **Note**: Every time you access the homepage or any of the sub-pages of your client or the function, the CLI will display a live log of the URL accessed, along with the HTTP request method. ![catalyst-serve-java](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/catalyst-serve-java.webp) You can now open the application in a browser using the local URL of the client displayed in the CLI. ![serve-output](https://catalyst-docs-development.zohostratus.in/images/tutorials/cron/serve-output.webp) The news application displays the general news headlines on the index page. You can click a topic on the left to check the latest headlines in that category. You can open the original news article by clicking on a headline. If this setup is working correctly, we can deploy the application to the console.