usebruno / bruno-docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation Site for Bruno
Home Page: https://bruno-docs.vercel.app
License: MIT License
Documentation Site for Bruno
Home Page: https://bruno-docs.vercel.app
License: MIT License
Hello,
I try to migrate my API tests scripts from postman
I have a lot with a test which valid the Json shema of the response.
In Postman I wrote this like that
var schema =
{json model schema}
;
const response = pm.response.json();
pm.test('Schema is valid', () => {
pm.expect(response).to.have.jsonSchema(schema);
});
and it doesn't work with Bruno
I have seen a solution in https://medium.com/@jagdalebr/brunos-api-adventure-7937abb70d47
const Ajv = require('ajv');
const ajv = new Ajv();
const schema =
{json model schema}
test("should be able to validate JSON", function() {
const data = res.getBody();
const valid = ajv.validate(schema, data);
expect(res.getStatus()).to.equal(200);
expect(valid).to.be.true;
if (!valid) console.log(ajv.errors);
});
Is it possible to intégrate this to the Import from postman tool and the Bruno's translator ?
Thanks
Hey, on every page there is an "Edit this page" Link. But clicking on it results in "not found" error. Best, Nikita
https://github.com/usebruno/bruno-docs/src/pages/bru-cli/overview.mdx
Not Found
Hello,
Today I tested version 1.17.0
At collection level I did the setup of OAUTH Authorization Code Grant Type. Getting an access token works well. At API level I set "Auth" to "Inherit". Then I see message "You need to use scripting to set the access token in the request headers.".
From there I'm stuck. What am I supposed to do?
Regards,
Serge
Hello,
this page says there are 2 options for formatting -f "json" (which is standard) and -f "junit" (btw, maybe you could an example "--output filename.xml -f "junit" to the page)
But what about "html"? I saw some tutorials about it and the Google AI assistant Bard also told me about the "html" option. Is the documentation up-to-date?
2.But still I see errors
Is this an error in the report or on my side? More documentation about this would be helpful.
Thanks.
Best,
Nikita
there's a problem with this feature, it doesn't pass the file through to the api
I have this project i was working on
@UploadedFile() file: Express.Multer.File,
// @Res() res: Response,
) {
try {
if (file) {
console.log(file);
} else {
console.log('Error uploading file');
console.log(file);
// throw new Error("File didn't get uploaded");
}
} catch (error) {
console.log(error);
// res.status(400).send({ error: error.message });
}
}
using nestjs, i tried to send a file using the multipart form, it was just giving errors.
Documentation for Environment Secrets usebruno/bruno#199
How to use Filter with JSONPath field in response section. Any specific format in which we should use filters
How do I use browser cookies as part of my collection? I want to add a browser cookie but I can't figure out how to do it. The docs don't give any detail. See this PR:
I am wondering how to handle an environment or collection variables in assert. I also cannot seem to get nested variables to work either. CompoundVar does not have the expected value of 123-456
I have the following case and the first assert fails as an assert but passes as a test. I believe it is because the first variable references an environment variable.
vars {
AuthIdentityId2: f38536f7-5aa8-e611-9965-f0921cdc2c4d
AuthIdentityId: {{process.env.QA_AuthIdentityId}}
BaseVar: 123
CompoundVar: {{BaseVar}}-456
}
assert {
res.body.Id: eq {{AuthIdentityId}}
res.body.Id: eq {{AuthIdentityId2}}
}
test("Validate Data", function() {
const body = res.getBody();
expect(body.Id).to.equal(bru.getEnvVar('AuthIdentityId'));
expect(body.Id).to.equal(bru.getEnvVar('AuthIdentityId2'));
}
I have several collections that rely on the use of authentication tokens that are specific to each developer and may not be shared or committed to version control.
Being able to load these tokens from the system environment (process.env) would support my needs for local usage as well as future usage on CI/CD pipeline.
Relates to usebruno/bruno#170
Question, how are the secrets managed internally? Does Bruno use the keystore of the underlying OS?
The page https://docs.usebruno.com/secrets-management/hashicorp-vault/overview#using-secrets-in-bruno
has a link leading to Using secrets in Bruno which does not open anything - leads to same page.
I belive it should lead to:
https://docs.usebruno.com/secrets-management/hashicorp-vault/using-secrets
The links "response" and "response query" return 404
The link to "Response" and "Response Query" are broken. I didn't look at other pages in documentation to see if more links are impacted; if the overall structure of documentation changed then it's very possible that more links have been broken.
The res object is available, allowing you to declaratively parse the response and set variables, instead of writing scripts to do the same.
For parsing the response, you can checkout the response query that allows you to easily query your response.
The res object is available, allowing you to declaratively parse the response and set variables, instead of writing scripts to do the same.
For parsing the response, you can checkout the response query that allows you to easily query your response.
I get a 404 when clicking the Edit button, so presumably that's either broken or I don't have permission to edit the page.
I love this tool, the privacy it provides, and the fact that it is open source, but I would like to have a further idea on how does Bruno manage the secret variables by using the secret checkbox. As far I have seen into the current documentation it says "Bruno will manage your secrets internally and will not write them into the environment file." which is not descriptive at all. Could you please provide more feedback about this matter? Thank you very much.
OAuth authentication is now working in the GUI and I can successfully get an access token. But now I need to use that token in a request and I don't see how to reference it in a script. How do you get the token into the request?
Hi,
Bruno is awesome and much less overwhelming for newcomers. The docs, however, are a little less beginner-friendly. I understand that these are likely written for folks coming from Postman and covers the differences well, but it's lacking (or I can't easily find) basic introduction to the UI and working mechanics of the application.
Ironically, I've had to reference the Postman docs to have a better understand of what Bruno does. For reference, I'm a PM and not a developer. Still, a lot of us have reason to fiddle with APIs and better onboarding would be a big help!
The last restraint before I migrate from Postman to Bruno is the lack of a real console. I can't work properly with the chrome debuger.
I'd like to have in one time when I send a request :
The current documentation about secret storage is really vague:
Bruno will manage your secrets internally and will not write them into the environment file.
For security audit following should be documented:
An example of how to cancel a request using signal
would be nice.
On the page https://docs.usebruno.com/bru-cli/overview
none of the options in text and table are monospaced.
Instead
--var, --csv-file-path
it would be nice and easier to read if they were monospaced:
--var
, --csv-file-path
.
The documentation for setNextRequest states that it should work in a post-request script or test-script. I have only been able to get it to run in script:post-response {} and in tests {}. for instance the first snippet works but the second one does not. This would not be as big a problem except for the fact that when importing a collection from postman it keeps the setNextRequest in the tests section and it also calls is postman.setNextRequest
script:post-response {
bru.setNextRequest("TestsVariable 3");
}
tests {
bru.setNextRequest("TestsVariable 3");
}
When I closed Bruno and opened again sometime later, it does not load the environments. My created environments don't even show in the dropdown and there is no way to import an existing Bruno environment file.
This page talks about .env
files and .bru
files for secrets. It seems that Bruno saves the secrets in .bru
files only. Where do the .env
files come in? Should I create them manually?
I don't understand this and I'm not able to get secrets in .env
files to work. I think these instructions could be more prescriptive and tell the user:
A typo on the page https://docs.usebruno.com/secrets-management/hashicorp-vault/using-secrets:
seperated > sepArated
The page https://docs.usebruno.com/scripting/vars has bad links (404) leading to:
First one I don't know where it should lead.
But second should probably lead to:
https://docs.usebruno.com/scripting/response/response-object
Can it be noted on the Inbuilt Libraries page, or somewhere else, that moduleWhitelist must be used in bruno.json (in the project folder) to enable a module to run
{
"version": "1",
"name": "bruno-testbench",
"type": "collection",
"scripts": {
"moduleWhitelist": [
"crypto"
],
"filesystemAccess": {
"allow": true
}
}
}
Dear Anoop,
I am using Bruno-1.21.0, and I want to use this code to sync requests:
const axios = require("axios");
const response = await axios.get("https://api.github.com/users/usebruno");
Unfortunately this is not working :-(
The Response shown is this: Error invoking remote method 'send-http-request': SyntaxError: Unexpected identifier
As far as I can determine this is cause by the await
.
If I wrap it in an anonymous function like this:
const axios = require("axios");
(async () => {
const response = await axios.get("https://api.github.com/users/usebruno");
})();
it works (but the calls are asynchronyous, which is not what I wanted)
Kind regards,
Leen Baan
My coworker and I have noticed more success importing tests and scripts when a collection is exported as 2.1 instead of 2.0. The documentation doesn't note that there should be a difference, but we've found that 2.1 performs better consistently.
Hello, is it impossible to use External Libaries, when the Libaries are not in the Collection?
This page https://docs.usebruno.com/secrets-management/dotenv-file
looks ok but the way it is written, it gives wrong impression that the .env
file can be process.env
or maybe some other name, like local.env
.
There should be a screenshot with code directory (or a visual representation of directory structure), where it is shown:
.env
.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.