Best practices for managing k6 test cases and dependencies across repositories

Hi,

I have a question regarding best practices for managing k6 test cases. To scale our performance testing efforts, I’m considering setting up a dedicated repository to store common functions that can be reused across multiple test cases, helping to avoid duplicated code.

However, our product teams prefer to keep performance test cases within their application repositories, close to the application code. Since most of our applications (95%) are Java-based and managed via Maven, this raises a few concerns about managing dependencies:

  1. How can I keep k6 scripts clean and scalable when test cases are stored in different repositories but need to call common functions stored in a dedicated repository?
  2. Does k6 support npm for package management, and if so, is this the recommended approach?
  3. Is there a way to integrate k6 scripts with Maven for dependency management?

Any advice or suggestions on how to effectively manage these dependencies and keep the testing framework organized would be greatly appreciated.

Thanks in advance!