Test with SauceLab with version 2 circle CI

nodejs
circle.yml

#1

I am facing one problem that once I tried to test all browser test cases with sauce-lab on circle CI v2.

  js-qa-nightwatch-with-saucelabs:
    docker:
    - image: circleci/node:8
    working_directory: ~/repo
    steps:
    - checkout
    - run:
        name: Start SauceLabs Tunnel (required if testing on CircleCI container)
        command: |
            curl https://saucelabs.com/downloads/sc-4.4.12-linux.tar.gz -o saucelabs.tar.gz
            tar -xzf saucelabs.tar.gz
    - run:
        name: Setup 1
        command: |
            cd sc-*-linux &&  ./bin/sc -u navjot.g -k somekey --readyfile ~/sauce_is_ready
    - run:
        name: Setup 2
        command: |
            "while ! lsof -i:4445 -t; do sleep 3; done"
    - run:
        name: RUN yarn run browser-test
        command: yarn run browser-test

but and in circle CI, its successfully run the “SETUP-1” and show the message “Sauce Connect is up, you may start your tests.”

but nothing will happen after that and it will not execute the next step.


#3

hey, please look it again


#4

Is it getting stuck on the while loop?

Can you kick off the Saucelabs tunnel in an SSH session and see whether your “up” test works?


#5

Is it getting stuck on the while loop?
No, it’s not, while loop is on setup2 but after connected with tunnel it will not go further. So it stuck on setup1.

Can you kick off the Saucelabs tunnel in an SSH session and see whether your “up” test works?
if I direclty stopped it from sauce-lab account then it will go on setup2. And sorry that I don’t know much about this.


#6

Hmm, OK. Have you tried the Saucelabs tunnel locally on your development machine? If you get it working there, but not here, then it’s (more likely to be) a CircleCI problem you can ask here.

You can ask general testing and continuous integration problems here, as far as I know, but teaching folks how to do CI is probably a bit out of scope. CI is great, but it’s not trivial.


#7

Actually, I have changed things and now I am using “sauce-connect-launcher” npm package and try to connect the tunnel on beforeCall of test cases. also onafterCall I have stopped that tunnel.
And from config.yml I am running only test cases.

Seems its working locally. Need to try on server.


#8

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.