More documentation on Bruno CLI. Need some help. #2665
Unanswered
mattisking
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
More docs on how to use Bruno CLI coming from Postman/Newman would be awesome. I’m struggling to understand how to use it. (As others, it will go into my ADO pipelines.)
Heres an example of a newman request:
newman run postmansuite/pipelinetests.json -e postmansuite/environments/dev.json —env-var “API_KEY=12345” —folder “TestRunA” —reporters “cli/junit” —reporter-junit-export Results/junitReport.xml —ssl-client-cert-list postmansuite/certs/Cert-list-dev.json
I started with an Import of a Postman collection, went through and fixed all the import problems, made adjustments to match up tests vs scripts. I have folder nesting on my collection going about 4 levels deep and I specify a top level folder in the collection to run. This works in Bruno using the Recursive option.
For bru, I assume, because for some reason the folder option doesn’t accept a name, I have to start in the folder I want to run.
postmansuite/TestRunA> bru run folder -r —env DEV
but this gives me “You can run only at the root of the collection” which is a bit maddening because I can’t specify a folder to run… How do I use this? I honestly have no idea. Nothing I try works.
Environment seems logical (—env). What about if my environment file uses a lot of variables? Does the same swapping of values happen as does in Bruno? I expect for my secrets I can pass in via —env-var.
now certs. I am currently using the —ssl-client-cert-list newman option that lets me pass in a file that matches certs to routes, much like Bruno does. My test suite will need to call other services so even though I’ll use one cert most often, there will be more than one. The bruno.json file at the root of this test suite includes clientCertificates with paths to my files (we use pfx so thanks for whoever landed that recently in Bruno) but in ADO those paths won’t be useful. I sorta expected bru would just pick up the certs here since they are part of the collection but how would this work when the certs have to pulled out of ADO secure files while running in the pipeline? I can download the file into the pipeline but not to the pfxFilePath specified when I use Bruno. I expect there is a way to override that path or that cert but what if I have to override several?
Thanks in advance. Lots of recent changes to Bruno itself has made it possible for me to do most of my test suite in the main tool which is great but the main goal would be to use bru to automate it.
Beta Was this translation helpful? Give feedback.
All reactions