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.

To serve the Catalyst project locally, execute the following command from your project directory:

copy
$
catalyst serve
catalyst_tutorials_jobscheduling_serve_1

The Birthday Greetings application will now be served at default port 3000. The local endpoint URLs of the components are displayed.

catalyst_tutorials_jobscheduling_serve_2
Info: Every time you access the home page 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.

You can now open the application in a browser using the local URL of the client displayed in the CLI.

catalyst_tutorials_jobscheduling_serve_3

Sign Up/Sign In

When you serve the application, the first page you will encounter is the Sign In page. Since you have not signed up for the application, click the Sign Up option.

catalyst_tutorials_jobscheduling_serve_auth_first_page

Provide the required details and click the Sign Up button.

catalyst_tutorials_jobscheduling_serve_auth_signup_page
Note: Ensure that you create the account in a manner that satisfies the authentication logic you coded in the Custom User Validation function.

You will have to verify your account using the link sent to you via email. The content of the email will be the one you configured using the Email Templates feature.

catalyst_tutorials_jobscheduling_serve_auth_signup_email_verification

Once you click the link, you will be asked to create a password.

catalyst_tutorials_jobscheduling_serve_auth_confirm_pwd

Your account will be registered to the application, and this can be confirmed in the User Management section in the Authentication component. You will also be able to see that the App User role will be assigned to the account.

catalyst_tutorials_jobscheduling_serve_auth_user_mgmt

You will now be able to access the application.

Create Greetings

Enter the required details in the client app and click Submit to create the required greeting.

catalyst_tutorials_jobscheduling_serve_submit_job

This action will have created a Dynamic Cron in the Job Scheduling service. Navigate to the cron component present in the Job Scheduling service to view the cron details.

catalyst_tutorials_jobscheduling_serve_cron_created

Click the cron to view its details.

catalyst_tutorials_jobscheduling_serve_cron_dets

From these details, we can understand that the cron has been scheduled to submit a job to the job pool at 12 AM on the date of the birthday. However, for our testing purposes, you can click the Submit Job button to submit a job to the job pool instantly.

catalyst_tutorials_jobscheduling_serve_cron_submit_job

You can check the status of the job by clicking the Execution History button.

catalyst_tutorials_jobscheduling_serve_cron_job_logs
Info: If a failure status occurs, click the View Logs button. This will direct you to the Logs component present in the Catalyst DevOps service where you can view detailed logs to aid your debugging process.

Now if you check the email configured as the receiver, you will have received the birthday wish from the sender email address you configured using the Mail component.

catalyst_tutorials_jobscheduling_serve_cron_success

Manage Reminders

You can click the Greetings List button to view the list of reminders you have configured.

catalyst_tutorials_jobscheduling_serve_list_reminders

You can edit the reminders by clicking the Edit button.

catalyst_tutorials_jobscheduling_serve_lmodify_remidners

Click Update to apply the required changes.

You can disable the cron by clicking the toggle to disable the wish from being sent out. You can also delete the greeting by clicking the Delete button.

catalyst_tutorials_jobscheduling_serve_del_reminders

All the changes made in the application will be reflected in the Data Store, and the cron will be adjusted accordingly.

The application is now working as intended.

Last Updated 2025-04-01 11:10:20 +0530 +0530