-
Notifications
You must be signed in to change notification settings - Fork 477
Testing the application
In order to test the application, make sure the application is running.
To test the application you need to open the following web-pages:
Use different ports (described below) when running on Kubernetes.
- The RabbitMQ management dashboard: http://localhost:15672.
- The MailDev inbox: http://localhost:4000.
- The PitStop web-application: http://localhost:7005.
- The Seq logging console: http://localhost:5341.
When running on Kubernetes, the infrastructure services run on different ports, you have to use the following URLs:
- The RabbitMQ management dashboard: http://localhost:30001.
- The MailDev inbox: http://localhost:30002.
- The Seq logging console: http://localhost:30003.
To log into the RabbitMQ dashboard, use the following credentials:
- Username:
rabbitmquser
- Password:
DEBmbwkSrzy9D1T9cJfa
Now you can follow the following scenario (make sure you fill all the fields in the entry-forms):
- Register a new customer on the Customer Management screen.
- Register a new Vehicle for this customer on the Vehicle Management screen.
- Register a couple of Maintenance Jobs for the vehicle on the Workshop Management screen.
Now you've used the basic functionality of the application. We'll test the functionality of the Notification service next.
To test the Notification Service, make sure you have scheduled a Maintenance Job for today. The Notification service reacts to the DayHasPassed event that is normally published by the Time service. But in stead of waiting until midnight, we'll publish such an event using the RabbitMQ Management Dashboard. Open the browser window (or tab) that shows the RabbitMQ Management Dashboard. Go to the Exchanges tab and click the PitStop exchange. Now expand the Publish message part of the screen. To send the correct event, we need to add a header to the message. You do this by adding a header named MessageType and value DayHasPassed. The body (payload) of the message should contain an empty object (defined in JSON):
Now you can push the Publish message button to send the message. If all goes according to plan, the Notification Service will pick up this event, check whether there is a maintenance job scheduled for today (for which no notification has been sent yet) and send a notification email to the customer. This email should be visible in the MailDev in-box:
To test the Invoice Service, make sure you have scheduled a Maintenance Job for today. Now first complete this Maintenance Job on the Workshop Management screen.
The Invoice service reacts to the DayHasPassed event that is normally published by the Time service. But in order to speed this up, we'll publish such an event using the RabbitMQ Management Dashboard. See the description of how to do this under Testing Notifications above.
If all goes according to plan, the Invoice Service will pick up this event, check whether there are any maintenance jobs completed today (for which no invoice has been sent yet) and send an invoice HTML email to Presto Print (a fictitious printing company that will print and snail-mail the invoice to the customer). This email should be visible in the MailDev in-box:
Table of contents
- Startpage
- Functionality
- Solution
- Running the application
- Repository