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

Validate existing test script which refer other files #435

Open
ram-gupta opened this issue Jan 25, 2025 · 3 comments
Open

Validate existing test script which refer other files #435

ram-gupta opened this issue Jan 25, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ram-gupta
Copy link

Currently existing script can be validated. Couldn't find a way to validate test script which refer other files in a folder as there is no option to open a folder. Organising test code in multiple files is a common use-case.

Is support for working with folders planned in upcoming release or if its already there can you help understand how to use it?

@Llandy3d
Copy link
Member

Hi, work on a better workspace structure is planned for the future, currently the main support are for tests generated by the application and included in the current structure.

We currently support importing script files separately so for tests separated into multiple files I don't think we have proper way to handle them right now since we are prioritizing tests generated by the application 🤔

@going-confetti
Copy link
Collaborator

Thank you for the issue report @ram-gupta,

As far as I understand, you tried to open the test script using the Open external script button and k6 Studio wasn't able to run it - is that correct?
Image

I'm aware of this problem and will try to fix it.
Without including the script itself, can you elaborate a little bit on how the test code is organized in this case? Do you use CSV/JSON files for data parameterization, import local JavaScript modules, or have some test logic in these other files?

@going-confetti going-confetti added the bug Something isn't working label Feb 6, 2025
@going-confetti going-confetti self-assigned this Feb 6, 2025
@ram-gupta
Copy link
Author

Hi @going-confetti, all of that and the test code is organised something like:

.
├── config/
│   ├── test_options.json
│   ├── test_vars.json
│   ├── test_data.csv
├── auth-sdk/
│   ├── auth.js
├── utils/
│   ├── helper.js
└── k6-test.js (test script)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants