Skip to content

Tool/k6 load test for dynamic testing #147

Open
lsharma-21 wants to merge 66 commits into
mainfrom
tool/k6-load-test
Open

Tool/k6 load test for dynamic testing #147
lsharma-21 wants to merge 66 commits into
mainfrom
tool/k6-load-test

Conversation

@lsharma-21

Copy link
Copy Markdown

Testing out a tool for checking the performance and scalability of the code, it is measuring the latency and response time of the server it tests the load it can work under

Dynamic Testing

Tool integration can be seen in :
tests/k6/nodebb-smoke.js for running script that can be updated as needed
node_modules/k6 where k6 was installed
tools/k6 where the k6 was also installed

Artifacts of successful tool run can be seen in outputs/k6-outputs.txt (https://github.com/CMU-313/nodebb-spring-26-98k/blob/tool/k6-load-test/outputs/k6-output.txt) this is also a screen shot of it:
Screenshot 2026-03-12 at 9 03 50 PM

Pros:

  • The test was easy to write and should also be easy to update based on needs
  • Installing the program was also fairly easy
  • The test runs very fast and gives a fast output regarding latency and time
  • The fact that it tests the load that it can withstand can be helpful for websites such as NodeBB that are designed to be able to handle a lot of traffic from students on campus

Cons:

  • The output isn't very thorough regarding what it is actually doing
  • When I had any errors, it only said error and didn't give me much information on where the error just what it was, so figuring out issues and errors was a bit difficult
  • It doesn't really check the content of the code itself, just in terms of if it's working under certain conditions which can be helpful, but the code can still be wrong and work under those conditions so it would need to be tested alongside other static tests as well

Q2L2 and others added 30 commits February 8, 2026 19:38
…here I needed to ad everything and rerouted the inital compser file to the one that i added into vendor
Adding HTML and CSS for a make visible to  staff-only Button
Added Mark Endorsed Button to the posts' tools dropdown menu
Anonymous button front-end implemented
Mr-Weather and others added 29 commits February 26, 2026 20:16
Anonymous button fully implemented. 
Coverage error persisting, but besides that all tests are passing.
feat: complete backend question status implementation
Change the button formatting so that on click it becomes red/white so that users know which state it is in
Completed implementing the backend for the endorse post button as a new feature for the topics tools.
The staff only button was implemented such that if clicked other users except admin and poster cannot see the post
Added Endorse Topic Feature user guide to UserGuide.md, explaining how to use the feature as an admin and how to conduct user-testing on the feature.
Added documentation for the Staff Only Post feature,
Document Staff Only Post feature and user testing
Add user configuration to NodeBB service (reci 7)
@lsharma-21

Copy link
Copy Markdown
Author
  • What is the name and high-level description of what the tool does? Provide a link to its documentation/source.
    K6 is a Load and performance testing tool that uses spike, stress, or soak tests to test the performance of the application. Spike testing checks if the system performs under massive rushes of utilization for a short period of time. Stress tests how the system performs under heavier loads for a medium period of time. Soak testing the tests for a very long period of time and checks the system’s degradation of performance as well as the systems stability during this time. ( https://grafana.com/docs/k6/latest/ )

  • Is the tool used for static or dynamic analysis?

Dynamic Analysis

  • What types of problems does this particular tool catch?

This tool detects performance and reliability issues, seeing how well the application can work under large loads and sudden spikes which is something that would have to be tested for a website used for school purposed such as NodeBB where if there is an announcement is made, there may be a surge of students asking questions or accessing the website.

  • What types of customization are possible or necessary?

It is customizable in the sense that you can test the load and reliability in different ways such as a spike in users, like with a spike test, a soak tests where you see how well it works for an extended period of time under load and all these are things that are customizable through javascript and creating the test yourself as was done in this PR in nodebb-smoke.js

  • How can/should this tool be integrated into a development process?

You could automate the tests in the CI/CD pipeline or run the test before final deployment due to the fact that you will need to know how well the application will run under an influx of users. It was fairly easy to integrate into the application with just having to download a few pre made applications and running the program and in my case using an already-made easy test however that can be easily updated as needed

  • Are there many false positives? False negatives? True positive reports about things you don't care about?

There aren't many false positives or negative issues that may arise from creating tests that don't actually have the right load for the website, either underestimating it or overestimating the load and getting results that aren't helpful to the actual application itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants