How to run IOS browser tests on SauceLabs from Intern 3 - intern

Has anyone gotten Intern 3 to run iOS tests on SauceLabs?
I've tried many configurations for the environment, including what's written on how to run Intern's self-tests on mobile on SauceLabs? and what's suggested by https://docs.saucelabs.com/reference/platforms-configurator, but I can't even get it to start without giving some error like about Repeated sequence for session ...: 238 last 0 cur.

Sometimes I'm able to follow Kitson's advice and use
{ browserName: 'iphone', platform: 'OS X 10.10',
version: '9.0', deviceName: 'iPad Retina' }
It just fails intermittently.

Related

No specs found issue in protractor with success run

I am running my protractor tests in PhpStorm 8.0.1. The issue is despite of providing the parameter correctly in Application parameters section, the script does not run, and even then it outputs a success run in the console. Here is the output.
[12:45:30] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[12:45:30] I/launcher - Running 1 instances of WebDriver
Started
1..0 # All tests disabled
# 0 specs, 0 failures, 0 skipped, 0 disabled in 0.014s.
# NOTE: disabled specs are usually a result of xdescribe.
SUCCESS: 0 specs, 0 failures, 0 skipped, 0 disabled in 0.015s.
No specs found
Finished in 0.016 seconds
[12:45:34] I/launcher - 0 instance(s) of WebDriver still running
[12:45:34] I/launcher - chrome #01 passed
Process finished with exit code 0
My application parameter is configured like this.
http://screencast.com/t/HOqAW6ya4oe
And here is my folder structure which accordingly is correctly configured.
http://screencast.com/t/xK98JrDlc2a
This was working earlier fine and now all of a sudden I get this output. Any suggestions on how to resolve this would be of great help.
specs: [ '../specs/WP-lam_spec.js' ], I think it is a couse change it to :
specs: ['spec/**/*[sS]pec.js'],
so it will start all your specs you got in your spec folder, also i think it might be problem with lack of '' in parameter from screenshot so just change to:
protractor --specs='path\to\file.spec.js'
My spec.js file was in src.com.sam.scriptjs package so giving like below in config.js was solved my issue .
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['src/com/sam/scriptjs/firstScript.js']
}
If the tests are in the same folder as the config file, you can try to add ./ before your spec:
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['./helloWorld.js']
}

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.

Selenium Grid - Webdriver - Whitescreens when running tests

So typically I do these steps to run a test
Start selenium grid (java -jar selenium-server-standalone-2.39.0.jar -role hub // java -jar selenium-server-standalone-2.39.0.jar -role node)
Run a test script (node test.js // nightwatch test.js | node test.js)
Webdriver kicks off browser and starts test
These scripts used to work and after revisiting them after a couple months I found they are now broken. I am unsure what the problem is as I have not changed any code. Any help is greatly appreciated.
FYI
Selenium version: 2.39.0 |
OS: Mac Yosemite |
Browser: Firefox |
Browser version: 34.0.5
After 'starting' the server and going to
http://localhost:4444/
i get
"You are using grid 2.39.0
Find help on the official selenium wiki : more help here
default monitoring page : console"
but when trying to run a night watch script or even 'nightwatch help' it fails and then gives me the error - 'Connection refused! Is selenium server started?' (node scripts also give me a white screen)
Turns out this webdriver doesn't like the newer versions of firefox.
If you are experiencing issues go grab Firefox v 28.0 https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/mac/en-GB/

Not able to run dalekjs test scripts behind corporate proxy

I am trying to run Dalekjs test scripts behind proxy but I get the following error message
D:\dalek>dalek .\test\mytest.js
Running tests
Running Browser: PhantomJS
OS: windows 7 32bit
Browser Version: 1.9.7
RUNNING TEST - "Page title is correct"
OPEN http://www.google.co.in
x TITLE
0 EXPECTED: Google
0 FOUND: Proxy Authorization Required
0 MESSAGE: It has title
x TEST - "Page title is correct" FAILED
0/1 assertions passed. Elapsed Time: 1.09 sec
According to the error message, you need to use the corporate web proxy which requires authentication. Have you tried to set up dalek.js to use your default browser (which I guess has the correct proxy settings) using the --browser <browsername> command line switch?
See http://dalekjs.com/pages/getStarted.html#realbrowser on how to add browser support to dalek.js.

ChildProcess::TimeoutError: process still alive after 90 seconds when running cucumber features

When I try to run Cucumber features on my ci-server. It fails with following error
ChildProcess::TimeoutError: process still alive after 90 seconds
It works fine on my local machine.
About gems and browser, Im using selenium-webdriver(2.30.0), capybara(2.0.2) and cucumber(1.2.2) and Firefox 19.0
Please help me.
Thanks

Resources