You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project grew out of wanting to prepare for an interview for a job that would have focused on Angular. As I had been using React exclusively for several months, I needed to refresh my Angular skills. Then I began to add more things to make up for my focus on AWS Amplify. The result is in some ways the opposite of what I have in my previous videos:
6
6
@@ -10,10 +10,12 @@ This project grew out of wanting to prepare for an interview for a job that woul
10
10
* REST (using a NodeJS/Express backend) vs GraphQL (using Amplify and AppSync)
11
11
* This project has nothing in regard to authentication (yet), while the Amplify project implemented authentication right at the beginning.
12
12
* AWS infrastructure is set up and maintained using Terraform. That is obviously different from the approach AWS Amplify takes.
* CI/CD (continuous integration/continuous deployment) workflow using GitHub Actions.
14
14
15
15
Also, in the Amplify project I haven't yet implemented any automated testing but in this project I have unit and integration tests. I set up a GitHub Workflow with GitHub Actions to run the tests when there is a push to or a pull request on specified branches.
16
16
17
+
As of February 2025, there is a load testing using k6 in the GitHub workflow.
18
+
17
19
This project is Dockerized, and I developed it in a devcontainer.
18
20
19
21
## Devcontainer
@@ -130,6 +132,7 @@ A lot of `ci.yml` is self-explanatory but here are some notes to help clarify so
130
132
* And finally zips up everything.
131
133
* **Update Lambda migration function**: Updates the AWS Lambda function code for database migrations using the AWS CLI. The workflow waits for the update to be completed before the function is invoked.
132
134
* **Build and push frontend Docker image**: Note that this step uses a Dockerfile in the root of the project, rather than the Dockerfile in the frontend directory. I wanted to keep the Dockerfile in the frontend directory for local development purposes, e.g., `frontend/Dockerfile` uses the Angular server and port 4200.
Copy file name to clipboardExpand all lines: backend/load-test.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@ import http from 'k6/http';
2
2
import{check,sleep}from'k6';
3
3
4
4
// Possible test types include smoke, stress, spike, soak and load.
5
-
// Smoke: verify system can habdle a minimal load w/o issues.
6
-
// Stress: determine breaking point by increading number of VUs until the API starts returning errors or response times degrade significantly.
5
+
// Smoke: verify system can handle a minimal load w/o issues.
6
+
// Stress: determine breaking point by increasing number of VUs until the API starts returning errors or response times degrade significantly.
7
7
// Spike: test how the system handles sudden spikes in load. A sudden increase in the number of VUs to simulate a traffic spike, followed by a return to normal load.
8
8
// Soak (endurance): test the system's stability and performance over an extended period. Running a constant load for several hours or days to identify memory leaks or performance degradation over time.
9
9
// Load: test the system under expected peak load conditions. Running a constant load for a period of time to verify that the system can handle the expected number of users.
0 commit comments