Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Formula Team Management
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jitka Viceníková
Formula Team Management
Commits
9220af59
There was an error fetching the commit references. Please try again later.
Commit
9220af59
authored
1 year ago
by
Andrej Zabka
Browse files
Options
Downloads
Patches
Plain Diff
Added the manual scenario + uppercase component fix in Notification module
parent
71e4d20e
No related branches found
No related tags found
2 merge requests
!54
Merge develop into main
,
!50
feat(Scenario): Added runnable scenario
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+57
-12
57 additions, 12 deletions
README.md
notification/openapi.yaml
+4
-4
4 additions, 4 deletions
notification/openapi.yaml
with
61 additions
and
16 deletions
README.md
+
57
−
12
View file @
9220af59
...
...
@@ -90,13 +90,6 @@ cd core
mvn
```
or alternatively:
```
bash
cd
core
mvn spring-boot:run
```
To see the running REST api's in action, use CURL or swagger UI:
http://localhost:8090/swagger-ui/index.html
...
...
@@ -174,7 +167,8 @@ docker-compose down
To collect the metrics in an automated way we use Prometheus,
Grafana is used for displaying the most useful metrics.
Both services are running in docker container together with modules.
<br>
Both services are running automatically in docker container together with other modules,
when you run the docker-compose.
<br>
You can check prometheus UI at http://localhost:9090.
<br>
You can see grafana at http://localhost:3000
...
...
@@ -185,11 +179,62 @@ Credentials to log into Grafana are:
-
password
`admin`
Two dashboards are imported automatically, but feel free to experiment and see different metrics.
## Runnable scenario
Before running scenario make sure you have installed
``python``
and
``locust``
module, which can be installed
``pip install locust``
### Steps to run scenario:
To showcase our system, we defined two scenarios:
<br>
-
Engineer, manager and their everyday business
-
Applications module load test
### Engineer, manager and their everyday business
Our system is a management system for a formula 1 team. It is designed to help engineers and manager
to keep track of drivers, car components and current state of the cars. Naturally, this system will
not experience any high loads, so (in the core module) there is no reason to simulate user behaviour
with any kind of script. The best way to test the system is to manually try it.
#### 1. Become a manager of our F1 team (optional)
Navigate to
``/core/src/main/resources/application.properties``
file and add your e-mail address to the
``notification.receivers``
field. You can either delete the address that's already there, or add your own
separated with a comma(,). This means that you will get e-mail notifications same as the manager would.
#### 2. Run all modules
```
bash
docker-compose up
--build
```
Now, all the modules, including prometheus and grafana should be available through your web browser.
Feel free to play around with every module's swagger UI. Ports of all modules are listed above.
<br>
Also feel free to monitor the system through grafana during all the following steps.
#### 3. Log in as an engineer and create a new component
-
Visit swagger UI of core module at http://localhost:8090/swagger-ui/index.html.
-
Check, that without logging in, you are unable to perform any operations, except the /seed and /clear.
-
Log in with the authorize button and select the engineer scope (test_1).
-
Now, you are able to perform only the operations at the
``/carComponent``
endpoint.
-
Create a new component that you just made with your team of engineers at your lab.
-
Log out from the engineer scope.
If you followed step 1, you (as a manager) should also get an e-mail notification about
new component being created.
#### 4. Log in as an manager and create a visualization of a car
-
Log in using a manager scope (test_5), same way as before.
-
Now, you can perform all operations, except POST at /carComponent (only engineers can do that).
-
Check, that the new component created by the engineer is really in the system.
-
Play around with the other endpoints, for example try to change the driver in one of the cars.
(If you cleared the database before, seed it so you don't have to create everything manually)
-
Now call the GET operation on a certain car, this operation returns the car as a JSON directly in the response,
but also calls the Visualization module with that car.
-
Check
``/visualization/output-data``
and you should be able to see a PDF visualization of the car you chose.
-
Hopefully you chose the right components and drivers for your cars. Good luck in the next race.
This scenario showcased the functionality of the Core module and it's communication with Notification and Visualization modules.
### Applications module load test:
This scenario showcases a situation, where lots of people are sending applications to this F1 team.
<br>
At the same time, some admin (someone from HR for example) is randomly accepting/rejecting these applications.
<br>
Before running this scenario make sure you have installed
``python``
and
``locust``
module, which can be installed with
<br>
``pip install locust``
#### 1. Run all modules
...
...
@@ -215,7 +260,7 @@ Adjust ``Number of users`` and ``Spawn rate`` to test different scenarios.
<br>
*Note: !Do not change Host!*
#### 4. Collecting and displaying Metrics
After started swarming in web browser, locust provides several pages to display various data
After started swarming in web browser, locust provides several pages to display various data
.
Feel free to explore them, but two main pages are
``Statistics``
and
``Charts``
If you want to display more complex metrics, do not hesitate to use:
...
...
This diff is collapsed.
Click to expand it.
notification/openapi.yaml
+
4
−
4
View file @
9220af59
...
...
@@ -82,10 +82,10 @@ components:
type
:
string
description
:
Type of a component
enum
:
-
chassis
-
engine
-
frontWing
-
suspension
-
CHASSIS
-
ENGINE
-
FRONTWING
-
SUSPENSION
CarComponentDto
:
type
:
object
title
:
Component
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment