Galen npm execution command

377 views
Skip to first unread message

prawi...@gmail.com

unread,
Jul 24, 2018, 2:36:11 AM7/24/18
to Galen Framework
Hi,

I have given the below command for my project.

"scripts":{
      "galen-test": "galen test Galen/TestCases/* -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --parallel-tests 3",
},

"devDependencies": {
    "galenframework-cli": "2.3.7"
}


once running "npm install -g galenframework-cli" i could see galen getting installed and i could see the version using "galen --version"

But when i try executing the command "npm run galen-test" i get the below error. Kindly  help me on this :(




Error :

npm ERR! Tell the author that this fails on your system:
npm ERR!     galen test Galen/TestCases/Button/* -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --jsonreport C:/GalenBuild/TestReports/JSON --junitreport C:/GalenBuild/TestReports/JUnit/junit-report.xml --testngreport C:/GalenBuild/TestReports/TestNG/testng.xml --parallel-tests 3


Message has been deleted

prawi...@gmail.com

unread,
Jul 24, 2018, 4:08:06 AM7/24/18
to Galen Framework
My requirement here is i will have mutiple .test files under test cases folder..so i need to execute all...in command prompt using "galen test Galen/TestCases/*" i am able to execute all properly ..How to do the same using npm?

Martin Reinhardt

unread,
Jul 24, 2018, 11:17:40 AM7/24/18
to Galen Framework
as mentioned you should use the core module as mentioned on the README on GitHub. It just downloads the runtime and links it to the bin folder within node. the cli module also downloads WebDrivers for your OS

prawi...@gmail.com

unread,
Jul 26, 2018, 7:11:20 AM7/26/18
to Galen Framework
Thanks for the reply. I tried with galenframework also still getting the error. Is that anything i am missing here? Do i need to add galen.bat in path variable as we do it when installing manually?? I could see galen folders under node_modules but still it is failing

Below is how my package.json looks

"scripts":{
      "galen": "galen test Galen/TestCases/Sample.test -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --parallel-tests 3",
},

"devDependencies": {
    "galenframework": "2.3.7",
"galenframework-cli": "2.3.7"
}


Error Message : 

{ Error: spawn C:\Project\node_modules\galenframework-cli\node_modules\galenframework\lib\galen\galen.bat ENOENT
    at exports._errnoException (util.js:1026:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn C:\\Project\\node_modules\\galenframework-cli\\node_modules\\galenframework\\lib\\galen\\galen.bat',
  path: 'C:\\Project\\node_modules\\galenframework-cli\\node_modules\\galenframework\\lib\\galen\\galen.bat',
  spawnargs:
   [ 'test',
     'Galen/TestCases/Sample.test',
     '-Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe',
     '--htmlreport',
     'C:/GalenBuild/TestReports/HTML',
     '--parallel-tests',
     '3',
     '-Dwebdriver.chrome.driver=C:\\Project\\node_modules\\galenframework-cli\\node_modules\\chromedriver\\lib\\chromedriver\\chromedriver.exe',
     '-Dwebdriver.gecko.driver=C:\\Project\\node_modules\\galenframework-cli\\node_modules\\geckodriver\\geckodriver.exe' ] }

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "galen"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! Pro...@1.0.0 galen: `galen test Galen/TestCases/Sample.test -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --parallel-tests 3`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Pro...@1.0.0 galen script 'galen test Galen/TestCases/Sample.test -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --parallel-tests 3'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     galen test Galen/TestCases/Sample.test -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --parallel-tests 3
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs Project
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls Project
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

Martin Reinhardt

unread,
Jul 27, 2018, 4:49:50 AM7/27/18
to Galen Framework
seems like a path issue. Can you try to use absolute paths for your test files and the report folders?

prawi...@gmail.com

unread,
Jul 27, 2018, 5:52:12 AM7/27/18
to Galen Framework

its not a Path issue... I tried even with the sample code like structure in Galen framework website..even that gives the same issue. I think some basic step is missed... can someone help me on this pls

prawi...@gmail.com

unread,
Jul 27, 2018, 6:05:18 AM7/27/18
to Galen Framework
I explored the err message a bit and found that something like "SPAWN does not handle .bat or .cmd file"...is this the root cause of this issue??????? someone pls answer on this

prawi...@gmail.com

unread,
Jul 30, 2018, 5:40:32 AM7/30/18
to Galen Framework
Any update on this pls... :( stuck with this...cant able to execute galen using npm insatllation and commands

prawi...@gmail.com

unread,
Jul 31, 2018, 4:10:36 AM7/31/18
to Galen Framework
Any update pls...

Normal Galen framework exe installation and execution works fine.
When tried via npm install facing issues..Could see downloaded files under 
  • projectroot/nodemodules/galenframework
  • projectroot/nodemodules/galenframework-cli
when tried with "npm run galen-test" got an "ENONT" err message..then created such directory copied the galen.bat into it..still facing issue

Package.json :
"scripts": {
"galen-test": "galen test Galen/TestCases/UI/Button.test -Dwebdriver.chrome.driver=Galen/WebDrivers/chromedriver.exe --htmlreport C:/GalenBuild/TestReports/HTML --parallel-tests 3",
}

Ivan Shubin

unread,
Jul 31, 2018, 4:31:26 AM7/31/18
to Galen Framework
Sorry, but I can't really help you out here as I am not maintaining npm wrapper for galen

prawi...@gmail.com

unread,
Jul 31, 2018, 5:00:46 AM7/31/18
to Galen Framework
Thanks for the update @Ivan..will check with the one who owns it

Martin Reinhardt

unread,
Aug 1, 2018, 10:49:30 AM8/1/18
to Galen Framework
I’ve got no idea what’s wrong with your setup. You can check if this sample project is working for you: https://github.com/hypery2k/galen_samples/tree/master/javascript/node

prawi...@gmail.com

unread,
Aug 6, 2018, 3:10:08 AM8/6/18
to Galen Framework
Hi Martin,

I have tried the above given setup and followed the steps in Readme file. Got the same error !!!! Am i missing something? I am using Windows OS ..Just pasting everything i got when tried with npm run galen

PS C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node> npm i
npm WARN deprecated npm...@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated node...@1.4.8: Use uuid module instead

> galenfr...@2.3.2 install C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli\node_modules\galenframework
> node install.js

info Running at platform: win32
info Saving to C:\Users\320014~1\AppData\Local\Temp\galenframework\galen-bin-2.3.2.zip
info Receiving...
  [======================================--] 96% 0.0sinfo
info Received 11685K total.
info Extracting zip contents
info Removing C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli\node_modules\galenframework\lib\galen
info Copying extracted folder C:\Users\320014~1\AppData\Local\Temp\galenframework\galen-bin-2.3.2.zip-extract-1533539058615\galen-bin-2.3.2 -> C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli\node_modules\galenframework\lib\galen
info Writing location.js file
info Done. galen binary available at  C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli\node_modules\galenframework\lib
info Modified files: C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli\node_modules\galenframework\lib/galen/galen.bat

> chrome...@2.41.0 install C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\chromedriver
> node install.js

Saving to C:\Users\320014~1\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
Received 781K...
Received 1568K...
Received 2352K...
Received 3136K...
Received 3468K total.
Extracting zip contents
Copying to target path C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\chromedriver\lib\chromedriver
Done. ChromeDriver binary available at C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\chromedriver\lib\chromedriver\chromedriver.exe

> galenfram...@2.3.2 install C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli
> node install.js

info galenframework-cli detected

> galenfram...@2.3.2 postinstall C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli
> node postinstall.js

galen_...@1.0.0 C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node
`-- galenfram...@2.3.2
  +-- chrome...@2.41.0
  | +-- d...@3.0.0
  | | +-- glo...@6.1.0
  | | | +-- array...@1.0.2
  | | | | `-- array...@1.0.3
  | | | +-- pi...@2.3.0
  | | | `-- pinkie-...@2.0.1
  | | |   `-- pin...@2.0.4
  | | +-- is-pa...@1.0.0
  | | +-- is-path...@1.0.1
  | | | `-- is-path...@1.0.1
  | | |   `-- path-is...@1.0.2
  | | +-- p-...@1.2.0
  | | `-- pi...@3.0.0
  | +-- extra...@1.6.7
  | | +-- concat...@1.6.2
  | | | +-- buffe...@1.1.1
  | | | `-- typed...@0.0.6
  | | +-- de...@2.6.9
  | | | `-- m...@2.0.0
  | | `-- ya...@2.4.1
  | |   `-- fd-s...@1.0.1
  | |     `-- pe...@1.2.0
  | +-- mkd...@0.5.1
  | | `-- mini...@0.0.8
  | `-- req...@2.87.0
  |   +-- aws-...@0.7.0
  |   +-- aw...@1.7.0
  |   +-- case...@0.12.0
  |   +-- combine...@1.0.6
  |   | `-- delayed...@1.0.0
  |   +-- ext...@3.0.2
  |   +-- foreve...@0.6.1
  |   +-- form...@2.3.2
  |   | `-- asyn...@0.4.0
  |   +-- har-va...@5.0.3
  |   | +-- a...@5.5.2
  |   | | +-- c...@4.6.0
  |   | | +-- fast-de...@1.1.0
  |   | | +-- fast-json-sta...@2.0.0
  |   | | `-- json-schem...@0.3.1
  |   | `-- har-s...@2.0.0
  |   +-- http-si...@1.2.0
  |   | +-- asser...@1.0.0
  |   | +-- jsp...@1.4.1
  |   | | +-- extsp...@1.3.0
  |   | | +-- json-...@0.2.3
  |   | | `-- ver...@1.10.0
  |   | `-- ss...@1.14.2
  |   |   +-- as...@0.2.4
  |   |   +-- bcrypt...@1.0.2
  |   |   +-- dash...@1.14.1
  |   |   +-- ecc-...@0.1.2
  |   |   +-- get...@0.1.7
  |   |   +-- js...@0.1.1
  |   |   +-- safer-...@2.1.2
  |   |   `-- twee...@0.14.5
  |   +-- is-typ...@1.0.0
  |   +-- isst...@0.1.2
  |   +-- json-stri...@5.0.1
  |   +-- mime-...@2.1.19
  |   | `-- mim...@1.35.0
  |   +-- oauth...@0.8.2
  |   +-- perform...@2.1.0
  |   +-- q...@6.5.2
  |   +-- safe-...@5.1.2
  |   +-- tough-...@2.3.4
  |   | `-- puny...@1.4.1
  |   +-- tunnel...@0.6.0
  |   `-- uu...@3.3.2
  +-- fs-e...@0.26.2
  | +-- grace...@4.1.11
  | +-- json...@2.4.0
  | +-- kl...@1.3.1
  | +-- path-is-...@1.0.1
  | `-- rim...@2.6.2
  |   `-- gl...@7.1.2
  |     +-- fs.re...@1.0.0
  |     +-- infl...@1.0.6
  |     +-- mini...@3.0.4
  |     | `-- brace-e...@1.1.11
  |     |   +-- balance...@1.0.0
  |     |   `-- conca...@0.0.1
  |     `-- on...@1.4.0
  +-- galenfr...@2.3.2
  | +-- adm...@0.4.7
  | +-- fs-e...@0.23.0
  | +-- k...@0.6.0
  | +-- prog...@1.1.8
  | +-- replace...@1.0.2
  | +-- req...@2.60.0
  | | +-- aws-...@0.5.0
  | | +-- b...@1.0.3
  | | | `-- readabl...@2.0.6
  | | |   +-- process-ne...@1.0.7
  | | |   `-- string_...@0.10.31
  | | +-- case...@0.11.0
  | | +-- form...@1.0.1
  | | | `-- as...@2.6.1
  | | |   `-- lod...@4.17.10
  | | +-- har-va...@1.8.0
  | | | +-- blue...@2.11.0
  | | | +-- ch...@1.1.3
  | | | | +-- ansi-...@2.2.1
  | | | | +-- escape-str...@1.0.5
  | | | | +-- has-...@2.0.0
  | | | | `-- support...@2.0.0
  | | | +-- comm...@2.17.0
  | | | `-- is-my-js...@2.17.2
  | | |   +-- generate...@2.0.0
  | | |   +-- generate-obj...@1.2.0
  | | |   | `-- is-pr...@1.0.2
  | | |   +-- is-my-i...@1.0.0
  | | |   +-- jsonp...@4.0.1
  | | |   `-- xt...@4.0.1
  | | +-- ha...@3.1.3
  | | | +-- bo...@2.10.1
  | | | +-- cryp...@2.0.5
  | | | +-- ho...@2.16.3
  | | | `-- sn...@1.0.9
  | | +-- http-si...@0.11.0
  | | | +-- as...@0.1.11
  | | | +-- asser...@0.1.5
  | | | `-- ct...@0.5.3
  | | +-- node...@1.4.8
  | | +-- q...@4.0.0
  | | +-- string...@0.0.6
  | | `-- tunnel...@0.4.3
  | +-- request-...@0.3.1
  | | `-- throt...@0.0.2
  | +-- wh...@1.1.1
  | `-- ya...@3.18.0
  |   `-- cl...@2.1.0
  |     +-- center...@0.1.3
  |     | +-- align...@0.1.4
  |     | | +-- kin...@3.2.2
  |     | | | `-- is-b...@1.1.6
  |     | | +-- lon...@1.0.1
  |     | | `-- repeat...@1.6.1
  |     | `-- lazy-...@1.0.4
  |     +-- right...@0.1.3
  |     `-- word...@0.0.2
  +-- htt...@0.4.13
  +-- k...@0.7.0
  +-- npm...@2.1.2
  | +-- config...@1.1.11
  | | `-- proto...@1.2.4
  | +-- inhe...@2.0.3
  | +-- i...@1.3.5
  | +-- no...@3.0.6
  | | `-- abb...@1.1.1
  | +-- on...@1.3.3
  | | `-- wra...@1.0.2
  | +-- os...@0.1.5
  | | +-- os-ho...@1.0.2
  | | `-- os-t...@1.0.2
  | +-- sem...@4.3.6
  | `-- uid-n...@0.0.5
  +-- npm...@4.0.0
  | +-- are-we-t...@1.1.5
  | | +-- dele...@1.0.0
  | | `-- readabl...@2.3.6
  | |   +-- core-u...@1.0.2
  | |   +-- isa...@1.0.0
  | |   +-- process-ne...@2.0.0
  | |   +-- string_...@1.1.1
  | |   `-- util-de...@1.0.2
  | +-- console-con...@1.1.0
  | +-- ga...@2.6.0
  | | +-- apr...@1.2.0
  | | +-- has-...@0.1.7
  | | +-- has-u...@2.0.1
  | | +-- object...@4.1.1
  | | +-- signa...@3.0.2
  | | +-- string...@1.0.2
  | | | +-- code-p...@1.1.0
  | | | `-- is-fullwidt...@1.0.0
  | | |   `-- number...@1.0.1
  | | +-- strip...@3.0.1
  | | | `-- ansi-...@2.1.1
  | | `-- wide-...@1.1.3
  | `-- set-bl...@2.0.0
  +-- pa...@0.12.7
  | +-- pro...@0.11.10
  | `-- ut...@0.10.4
  +-- wh...@1.2.0
  | `-- is-ab...@0.1.7
  |   `-- is-re...@0.1.3
  `-- ya...@3.30.0
    +-- came...@1.2.1
    +-- cl...@3.2.0
    | `-- wrap...@2.1.0
    +-- decam...@1.2.0
    +-- os-l...@1.4.0
    | `-- lc...@1.0.0
    |   `-- inve...@1.0.0
    +-- windo...@0.1.4
    `-- y1...@3.2.1

npm WARN galen_...@1.0.0 No description
npm WARN galen_...@1.0.0 No repository field.
PS C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node> npm run galen -- check test/specs/google_success1.gspec --url 'https://www.google.com' --size '1280x800' --htmlreport C:/galen-report
> galen_...@1.0.0 galen C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node
> galen "check" "test/specs/google_success1.gspec" "--url" "https://www.google.com" "--size" "1280x800" "--htmlreport" "C:/galen-report"

'C:\Users\320014531\Downloads\galen_samples-master' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "galen" "--" "check" "test/specs/google_success1.gspec" "--url" "https://www.google.com" "--size" "1280x800" "--htmlreport" "C:/galen-report"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! galen_...@1.0.0 galen: `galen "check" "test/specs/google_success1.gspec" "--url" "https://www.google.com" "--size" "1280x800" "--htmlreport" "C:/galen-report"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the galen_...@1.0.0 galen script 'galen "check" "test/specs/google_success1.gspec" "--url" "https://www.google.com" "--size" "1280x800" "--htmlreport" "C:/galen-report"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the galen_samples package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     galen "check" "test/specs/google_success1.gspec" "--url" "https://www.google.com" "--size" "1280x800" "--htmlreport" "C:/galen-report"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs galen_samples
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls galen_samples
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\npm-debug.log
PS C:\Users\320014531\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node>

prawi...@gmail.com

unread,
Aug 6, 2018, 4:24:42 AM8/6/18
to Galen Framework
I have set the path of the Galen.bat in envionmet variables. Else getting the below issue

galen : The term 'galen' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ galen --version
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (galen:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Path Added : C:\Users\Downloads\galen_samples-master (1)\galen_samples-master\javascript\node\node_modules\galenframework-cli\node_modules\galenframework\lib\galen\

Martin Reinhardt

unread,
Aug 6, 2018, 4:09:24 PM8/6/18
to Galen Framework
that strange, because i've got a CI build up and running on windows and it's working. Are you using powershell?

prawi...@gmail.com

unread,
Aug 6, 2018, 11:46:21 PM8/6/18
to Galen Framework
Yes its Visual Studio code with Powershell as integrated terminal

Martin Reinhardt

unread,
Aug 7, 2018, 1:34:04 AM8/7/18
to Galen Framework
can please try if it works in a regular shell / command prompt?

prawi...@gmail.com

unread,
Aug 7, 2018, 3:47:07 AM8/7/18
to Galen Framework
Same observation when using command prompt as well.. Am i missing anything here ?? like setting up some path variable??

prawi...@gmail.com

unread,
Aug 7, 2018, 4:44:14 AM8/7/18
to Galen Framework
I doubt some pre setup should be done before using Galen npm. Because i am able to execute galen when tried via exe installation.. Is there any setup that needs to be carried out?

prawi...@gmail.com

unread,
Aug 13, 2018, 1:43:11 AM8/13/18
to Galen Framework
Finally it worked !!!!...But not sure whats exactly the change is :):)

Now the question is how can i make Google chrome as default browser to execute??? Unlike the traditional zip file download I couldn't find the Galen.config file in the downloaded files when using npm...


Reply all
Reply to author
Forward
0 new messages