Installing Newman on Windows

Some users have reported issues while trying to install Newman on a Windows machine. We recently unpacked a brand-new Windows box, and went about installing Newman (even before installing Chrome.).

This is due to one dependency that we were using (jsdom-nogyp) being incompatible with Node 0.12.x. We had to switch to jsdom instead, which requires the NPM modules contextify and node-gyp. Building these modules require Python and the Visual Studio runtime to be installed (for Windows).

We're aware that downgrading Node to v0.10.x or installing Visual Studio are not appealing ideas, but until the jsdom-nogyp module starts supporting the latest version of Node, we'll have to compromise one way or the other.

Here's what you'll need to do to install the latest version of Newman on your system:

  • Install NodeJS – https://nodejs.org/download/. Click on the 32-bit or 64-bit Windows Installer package, depending on your machine configuration.
  • Add the Node executable to your system path. Go to the Control Panel > System and Security > System > Advanced System Settings > Environment variables. Append this to the end of the PATH variable: ;C:\Program Files\Nodejs
    If you installed Node in a different location, you'll need to set the PATH accordingly.
  • Install Python 2.x. The latest 2.x release available is 2.7.9 (https://www.python.org/downloads/release/python-279/). Get the Windows x86-64 MSI installer or Windows x86 MSI installer, and follow the instructions.
  • Open a command prompt, and type "node". The node environment should start. Press Ctrl-C to exit.
  • You'll need to install the Visual Studio runtime for some Newman dependencies to be installed. The quickest way to do this is to install Visual Studio Express – http://go.microsoft.com/?linkid=9816758. To check for any additional requirements for your system, check https://github.com/TooTallNate/node-gyp (Windows).
  • Type "npm install -g newman". It should take a few minutes to install. If all goes well, this is what you should see –
    newman-win-installed
  • Enjoy!

12 thoughts on “Installing Newman on Windows”

  1. F.Y.I. just in case somebody else has the same problem. I had some problems with step 4) above (open command prompt and run npm install -g newman). I got the "EPERM -4048" error. However if I hopened the SDK Command shell as an administrator everything worked.

  2. I tried following these instructions last night to no avail – installed Python and node-gyp; but I already have VS on my PC and wasn't going to risk introducing new errors by trying to bring in a C++ library that potentially isn't on my system already.

    Such a shame this has happened. I will have to run my hundreds of tests in Postman for now (they're split over a couple of dozen collections that I have in one batch file that I would run in Newman) and then switch over to a different solution if this problem isn't resolved soon – I lose the ability to check how long the tests take to run when I run them "manually" in Postman (not an exact science, but it flags up any major problems that might've been introduced) and I have to think harder while I run them in Postman as opposed to Newman when I could just execute the batch and watch out for red lines amongst all the green goodness!

    The only reason I went down this rabbit hole was to try and fix a script that runs fine in Postman but chokes in Newman.

    Good luck with jsdom-nogyp getting the 0.12 incompatibility fixed – that must be frustrating for you. 🙁

    1. Hi Colin,

      As a workaround, you can install version 1.2.10 of Newman (npm install newman@1.2.10), and downgrade your Node installation to an older version (v0.10.33 is confirmed to be working)

  3. For those having issues, try adding the –msvs_version argument to the npm install line, so the command would be something along the lines of "npm install -g newman –msvs_version=2012". This assumes that you installed Visual Studio Express 2012. If you installed a different version, then you would replace the "2012" in the command with the correct year for your version.

  4. I am trying to install newman behind corporate proxy. Appreciate you help if you provide some tips and guidance.

    1. Have you fixed the corporate proxy problem? I have the same issue with proxy. Could you share the solution if you fix it?

      1. npm config edit
        add the following lines
        proxy=http://
        https-http://
        Save the file and close
        Install again > npm install -g newman
        🙂

Leave a Reply

Your email address will not be published. Required fields are marked *