Help with remote execute from Jenkins

1,257 views
Skip to first unread message

owens...@hotmail.com

unread,
Jul 8, 2016, 6:35:18 PM7/8/16
to PrimaTest Automation
I hope someone has figured out how to get this to execute.

Our Jenkins server is separate from the RedwoodHQ server. From the Jenkins server I was going to use psexec to remote execute the following:

c:\PSTools>PsExec.exe \\192.168.12.204 -u *** -p *** "c:\Program Files\RedwoodHQ\cli\node.exe" CIExecution.js --name GGO --user admin --testset GGO --machines 127.0.0.1:1 --project GG --variables Browser=Chrome

When I run this I get the following java error.

PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com


module.js:327
throw err;
^

Error: Cannot find module 'C:\Windows\system32\CIExecution.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3
c:\Program Files\RedwoodHQ\cli\node.exe exited on 192.168.12.204 with error code 1.

If use psexec in interaction mode: {psexec.exe cmd} to the remote server, I can run the command without issue.

Is there a different way to execute this from the jenkins server? I would like t have the Jenkins and RedwoodHQ on the same box but this isn't an option.

thanks!

dmi...@primatest.net

unread,
Jul 8, 2016, 8:02:54 PM7/8/16
to PrimaTest Automation, owens...@hotmail.com

You need to make sure that you run your scripts in c:\Program Files\RedwoodHQ\cli\ dir not C:\Windows\system32\

Freddy Vega

unread,
Jul 11, 2016, 9:38:25 AM7/11/16
to PrimaTest Automation, owens...@hotmail.com
Since you're using Jenkins, did the slave-agent.jnlp not work for you?

owens...@hotmail.com

unread,
Jul 11, 2016, 7:39:24 PM7/11/16
to PrimaTest Automation, owens...@hotmail.com
That worked for the most part. I set up a Jenkins slave on my RedwoodHQ node and was able to run a powershell script that called the Redwood CLI.

it isn't working as I expected, but I am sure I still have work to do. Thanks for the info Freddy! I will continue to play with this and see if I Can get Redwood to flag a test pass in Jenkins. Currently it just shows that it ran the tests, not that anything passed of failed.

I am new to all this as far as Jenkins and Redwood. This is my first attempt at writing automation for a web application. I appreciate all the help given so far.

owens...@hotmail.com

unread,
Jul 12, 2016, 3:46:17 PM7/12/16
to PrimaTest Automation, owens...@hotmail.com
Good News!
I figured out I could use WindowsEXE plugin to execute and with some tweaking I have it working perfectly.

Now, is there a way to display the test results as far as pass/fail count in Jenkins? I can look at the console logs and see the pass/fail count. They were trying to use RobotFrame work before I was hired and I can see that there is a plugin that will display Robots pass/fail count.

I am trying to get away from Robot because I find it isn't as user friendly as RedwoodHQ has been.

Thanks!

dmi...@primatest.net

unread,
Jul 12, 2016, 4:06:54 PM7/12/16
to PrimaTest Automation, owens...@hotmail.com

You can use Jenkins Junit plug-in to store the results. RedwoodHQ will output result.xml in cli dir. Just point Jenkins to it and you'll have your results.

Dmitri

owens...@hotmail.com

unread,
Jul 12, 2016, 5:35:16 PM7/12/16
to PrimaTest Automation, owens...@hotmail.com, dmi...@primatest.net
That worked!
Thanks so much Dmitri!

JORGE CORDOVA

unread,
Jul 30, 2016, 3:04:25 PM7/30/16
to PrimaTest Automation, owens...@hotmail.com
You need to setup a Jenkins node or slave within the RedwoodHQ machine and then you can pass the CLI parameters as local.

1. Access the Jenkins server from your RedwoodHQ machine and access the node and create a new node e.g. RedwoodHQ
2. After Jenkins node is created, access it from same RedwoodHQ machine and click its Java applet which is going to be downloaded to the RedwoodHQ machine
3. Then when you see a little popup window launched in your desktop, it is going to be the Jenkins slave running successful within your RedwoodHQ machine
4. From the Jenkins slave popup window, go to the menu and select Install as service and click it on it.  This will install the Jenkins slave as OS service e.g. Windows or Linux eventually
5. From this point, every time your RedwoodHQ machine is rebooted or recycled, Jenkins slave will always runs in the background and will be avaliable for running your RedwoodHQ executions automatically.

Important: Remember to select the proper slave within Jenkins job configuration to point to the just created RedwoodHQ Jenkins node and then set the path to C:\Program Files\RedwoowHQ\cli within the Windows batch task in order to execute your tests correctly.

Please see attached screenshots a reference.

Good luck! Let's continue with our Redwoodmania :)

Thanks
Jorge


On Friday, July 8, 2016 at 4:35:18 PM UTC-6, owens...@hotmail.com wrote:
I hope someone has figured out how to get this to execute.

Our Jenkins server is separate from the RedwoodHQ server. From the Jenkins server I was going to use psexec to remote execute the following:

c:\PSTools>PsExec.exe \\192.168.12.204 -u *** -p ***  "c:\Program Files\RedwoodHQ\cli\node.exe" CIExecution.js --name GGO --user admin --testset GGO --machines 127.0.0.1:1 - private --project GG --variables Browser=Chrome

When I run this I get the following java error.

PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich

Sysinternals - www.sysinternals.com - private

screenshot1.png
screenshot2.png
screenshot3.png
screenshot4.png
Reply all
Reply to author
Forward
0 new messages