We are considering moving to WDIO from Protractor, anyone has good experience with Codemods or any other recommendations to port scripts from Protractor to WDIO?
Related
Iam migrating my e2e run from protractor to webdriverio . in protractor there is a way to set browser.params , and get access to it in the code as well, is there anything similar to it in webdriverio. i use it to set which steps to skip during execution , which browser is currently running, which domain and environment is currently running.
Background:
I start protractor with:
$ protractor protractor.eb.conf.js
This specifies a remote selenium server.
Sometimes my protractor tests just stall at this point:
[17:56:33] I/launcher - Running 1 instances of WebDriver
[17:56:33] I/hosted - Using the selenium server at http://selenium-server.example.com:4444/wd/hub
Questions:
What other information is needed?
Capabilities? Only using chrome.
Protractor version 5.1.1
What is this point in the process?
Launcher? Hosted?
Waiting for a node to become available?
What should I do to troubleshoot?
Edit:
Using remote selenium server.
directConnect:true,
You can add this in your conf.js file. This will not wait for the selenium server to start.
Coming to your other questions -
You also need to mention the framework you are using (for instance I use jasmine framework so I mention it like this) -
framework: 'jasmine',
I am confused about running Karma and Protractor on a TeamCity CI server. Should I run these tests with a headless browser or not and how can I do that?
You can use a headless browser for unit testing. If you need a headless browser with karma/jasmine,you can use PhantomJS karma launcher . You can simply specify this when you run karma init , and it will ask you for a browser launcher in one of the steps of that configuration . or add the following to your package.json file
{
"devDependencies": {
"karma": "~0.10",
"karma-phantomjs-launcher": "~0.1"
}
}
But with protractor i recommend you to not to use a headless browser . Because you might want to see the actual happening of the testing when the protractor tests run (like what's happening with the actions and interactions in the interface of your application and such) . It is up to you. there are few headless browsers available for protractor tests along with PhantomJS for protractor
I have set up Cloud9 and Codeship for a simple Continuous Integration and Delivery system. It works well for developing my website/app. Has anyone been able to develop and run browser based Cucumber tests from within the Cloud9 IDE? If so, what kind of set-up did it require?
PS. I have been trying to get the Watir/Selenium chromedriver installed and working with the 'headless' gem.
First an explanation. I found it very easy to set up github, c9.io, and codeship for CI and CD using Cucumber for acceptance testing on Codeship. Unfortunately, developing the Cucumber tests was difficult, because I had to commit, push, and examin the failing Integration tests on codeship. I wanted to be able to quickly run and debug Cucumber scenarios in the IDE. But, there is no browser for watir/selenium to open. Thus the question.
After a day of searching and hint from c9.io on twitter, I have consensed the solution down to two steps ...
Install firefox and xvfb: sudo apt-get install firefox xvfb
Run cucumber in an xvfb context: xvfb-run cucumber
I have a large suite of Jasmine unit tests that were developed to run on a Selenium Grid using the jasmine:ci rake task provided by the Jasmine 1.3 Ruby gem. There was decent integration between Jasmine 1.3 and Selenium Webdriver and running tests on a remote node was as simple as passing some environment variables:
$ rake jasmine:ci SELENIUM_SERVER="http://hub.localdomain:4444/wd/hub" JASMINE_HOST="http://currenthost" JASMINE_BROWSER="chrome"
In Jasmine 2, this capability is gone, replaced by an integration with Phantomjs. Unfortunately, I can't find any discussion of migration options for people who still need Webdriver support.
Is there a way to run Jasmine 2 tests using Selenium Webdriver? Does anyone know of any existing projects or documentation focused on this integration? My query to the Jasmine dev list has gone unanswered.
On the jasmine team, it seemed to us that most people wanted to run their tests headless, so with 2.0 we made that the default. Running the tests in selenium also made the jasmine gem have a number of dependencies that potentially made it harder to install.
But we also see the value in running jasmine tests in multiple (real) browsers as well. To this end, we extracted the selenium code, including saucelabs integration, to it's own gem. Jasmine core actually uses this gem to runs it's own tests across multiple browsers.