Code Monkey home page Code Monkey logo

Comments (3)

horsecoin avatar horsecoin commented on September 14, 2024

Never mind, my bad I did not read the directions, worked with docker compose! First I tried the way below and got another error, then read the directions, and works! wow! ! OMG this looks cool! Will try, wish me luck! Thanks!
2019-04-30 18:52:46 ☆ nickademous in ~
± |master ↑1 ↓2 S:387 U:367 ?:452 ✗| → docker run -it -v $(pwd):/usr/workspace blueimp/wdio

=========================
WDIO Configuration Helper

? Where should your tests be launched (Use arrow keys)
❯ local - https://www.npmjs.com/package/@wdio/local-runner

? Where should your tests be launched local - https://www.npmjs.com/package/@wdio/local-runner
? Shall I install the runner plugin for you? Yes
? Where is your automation backend located? (Use arrow keys)
❯ On my local machine
In the cloud using Sauce Labs
In the cloud using Browserstack or Testingbot or a different service
I have my own Selenium cloud

? Do you want to run your test on Sauce Headless? (https://saucelabs.com/products/web-testing/sauce-headless)
Yes
? Which framework do you want to use? mocha
? Shall I install the framework adapter for you? Yes
? Do you want to run WebdriverIO commands synchronous or asynchronous? sync
? Where are your test specs located? ./test/specs/**/*.js
? Which reporter do you want to use? (Press to select, to toggle all, to invert selection)
? Do you want to add a service to your test setup? (Press to select,
to toggle all, to invert
selection)
? Level of logging verbosity debug
? What is the base url?
http://localhost

Installing wdio packages:

  • @wdio/local-runner
  • @wdio/mocha-framework
  • @wdio/sync
    npm WARN checkPermissions Missing write access to /opt
    npm WARN enoent ENOENT: no such file or directory, open '/opt/package.json'
    npm WARN @wdio/[email protected] requires a peer of @wdio/cli@^5.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN opt No description
    npm WARN opt No repository field.
    npm WARN opt No README data
    npm WARN opt No license field.

npm ERR! path /opt
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/opt'
npm ERR! { [Error: EACCES: permission denied, access '/opt']
npm ERR! stack: 'Error: EACCES: permission denied, access '/opt'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/opt' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! /home/wdio/.npm/_logs/2019-05-01T05_13_32_885Z-debug.log
(node:1) UnhandledPromiseRejectionWarning: Error: null
at _inquirer.default.prompt.then.answers (/usr/lib/node_modules/@wdio/cli/build/setup.js:57:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Then docker worked like a charm!!
2019-04-30 19:23:04 ☆ nickademous in ~/wdio
± |master ✓| → docker-compose run --rm wdio firefox
Creating network "wdio_default" with the default driver
Pulling mailhog (blueimp/mailhog:)...
latest: Pulling from blueimp/mailhog
ce01a9a67e3c: Pull complete
5e4a4f793028: Pull complete
Building example
Step 1/6 : FROM python:alpine
alpine: Pulling from library/python
bdf0201b3a05: Already exists
59c926705abf: Pull complete
31ca6b067b5a: Pull complete
b18bc4e1c47b: Pull complete
0a92c60c32df: Pull complete
Digest: sha256:ef431c6357f42a8507e01584038d5bda38f01664678e5737d3ba05afcf70133d
Status: Downloaded newer image for python:alpine
---> 715a1f28828d
Step 2/6 : RUN pip3 install itsdangerous && rm -rf /root/.cache
---> Running in ce8505da70f4
Collecting itsdangerous
Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Installing collected packages: itsdangerous
Successfully installed itsdangerous-1.1.0
Removing intermediate container ce8505da70f4
---> f22dffe8ec05
Step 3/6 : ENV PYTHONUNBUFFERED=1
---> Running in c63f4c9a4f67
Removing intermediate container c63f4c9a4f67
---> cffb0931335f
Step 4/6 : COPY server.py /srv/
---> 058cf8639de0
Step 5/6 : USER nobody
---> Running in aefc53c92e1c
Removing intermediate container aefc53c92e1c
---> b764f8d5fc78
Step 6/6 : CMD ["/srv/server.py"]
---> Running in 0fb1526693d8
Removing intermediate container 0fb1526693d8
---> 68fc97b7f882

Successfully built 68fc97b7f882
Successfully tagged wdio_example:latest
WARNING: Image for service example was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.
Pulling chromedriver (blueimp/chromedriver:)...
latest: Pulling from blueimp/chromedriver
6ae821421a7d: Pull complete
aa552d4be22c: Pull complete
ff4aa1c553b6: Pull complete
0e753ed6d077: Pull complete
492a53310798: Pull complete
3d80fc1b5c67: Pull complete
5a79f4759e40: Pull complete
Pulling geckodriver (blueimp/geckodriver:)...
latest: Pulling from blueimp/geckodriver
6ae821421a7d: Already exists
aa552d4be22c: Already exists
ff4aa1c553b6: Already exists
0e753ed6d077: Already exists
492a53310798: Already exists
3d80fc1b5c67: Already exists
9e57744d6c5b: Pull complete
46a398662e9c: Pull complete
Creating wdio_mailhog_1 ... done
Creating wdio_chromedriver_1 ... done
Creating wdio_geckodriver_1 ... done
Creating wdio_example_1 ... done
Waiting for host: chromedriver:4444 ... ok
Waiting for host: geckodriver:4444 ... ok
Waiting for host: example:8080 ... ok
2019-05-01T05:26:52.019Z INFO @wdio/cli:Launcher: Run onPrepare hook
2019-05-01T05:26:52.043Z INFO @wdio/local-runner: Start worker 0-0 with arg: firefox

RUNNING 0-0 in firefox - /test/specs/01-session.js

RUNNING 0-1 in firefox - /test/specs/02-mail.js

RUNNING 0-2 in firefox - /test/specs/03-attachments.js

"spec" Reporter:

[firefox #0-0] Spec: /opt/test/specs/01-session.js
[firefox #0-0] Running: firefox
[firefox #0-0]
[firefox #0-0] Session
[firefox #0-0] ✓ requires login
[firefox #0-0] ✓ requires email
[firefox #0-0] ✓ requires password
[firefox #0-0] ✓ logs in
[firefox #0-0] ✓ logs out
[firefox #0-0]
[firefox #0-0] 5 passing (26.6s)

[firefox #0-1] Spec: /opt/test/specs/02-mail.js
[firefox #0-1] Running: firefox
[firefox #0-1]
[firefox #0-1] Mail
[firefox #0-1] ✓ logs in
[firefox #0-1] ✓ requires recipient
[firefox #0-1] ✓ sends unicode
[firefox #0-1]
[firefox #0-1] 3 passing (12.1s)

[firefox #0-2] Spec: /opt/test/specs/03-attachments.js
[firefox #0-2] Running: firefox
[firefox #0-2]
[firefox #0-2] Attachments
[firefox #0-2] ✓ logs in
[firefox #0-2] ✓ sends one
[firefox #0-2] ✓ sends multiple
[firefox #0-2]
[firefox #0-2] 3 passing (9.8s)

Test Suites: 3 passed, 3 total (100% completed)
Time: 🕙 65.73s

2019-04-30 19:27:59 ☆ nickademous in ~/wdio
± |master ✓| → open vnc://user:secret@localhost:5901

Screen Shot 2019-04-30 at 7.31.32 PM.png

Wow, this is the coolest docker I ever have tested out, looks like I got my work cut out for me! Thanks again!

from wdio.

blueimp avatar blueimp commented on September 14, 2024

Glad you like the setup! ☺️

from wdio.

sayurimizuguchi avatar sayurimizuguchi commented on September 14, 2024

For me the fix was changing

from

require('ts-node/register');

to

require('ts-node');

from wdio.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.