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

Add --beforeEach flag for running specific requests before every test in CLI #3665

Open
1 task done
ganesh-bruno opened this issue Dec 16, 2024 · 0 comments
Open
1 task done
Assignees
Labels
enhancement New feature or request module-cli

Comments

@ganesh-bruno
Copy link
Collaborator

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

I need a way to ensure that authentication is set up before each test when running individual tests, without duplicating the authentication logic in each test file.

Currently, when running the full test suite, authentication works as expected because it is triggered at the start. However, when I run individual tests in isolation, I need to manually include authentication logic in each request, which leads to unnecessary duplication of code.

Looking for a way from the CLI to have some sort of a --beforeEach flag to run a specific request before every test, as all tests / api endpoints are authenticated.

Mockups or Images of the feature

Example: bruno --beforeEach "POST /auth/login" test/specificTest.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module-cli
Projects
None yet
Development

No branches or pull requests

2 participants