Ui Testing
In this lesson, we'll test our list ticket endpoint through the user interface.
Setting Up the Environment
Before testing through the UI, we need to ensure our application is running correctly:
- Start by building the backend with Maven:
mvn clean compile- Run the Spring Boot application.
Testing Through the Browser
Let's walk through the testing process in the browser:
-
Open your application's UI in your browser.
-
Log in using an attendee account that has previously purchased tickets.
-
Navigate to the dashboard, which should automatically redirect to the list tickets page.
Inspecting the Network Calls
Using the browser's developer tools, we can examine the API calls being made:
-
Open the Network tab in your browser's developer tools.
-
Refresh the page to see the network requests.
-
Look for calls to
/api/v1/ticketswhich should include:
- Page information in the request
- Response containing ticket
id,status, andticketType
Summary
- Tested the list ticket endpoint using the user interface