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

[Feature] Add a skip request function #2116

Open
1 task done
davidsebag0705 opened this issue Apr 18, 2024 · 4 comments
Open
1 task done

[Feature] Add a skip request function #2116

davidsebag0705 opened this issue Apr 18, 2024 · 4 comments
Labels
enhancement New feature or request module-scripting

Comments

@davidsebag0705
Copy link

I have checked the following:

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

Describe the feature you want to add

It will be useful to skip a request programmatically for example by testing a variable set by a previous request.
It could be useful to build more complex testing scenario.

Mockups or Images of the feature

This feature exists now in Postman

@davidsebag0705 davidsebag0705 added the enhancement New feature or request label Apr 18, 2024
@end3rbyte
Copy link
Contributor

Yes, it is useful indeed, we also use it in postman.

So it could be the following syntax to be close to postman syntax:

// set a local variable to true
// change to false to see all tests get executed
const skipTest = true;

// this test will always be executed
test("Status code is 200", function () {
    expect(res.getStatus()).to.equal(200);
});

// this test will be skipped when skipTest is set to true
(skipTest ? test.skip : test)('Response time is less than 200ms', function () {
    expect(res.getResponseTime()).to.be.below(200);
});

The skipped tests need to be counted in reports like the failed and passed tests.

JorgeTrovisco pushed a commit to JorgeTrovisco/bruno that referenced this issue May 31, 2024
@bstupid
Copy link

bstupid commented Aug 19, 2024

Looks like this has been built some months ago and awaiting to be merged into the main release. do we need the community to raise this visibility so that it can get prioritized?

@JorgeTrovisco
Copy link

Hi @ben-sai,

As you can see, @martinsefcik has suggested an improvement in the PR. Unfortunately, I haven’t been able to implement it in the past few weeks due to time constraints. However, I believe it would be best to incorporate this improvement before merging, so the feature can be at its best for all of us.

@SPIRIT-00
Copy link

Confirm, important function.

JorgeTrovisco pushed a commit to JorgeTrovisco/bruno that referenced this issue Aug 26, 2024
JorgeTrovisco pushed a commit to JorgeTrovisco/bruno that referenced this issue Aug 26, 2024
JorgeTrovisco pushed a commit to JorgeTrovisco/bruno that referenced this issue Aug 26, 2024
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-scripting
Projects
None yet
Development

No branches or pull requests

6 participants