Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 30 23:48
    ablok commented #5842
  • Sep 30 23:46
    ablok opened #5909
  • Sep 30 23:00
    IevgenRagulin commented #5409
  • Sep 30 22:58
    IevgenRagulin opened #5908
  • Sep 30 22:47
    IevgenRagulin commented #5409
  • Sep 30 22:13

    christian-bromann on cb-repl-for-web

    (compare)

  • Sep 30 22:13
    christian-bromann closed #5140
  • Sep 30 22:13
    christian-bromann commented #5140
  • Sep 30 22:11
    christian-bromann commented #5763
  • Sep 30 22:10
    christian-bromann closed #5807
  • Sep 30 22:10
    christian-bromann commented #5807
  • Sep 30 22:09
    christian-bromann closed #5907
  • Sep 30 22:09
    christian-bromann commented #5907
  • Sep 30 22:08
    christian-bromann commented #5842
  • Sep 30 22:07
    FelixZilber commented #5907
  • Sep 30 22:04
    christian-bromann labeled #5853
  • Sep 30 22:04
    christian-bromann unlabeled #5853
  • Sep 30 22:03
    christian-bromann commented #5853
  • Sep 30 22:01
    christian-bromann labeled #5840
  • Sep 30 22:01
    christian-bromann review_requested #5840
Christian Bromann
@christian-bromann
it is hidden but available: http://webdriver.io/guide/testrunner/configurationfile.html
Run functions before or after the test. If one of them return with a promise, WebdriverIO will wait until that promise got resolved to continue.
so it should actually be already documented in your wdio.conf.js :wink:
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
@christian-bromann Ahh perfect! Thanks for revealing that one!
@christian-bromann Thanks a lot. Have a good day!
Christian Bromann
@christian-bromann
you too
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
Oh. One last thing...
@christian-bromann I want to have the starting of the selenium-standalone somehow incorporated into my test run, so that there is just one command to execute
presently I need to run 'selenium-standalone start' in some other window
Christian Bromann
@christian-bromann
I would recommend to use https://github.com/vvo/selenium-standalone .. just start it in your onPrepare hook
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
How should I go about doing that, so that the selenium-standalone starts up before the tests and tears down afterwards?
Christian Bromann
@christian-bromann
right
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
what about multiple instances on same machine, when I use the .start, can I specify the port? Or better yet, can I delegate finding it to selenium standalone, so that it tells me what the port is?
Christian Bromann
@christian-bromann
start the server in your onPrepare hook and kill the server in onComplete
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
@christian-bromann (finiding it, I mean, finding any unused port)
Christian Bromann
@christian-bromann
well if you call start in initialses a selenium standalone usually on port 4444
and then it takes care about running chromedriver and whatnot for you
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
yep I saw that. I'm concerned that this may need to run on build servers, and ideally they should be able to build many jobs in parallel
Christian Bromann
@christian-bromann
onPrepare gets executed only once
whereas before gets executed per running capability test
onPrepare/onComplete are global hooks and before/after capability specific ones
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
but I don't want the limitation that I can only have one of this running on single machine
say, I've a CI build server, and it continually builds new versions from different branches
and the builds all run on the same machine
how do I vary the port?
Christian Bromann
@christian-bromann
ahh I see, well then it would make sense to run the server as a process in the background and not to start it everytime you kick of a build
or maybe do that and set the port to the current build number
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
well, but I want all the source projects to be self contained, I don't want any dependency
yeah, ok, I just don't know how to set it :)
where to make it not the default 4444
will look around
Christian Bromann
@christian-bromann
you can pass some options to as parameter to that start method (see https://github.com/vvo/selenium-standalone#seleniumstartopts-cb)
but your selenium infrastructure should be independent from your projects and tests
I recommend to have a global server running somewhere in the background
your projects are still self contained then
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
this is too heavy for now, I don't control the build machines
Christian Bromann
@christian-bromann
I see ok
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
I still don't see where I specify the port. I found 'selenium-standalone start -- -role node -hub http://localhost:4444/grid/register -port 5556' , but I guess this has to do with grids
oh btw, for now I'm doing commandling, not the start(), I'll migrate later
Christian Bromann
@christian-bromann
see this example: selenium-standalone start -- -role node -hub http://localhost:4444/grid/register -port 5556
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
so, following above, I thought selenium-standalone start -port 12345 will do it, but it's still 4444
Christian Bromann
@christian-bromann
oh really?
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
aaah
no --
dummy
Christian Bromann
@christian-bromann
:D
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
allrighty! thanks a lot
@christian-bromann You've been most helpful
Christian Bromann
@christian-bromann
@slawomir-brzezinski-at-travcorp you’re welcome ;)
Tony Keith
@onewithhammer

Hello,

I have successfully written many tests using Mocha/Should/WebDriverIO using selenium stand alone server for local testing and using saucelabs for remote testing. I use mocha and/or grunt as the test runner. The project is on github: https://github.com/onewithhammer/web-driver-io-tutorial

Now I want to connect Travis CL to github to test my test scripts automatically. I created a .travis.yml file and I believe it is configured properly however I can't get my scripts to connect to Sauce Connect.

What needs to be changed to the code to support connecting to Sauce Connect (port 4445)?

Does that make sense? Or do you have an example of connecting to Sauce Connect?