Code Monkey home page Code Monkey logo

wdio-demo's Introduction

wdio-demo Build Status

A demo project of Webdriver.io tests with reporting by Allure

How to start

  1. Project requires Node.js and Java
  2. Clone this repository
  3. npm install

Run tests using npm test. It will run browser on your local machine and perform some tests.

Once you have tests finished, run npm run report and you will see the Allure report.

Tests are in test/ folder. You can play around and add new tests. More information about API and supported commands you can find in Webdriver.IO docs

Happy testing!

wdio-demo's People

Contributors

dependabot[bot] avatar just-boris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wdio-demo's Issues

Не запускается тест

/Users/andrey/wdio-demo/node_modules/webdriverio/build/lib/cli.js:369
throw e;
^

Error: Selenium server did not start.Another Selenium process may already be running or your java version may be out of date.
at ChildProcess.errorIfNeverStarted (/Users/andrey/wdio-demo/node_modules/selenium-standalone/lib/start.js:125:15)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
npm ERR! Test failed. See above for more details.

Fails on Windows & Sauce Labs

Hello!

I watched your speech on Ya.Subbotnik and tried to run your demo on my PC, but I can't.

Some info:
Windows 10, npm v.2.14.20, node v.4.4.0

So, I cloned your repo, npm install it. It installed fine, but when I tried to npm test I got an error:

$ npm test

> [email protected] pretest D:\Dropbox\БГТУ\ТиО ПО\lab3
> rm -rf allure-results


> [email protected] test D:\Dropbox\БГТУ\ТиО ПО\lab3
> wdio wdio.conf.js


ERROR: Couldn't connect to selenium server
firefox
    at new RuntimeError (D:\Dropbox\БГТУ\ТиО ПО\lab3\node_modules\webdriverio\bu
ild\lib\utils\ErrorHandler.js:115:12)
    at Request._callback (D:\Dropbox\БГТУ\ТиО ПО\lab3\node_modules\webdriverio\b
uild\lib\utils\RequestHandler.js:264:37)
    at self.callback (D:\Dropbox\БГТУ\ТиО ПО\lab3\node_modules\webdriverio\node_
modules\request\request.js:373:22)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at Request.onRequestError (D:\Dropbox\БГТУ\ТиО ПО\lab3\node_modules\webdrive
rio\node_modules\request\request.js:971:8)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:256:9)
    at emitOne (events.js:77:13)

npm ERR! Test failed.  See above for more details.

So.. after an hour 😀 and tons of rewritings I accidentally changed host from 0.0.0.0 to 127.0.0.1 and firefox started to run. But I still got an error; another error.

$ npm test

> [email protected] pretest d:\Dropbox\БГТУ\ТиО ПО\lab3
> rm -rf allure-results


> [email protected] test d:\Dropbox\БГТУ\ТиО ПО\lab3
> wdio wdio.conf.js


.

0 passing (29.10s)
1 failing

1) "before each" hook for "list repositiories":
timeout of 10000ms exceeded. Ensure the done() callback is being called in this
test.
running firefox
Error: timeout of 10000ms exceeded. Ensure the done() callback is being called i
n this test.
    at null.<anonymous> (d:\Dropbox\БГТУ\ТиО ПО\lab3\node_modules\mocha\lib\runn
able.js:215:19)
    at Timer.listOnTimeout (timers.js:92:15)



Wrote Allure report for Organization page to [./allure-results].
npm ERR! Test failed.  See above for more details.

Also I tried to use Sauce Labs. I set another host and port, set user and key, but got same error. So I tried to remove this line and errors had gone!

That's not all. npm run report opens browser on http://192.168.56.1:55964 but can't load any resources except index.html. I tried to run node-static in ./allure-report and report was loaded fine. I don't know what's the problem :)

So. I'm not sure that I should to send PR, 'cause your demo may works fine on Mac OS X. But it does not work on Windows. I've described some solutions above and hope it helps.

Sorry for too long issue.

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.