Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing K6 Dynamic Analysis Tool #54

Merged
merged 16 commits into from
Oct 30, 2024
Merged

Testing K6 Dynamic Analysis Tool #54

merged 16 commits into from
Oct 30, 2024

Conversation

a1inachen
Copy link

@a1inachen a1inachen commented Oct 23, 2024

What?

  • Installed and tested the Grafana K6 dynamic analysis (peformance testing) tool on our team repository.
  • A k6 test script k6-test.js stress tests the traffic to our team's deployed website. The number of virtual users starts at 10 and doubles every 30 seconds until reaching a max of 160 users. We verify that the average failure rate of HTTP requests should be at most 20% and the 95th percentile of HTTP request duration is at most 3 seconds as part of the thresholds check. A run of this test was done locally and is done in the Github deployment workflow actions check.
  • Additionally in the k6-test.js script, we functionaly test the Solved/Unsolved button on our app from User Story 2, verifying that as an instructor (admin), the button toggles between the two states appropriately.

Why?

  • Testing and research of K6 tool. Will evaulate its usefulness in terms of catching our code mistakes for our app, especially in terms of scalability, performance, and functionality.

Installation

Installation of K6 in terminal
Screenshot 2024-10-23 at 2 15 50 PM

  • Command brew install k6 was ran to install K6 locally.
  • Command k6 new k6-test.js was ran to initiate new k6 test script. File identified as k6-test.js

Screenshots of Successful Run

Output of Running K6 Test Script
Screenshot 2024-10-23 at 3 08 01 PM

  • Command k6 run k6-test.js ran

Performance Overview of Run on Grafana Dashboard
Screenshot 2024-10-23 at 3 58 51 PM

@a1inachen a1inachen self-assigned this Oct 23, 2024
@coveralls
Copy link

coveralls commented Oct 23, 2024

Pull Request Test Coverage Report for Build 11584102444

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 82.669%

Totals Coverage Status
Change from base Build 11490161243: -0.003%
Covered Lines: 22371
Relevant Lines: 25637

💛 - Coveralls

Copy link

@bythehills bythehills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installation, workflows, and test file looks good!

Copy link

@dominicteh1 dominicteh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the implementation and PR looks good to me!

Copy link

@Michaelli8899 Michaelli8899 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything looks good, added to workflow file and have a test script

@bythehills bythehills merged commit be18222 into f24 Oct 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants