mcdcorp / opentest

Open source test automation tool for web applications, mobile apps and APIs
https://getopentest.org
MIT License
447 stars 107 forks source link

OpenTest installation in a computer without access to Internet #520

Closed frcosta79 closed 2 years ago

frcosta79 commented 2 years ago

Hi,

I tried to install the OpenTest in a physical Lab where the machines have not access to internet. I noticed that when I run the command for installing OpenTest (npm install opentest -g) the packages are downloaded from internet. I tried to move the folder npm_modules containing OpenTest packages to the machines of this Lab and tried to install OpenTest from that directory but it didn't work too. My question is: is it possible to install OpenTest on computers that have no access to internet? Is there a way to install OpenTest offline?

Thank you

adrianth commented 2 years ago

There are a couple of ways to perform an OpenTest offline installation. One solution is to copy the complete "opentest" directory from a machine running the same OS that does have an internet connection. Not sure if this is what you tried already. If you do this, you will still have to manually copy the opentest CLI command to the right location, so this solution is a bit messy.

A better solution is to use the npm-pack-all utility to generate a self-contained package that can be deployed on the target machine using npm without requiring an internet connection. Here are the steps:

  1. Install npm-pack-all and opentest as a global modules on a machine running the same OS as the target machine and which has an internet connection. Do that by running npm install -g npm-pack-all opentest.
  2. Change directory to the root of the installed opentest module. On Windows that should normally be C:\Users\<USER_NAME>\AppData\Roaming\npm\node_modules\opentest.
  3. Execute the command npm-pack-all. This will generate a file that packs the OpenTest npm module along with all its dependencies. The name of the file will be something like opentest-1.2.4.tgz.
  4. Copy the generated file onto the target machine and install it using npm by specifying it as an argument at the command line: npm install -g opentest-1.2.4.tgz.

That's all. Let me know if this worked for you.

frcosta79 commented 2 years ago

Hi Adrian, Thank your your assistance and help. You are right. I tried to install from copying the complete "opentest" folder to the machines where I need to install it. The point that caused it to not work is probably because the OS version was different. I'll use the instructions you provided me for npm-pack-all option. That will probably resolve the problem I am facing.

Thank you

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.