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

TC CLI always returns "Folder not found" #1560

Open
iAmcDiddy opened this issue Jun 14, 2024 Discussed in #1559 · 19 comments
Open

TC CLI always returns "Folder not found" #1560

iAmcDiddy opened this issue Jun 14, 2024 Discussed in #1559 · 19 comments
Labels
CLI feature request New feature or request Priority Implement this asap

Comments

@iAmcDiddy
Copy link

Discussed in #1559

Originally posted by iAmcDiddy June 13, 2024

Update

I tried this in another project that was NOT upgraded to the new schema and it worked.

I have updated to the latest version and am trying to run all requests in a folder.
When I run the --debug command it says 'saveToWorkspace' is undefined (although it's checked in my settings) and also 'customLocation' is undefined.
My project has a 'thunder-tests' folder and all collections defined under that. There is a collection named "Execute_SQL_Query" and a folder in that collection named "Unauthorized". I used the 'tab' to complete the folder names while building the command.
Below is my command prompt, command and result. Any help is greatly appreciated.
image

I have also tried not specifying the thunder-tests folder but got the same error:
image

@rangav
Copy link
Collaborator

rangav commented Jun 14, 2024

Hi @iAmcDiddy the commands should be run from root of the project folder

  1. type cd .. and run the tc --fol command again.

@iAmcDiddy
Copy link
Author

I can't believe that's the fix, I thought I tried everything. So running an individual folder works for me now. I have data files for each folder and using this command picks up the .csv that is associated with that folder (I don't need to use --data-file):
tc --fol "DataDriven-PositiveSpend"
BUT when I try to run the parent collection, it only runs the Request in each Folder once. I would force the 'iterations' in the collection to a number, but each data file has a different number of data points in it (some have 1, some have 4).
Any suggestions on how to get ALL the data to be utilized while running the whole collection?
Many thanks!

This question is related to a closed issue: 1529

@rangav
Copy link
Collaborator

rangav commented Jun 14, 2024

You can only use one data file using the collection/folder run view or using cli argument.

the iterations count is picked up from the rows in data file.

@iAmcDiddy
Copy link
Author

Each folder has their own data file and 'iterations' set correctly.
I can run these commands:
tc --fol "DataDriven-PositiveAssessment" --report html
tc --fol "DataDriven-NegativeAssessment" --report html
but this doesn't work:
tc --fol "DataDriven-PositiveAssessment,DataDriven-NegativeAssessment" --report html

Shouldn't I be able to run multiple folders?

@rangav
Copy link
Collaborator

rangav commented Jun 14, 2024

Multiple folders not supported

Docs
https://docs.thunderclient.com/cli/run-collection

@iAmcDiddy
Copy link
Author

What am I missing? I can't run my (data driven) collection as a collection and I can't run it as folders either.
Can you provide a suggestion? Do I need to resort to running 20 folder-level sets each time? That will use up my 500 collections/month for just this project.

@rangav
Copy link
Collaborator

rangav commented Jun 15, 2024

@iAmcDiddy

can you please verify your subscription by using below form
https://www.thunderclient.com/contact

@rangav
Copy link
Collaborator

rangav commented Jun 15, 2024

Did not understand your question? Please provide more details

The documentation has all the details
https://docs.thunderclient.com/cli/run-collection

What am I missing? I can't run my (data driven) collection as a collection and I can't run it as folders either. Can you provide a suggestion? Do I need to resort to running 20 folder-level sets each time? That will use up my 500 collections/month for just this project.

@iAmcDiddy
Copy link
Author

I have this setup:

Collection 1

Folder 1

...

Folder 12

Collection 2

Folder 1

...

Folder 12

Each folder has a Request and a data file with multiple (~4) sets of data.
Running a Collection won't work even if I pad each data file with the same number of rows and set that number as the iteration on the Collection.
Running each Folder will work, but since there are so many - I will only be able to run the full set maybe once per week because of the limitation on number of collections executed per month.
Is there a better solution than running these at the folder level? Can we get an extension on the number of collections/month until support for running at the collection level as we would like, is supported?

@rangav
Copy link
Collaborator

rangav commented Jun 17, 2024

Multiple data files not supported, only single main data file is supported

alternatively you can skip folders and run selected folders

@cw1934
Copy link

cw1934 commented Jun 21, 2024

@rangav I feel like I'm missing something as to what's preventing this from working. Running Multiple Collections via CLI is supported, and running Multiple Requests is also supported. If multiples of layers both above and below Folders are supported, what is preventing the capability from being added to run Multiple Folders via CLI? It seems like a gap given other supported functionality, and seems like a valid use case given the described folder-specific aspects that come into play with this use case.

@rangav
Copy link
Collaborator

rangav commented Jun 21, 2024

We will add this feature to roadmap and implement asap

@rangav rangav added feature request New feature or request Priority Implement this asap CLI labels Jul 3, 2024
@rangav
Copy link
Collaborator

rangav commented Jul 3, 2024

The feature is implemented in CLI v1.16.0, Please update to latest version.

  • tc --fol 'folNameOrId1,folNameOrId2'

@rangav rangav closed this as completed Jul 3, 2024
@iAmcDiddy
Copy link
Author

The folders are being executed when using the above syntax, it even puts all the results into 1 report. However, each of our folders have data files defined and running them this way does NOT utilize the data from those files. So I would not consider this issue closed/completed.

@rangav
Copy link
Collaborator

rangav commented Jul 3, 2024

Thanks for the feedback,

So, you want them to run independently utilising their own data files and generate separate reports right?

Please confirm above?

@rangav rangav reopened this Jul 3, 2024
@iAmcDiddy
Copy link
Author

Yes, we would like them to utilize the data file associated at the folder level. Ideally they would generate just 1 report (like it does now). Many thanks for looking into this!

@rangav
Copy link
Collaborator

rangav commented Jul 16, 2024

I have published the new version v1.16.1 to run multiple folders. Currently, it will only generate only individual separate reports.

Please test and let me know your feedback.

@iAmcDiddy
Copy link
Author

I've been on vacation, I will look into this ASAP. Thank you.

@iAmcDiddy
Copy link
Author

iAmcDiddy commented Jul 23, 2024

This feature appears to be working. I have one command like
tc --fol 'F1,F2,F3,F4,F5,F6' --env 'Dev'
which executes the requests in each folder using the data file specified at the folder level.
I am noticing 2 low-level bugs that we're working around.

  1. When you change the number of rows in a data file and change the value of 'Iterations' in the Run Collection UI and save it - the new value isn't saved. We have to manually open and edit the _info.json file
  2. There is a table that shows a 'Summary Report' for each folder while executing, then one at the end that shows 1 Total Iteration (which I guess is true) and also Total Requests value of 1, which is incorrect.

Thank you very much for implementing this, we will use it as is and look forward to upcoming improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI feature request New feature or request Priority Implement this asap
Projects
None yet
Development

No branches or pull requests

3 participants