Open 10kresources opened 7 years ago
@agc93 can you help here?
@10kresources Sorry to revive a super old issue. But from a quick glance at the source code of cake.newman it is just trying to invoke newman.cmd from global when you are windows.
Can you actually invoke newman.cmd after your Install-Postman step?
You would have to test that manually ofc.
@nmbro / @10kresources Can you guys try again with the latest 0.3.0 release?
I haven't been able to replicate it so far and the addin should pick newman
/newman.cmd
up from your PATH
.
I thought I run into this problem recently. Turned out I had not run npm install first (so I got the "Newman: executable not found error"). The Cake website omits this step. After installing npm everything worked fine with 0.3.0.
@glBeatriz can you point to the part of the Cake website that caused confusion here?
Yep its this: https://cakebuild.net/dsl/postman/
Confusing for the TL;DR folks who discover the cake.newman doc page too late :)
@glBeatriz gotcha.
That information actually comes from here:
https://github.com/cake-contrib/Cake.Newman/blob/develop/src/Cake.Newman/Aliases.cs#L10
You up for a PR to improve these docs?
absolutely! will come back to this later today
I want to run Postman tests as a part of our CI pipeline. We use Bamboo for our CI Below is the cake file
======================================== Clean-Unzip-Folder
Executing task: Clean-Unzip-Folder Cleaning directory C:/build/ACES-DEVSLN1683-INT/Aces.Tests.Integration Finished executing task: Clean-Unzip-Folder
======================================== Unzip-Test-Package
Executing task: Unzip-Test-Package Unzipping file C:/build/ACES-DEVSLN1683-INT/Aces.Tests.Integration.zip to C:/build/ACES-DEVSLN1683-INT/Aces.Tests.Integr ation Finished executing task: Unzip-Test-Package
======================================== Required-Postman-Folders
Executing task: Required-Postman-Folders Finished executing task: Required-Postman-Folders
======================================== Install-Postman
Executing task: Install-Postman Using addin: Cake.Npm v0.12.1.0 (0.12.1+Branch.master.Sha.9481fc976a2403a9c47abe3f54bd855068fd845d) npm arguments: install --silent newman --global c:\Users\packer\AppData\Roaming\npm\newman -> c:\Users\packer\AppData\Roaming\npm\node_modules\newman\bin\newman.js newman@3.8.3 c:\Users\packer\AppData\Roaming\npm\node_modules\newman ├── word-wrap@1.2.3 ├── filesize@3.5.10 ├── eventemitter3@2.0.3 ├── cli-progress@1.6.0 ├── semver@5.4.1 ├── colors@1.1.2 ├── csv-parse@1.2.3 ├── pretty-ms@3.0.1 (parse-ms@1.0.1, plur@2.1.2) ├── xmlbuilder@9.0.4 ├── parse-json@3.0.0 (error-ex@1.3.1) ├── mkdirp@0.5.1 (minimist@0.0.8) ├── argparse@1.0.9 (sprintf-js@1.0.3) ├── serialised-error@1.1.2 (stack-trace@0.0.9, node-uuid@1.4.8, object-hash@1.2.0) ├── async@2.5.0 ├── shelljs@0.7.8 (interpret@1.0.4, glob@7.1.2, rechoir@0.6.2) ├── postman-collection@3.0.0 (escape-html@1.0.3, file-type@3.9.0, postman-url-encoder@1.0.1, http-reasons@0.1.0, uuid@3. 1.0, marked@0.3.6, liquid-json@0.3.1, mime-types@2.1.17, mime-format@2.0.0, iconv-lite@0.4.19, sanitize-html@1.14.1) ├── cli-table2@0.2.0 (string-width@1.0.2, lodash@3.10.1) ├── postman-request@2.81.1-postman.3 (is-typedarray@1.0.0, aws-sign2@0.7.0, oauth-sign@0.8.2, forever-agent@0.6.1, tunne l-agent@0.6.0, stringstream@0.0.5, caseless@0.12.0, postman-url-encoder@1.0.1, isstream@0.1.2, json-stringify-safe@5.0.1 , safe-buffer@5.1.1, performance-now@0.2.0, extend@3.0.1, aws4@1.6.0, uuid@3.1.0, combined-stream@1.0.5, qs@6.4.0, form- data@2.1.4, mime-types@2.1.17, tough-cookie@2.3.3, stream-length@1.0.2, http-signature@1.1.1, hawk@3.1.3, har-validator@ 5.0.3) ├── handlebars@4.0.10 (async@1.5.2, optimist@0.6.1, source-map@0.4.4, uglify-js@2.8.29) ├── lodash@4.17.2 ├── postman-collection-transformer@2.3.1 (strip-json-comments@2.0.1, inherits@2.0.3, commander@2.11.0, intel@1.2.0, loda sh@4.17.4) └── postman-runtime@6.4.0 (resolve-from@4.0.0, inherits@2.0.3, http-reasons@0.1.0, aws4@1.6.0, btoa@1.1.2, uuid@3.1.0, h ttpntlm@1.7.5, crypto-js@3.1.8, node-oauth1@1.2.1, hawk@3.1.3, lodash@4.17.4, postman-sandbox@2.3.4) Finished executing task: Install-Postman
======================================== Run-Postman-Tests
Executing task: Run-Postman-Tests An error occurred when executing task 'Run-Postman-Tests'. Error: One or more errors occurred. Newman: Could not locate executable.```