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

Running bruno folder not working from outside the folder #3791

Open
2 tasks done
lisamackul opened this issue Jan 14, 2025 · 6 comments
Open
2 tasks done

Running bruno folder not working from outside the folder #3791

lisamackul opened this issue Jan 14, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@lisamackul
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

The command bru run bruno-tests always returns an error message although the folder is existing. Running a folder only works when I am in the folder on the console and run bru run.

Following are more failing command versions:

  • bru run ./bruno-tests (-r)
  • bru run ./bruno-tests/ (-r)
  • bru run bruno-tests/ (-r)

Error message: You can run only at the root of a collection.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

grafik

@lisamackul lisamackul added the bug Something isn't working label Jan 14, 2025
@mattisking
Copy link

Do you run within the context of something like a pipeline?

For instance if you’re using Azure pipelines you can use -script
To make your bru call. That allows you to set a workingDirectory as part of the setup. Thats how I deal with it.

@ganesh-bruno ganesh-bruno self-assigned this Jan 15, 2025
@lisamackul
Copy link
Author

Yes, I run it in the context of a GitLab pipeline. But I also tested it locally and it didn't work there is well. According to the bruno documentation it's supposed to work without -script locally, right?
The screenshot I provided is from my local terminal, not from the pipeline.

@sreelakshmi-bruno
Copy link
Collaborator

Hi @lisamackul, can you share the directory structure and the command you are using to run the folder? Thanks!

@lisamackul
Copy link
Author

lisamackul commented Jan 15, 2025

@sreelakshmi-bruno Do you mean the folder structure of my project?
On my pipeline I solved it by entering the folder (cd bruno-tests) and then I ran the command bru run --reporter-html bruno-results.html. On my local machine I would have to do the same.
But when I run one of the following commands without entering the folder (locally and on GitLab) it will show the error:

  • bru run bruno-tests
  • bru run ./bruno-tests
  • bru run ./bruno-tests/
  • bru run bruno-tests/

When running those commands I was in the main directory of my project. I also tried adding -r to the commands which also didn't change anything.

Image

@mattisking
Copy link

For Azure here’s the gyst of a template I’ve created for use for running Bruno.

template.yml.txt

@lisamackul
Copy link
Author

Thanks but I don't use Azure. I use the GitLab Pipeline.

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

4 participants