E2e tests for sifter Internet Explorer Selenium

I would like to add some e2e tests to our CI build process. I already added them against chrome + firefox (as the simplest). But I really want to do this for several versions of IE. How can I embed it in the build process on linux / mac?

I found this article: http://elgalu.imtqy.com/2014/run-protractor-against-internet-explorer-vm/

But it looks like this is not 100% what I need. Can someone provide a simple configuration example?

+5
source share
1 answer

You will need a selenium server , either your own or browserstack / SauceLabs . If you plan to do it yourself, in a word, you will need to configure the selenium grid and register the nodes, one of the nodes should be a Windows machine, where you will run tests against IE.

Personally, I have successfully run protractor e2e tests in several browsers, including different versions of Chrome , Firefox and IE on the browser. Here's the configuration I'm using (it also includes jasmine junit reporter , this one is for CI):

 'use strict'; var browserstackUser = 'user'; var browserstackKey = 'key'; exports.config = { multiCapabilities: [ { 'browserstack.user': browserstackUser, 'browserstack.key': browserstackKey, 'browserstack.local': 'true', 'browserstack.debug': 'true', 'browserName': 'Chrome', 'os': 'Windows', 'os_version': '8', 'resolution': '1024x768', specs: [ '*.spec.js' ], exclude: [ 'footer.disabledCookies.spec.js' ] }, { 'browserstack.user': browserstackUser, 'browserstack.key': browserstackKey, 'browserstack.local': 'true', 'browserstack.debug': 'true', 'browser': 'Internet Explorer', 'browser_version': '8.0', 'os': 'Windows', 'os_version': '7', 'resolution': '1024x768', specs: [ '*.spec.js' ] }, { 'browserstack.user': browserstackUser, 'browserstack.key': browserstackKey, 'browserstack.local': 'true', 'browserstack.debug': 'true', 'browserName': 'Internet Explorer', 'browser_version': '9.0', 'os': 'Windows', 'os_version': '7', 'resolution': '1024x768', specs: [ '*.spec.js' ], exclude: [ 'footer.disabledCookies.spec.js' ] } ], // Browserstack selenium server address seleniumAddress: 'http://hub.browserstack.com/wd/hub', framework: 'jasmine', allScriptsTimeout: 300000, baseUrl: 'http://localhost:9001', onPrepare: function () { require('jasmine-reporters'); var capsPromise = browser.getCapabilities(); capsPromise.then(function (caps) { var browserName = caps.caps_.browserName.toUpperCase(); var browserVersion = caps.caps_.version; var prePendStr = browserName + "-" + browserVersion + "-"; jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter("test-results", true, true, prePendStr)); }); }, jasmineNodeOpts: { showColors: true, isVerbose: true, includeStackTrace: true, defaultTimeoutInterval: 3600000 } }; 
+3
source

Source: https://habr.com/ru/post/1207446/


All Articles