How to run intern tests with sauceconnect on a remote server? - intern

I've been trying to run intern tests (intern 2.1) against a SauceConnect sc instance running on another machine.
I tried various configurations e.g.
tunnel : "SauceLabsTunnel",
tunnelOptions : {
hostname : 'remotehost'
}
But that doesn't work, I'd also tried to use the proxyUrl, proxy, proxyPort options and same problem. I always receive the error failed to remove matching tunnels

I'm closing this as I'd answered it, use tunnel : 'NullTunnel'

Related

Nightwatch pipeline in Azure Devops CI error

I am trying to create a pipeline in Azure DevOps for my Nightwatch-Cucumber project. I have everything set, and when I run the tests locally everything is working fine, but when I run the tests in Azure DevOps I get an error. This is the error from the log that I get.
This are the tasks that I added
Can anyone help me with this error and how to make it work
Error connecting to localhost on port 4445
The possible cause of this issue is that port 4445 of the machine where the agent is located is not open.
Based on the error log, it seems that you are using the Microsoft-hosted agent(ubuntu agent).
You could try the following two methods:
1.You can try to change the connection port to 80. Based on my test, the port 80 is opened by default.
Here is an example:
nightwatch.json:
"test_settings" : {
"default" : {
"launch_url" : "http://localhost",
"selenium_port" : 80,
"selenium_host" : "hub.testingbot.com",
"silent": true,
"screenshots" : {
"enabled" : false,
"path" : ""
},
"skip_testcases_on_fail": false,
"desiredCapabilities": {
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
2.Since this project could work fine on your local machine, the configuration should be correct on your local machine. So you could try to create a Self-hosted agent.
Then you could run the pipeline on your local machine.
I made it work. I switched to Ubuntu agent and installed chrome latest version and latest jdk. Also I had wrong chromedriver version installed, changed that in package.json file. Now its working fine. Thanks all for your answers.

SoftLayer Command Line Interface - Can't create a private network only machine from slcli

The command below works and machines are creating on the right private VLAN .. BUT!!! They are coming with a public VLAN too even though I don't want that .. command so far that works:
slcli vs create --billing=hourly --image=1060669 --hostname=ejkpoc --domain=ejk.co.uk --cpu=1 --memory=1 --datacenter=lon02 --postinstall=https://10.1.1.13/files/bootstrap-rhel-5.sh --vlan-private=1227409
The major trouble with the assignment of a public for me is that all of the postinstall bootstrap with attaches to Chef etc. is now registering the FQDN of the public! Cheers EJK
I didn't "RTFM" correctly ... my bad ... in the options there is a "--private" to force the machine to be private only (see the middle of the picture DOH!!) ... running the command now ...
I will update with the command once it works ...
Cheers
EJK

How do I run a Puppet Manifest on a Windows server with Puppet Agent?

I have done it in the past. I don't know why I cannot do it this way below. I am using CentOS 7 for the Puppet Master server. I am using Windows Server 2012 with Puppet Agent.
All the content below was taken from the Puppet Master server. Here is site.pp (which is in /etc/puppet/manifests):
node 'fqdnOfWindowsServer' { import 'good.pp'}
node 'fqdnOfLinuxServer' {}
Here is good.pp (which is in /etc/puppet/manifests):
file { 'c:/fun.ps1':
ensure => 'present',
source => '/tmp/special.ps1',
source_permissions => 'ignore',
}
Here is what happens when I run puppet agent -t:
...Caching catalog for fqdnOfLinuxServer... Error: Failed to apply
catalog: Parameter path failed on File[c:/fun.ps1]: File paths must be
fully qualified, not 'c:/fun.ps1' at /etc/puppet/manifests/good.pp:5
How do I input a fully qualified path? It seems to be having a problem with a Windows server as the Puppet Agent. Paths are different from Linux Puppet Agents.
From what I can make of the error message, you're trying to create a Windows file resource on a Linux server (the error mentions caching catalog for fqdnOfLinuxServer). If that's the case, the error message makes sense because on Linux, the agent expects file paths to start with a forward slash.

SSH agent forwarding on Windows (pageant)

When I try to connect through SSH from any language (tried with Golang & Nodejs) to one of my servers from Windows the agent forwarding doesn't work.
I'm saying this because some commands like git pull are throwing errors (Permission denied (publickey)), while there aren't if I login directly using Putty.
I tried to use the env. variable SSH_AUTH_SOCK but it seems there's no such variable set on Windows. I expected Pageant doing the job.
Code example in NodeJS (simple-ssh lib):
this.ssh = new SSH({
// other unimportant variables
agent: process.env.SSH_AUTH_SOCK, // which is undefined
agentForward: true
});
How does this work on Windows?
For pageant on Windows, you should use the special 'pageant' value for agent instead:
this.ssh = new SSH({
// other unimportant variables
agent: 'pageant',
agentForward: true
});

Running protractor tests on IE 11

OK, so I have been searching a lot to get proper solution to the blocker I am facing right now. Let me give you a background of what I have done so far :
I want to run protractor tests (located on Linux machine) on IE 11 of Windows Server 2012 R2 (IP : 10.81.73.248). My protractorTest.conf.js has below :
exports.config = {
seleniumAddress: 'http://10.81.73.248:4444/wd/hub',
baseURL: 'http://10.81.78.137:80000/',
capabilities: {
browserName: 'internet explorer',
platform: 'ANY',
version: '11'
},
On my Windows Server 2012 R2 machine, I've downloaded IEDriverServer_Win32_2.47.0 and placed it under C:\Windows\System32, environment variable PATH has been updated with above location. Protected mode settings are same for all zones. Windows machine also has selenium-server-standalone-2.48.2.jar placed under C:\Users\Selenium.
On Windows machine, I am starting selenium server using below command :
java -jar selenium-server-standalone-2.48.2.jar -port 4444 -Dwebdriver.ie.driver="C:\Windows\System32\IEDriverServer_Win32_2.47.0\IEDriverServer.exe" , which starts selenium server fine.
With above settings, I run protractor tests from my Linux machine using grunt protractor_test, which launches IE browser on Windows machine, shows localhost:dynamic port and a message as : This is the initial page of webdriver server and within 2 seconds, closes the browser.
The exception I get on selenium server terminal is as below :
Session ID is null. Using WebDriver after calling quit() ?
This is where I am stuck at. I looked at various posts which describes similar issue (?) as mine along with the potential solution, but I am unable to resolve my issue here.
Is there anything I might be doing wrong to setup the connections ? or am I missing some steps to get me through ?
I would really appreciate if you guide me in resolving this long time pending blocker.
I think you are trying to run using old selenium version.It should be 2.53.x something.
Few basics things to check first regarding IE execution:
1).IE Setting for protractor(Selenium)
http://elgalu.github.io/2014/run-protractor-against-internet-explorer-vm/
2).Take IE driver of 32 bit(don't take 64 it has known slowness issues) and manually copy on the following path:
Root Folder\node_modules\protractor\node_modules\webdriver-manager\selenium\IEDriverServer_Win32_2.53.1
3). IE Driver can be downloaded from following path:
http://selenium-release.storage.googleapis.com/index.html?path=2.53/
**OR**
Please upgrade your protractor version to latest like 4.0.11 by changing the version in package.json file and do from command prompt(inside project root directory):
npm update
and then give update your selenium driver with following command from command prompt
webdriver-manager update --ie
it will update the selenium version of IE driver to latest and then try running your tests again.

Resources