WebDriver.IO tests for MeWe.com's registration features.
Clone repository and run npm install
.
To fire all wdio
tests run npm test
.
Page Object pattern is used to abstract any page information away from the tests. Every page extends pageobjects/prototype.page.js
. This helps to make tests more clean.
Actual tests live in test/specs
directory. I've used Mocca(BDD) to describe suites. Chaijs library is used to make assertions more readable.
After running npm test
command, selenium-standalone
package will start a standalone server. selenium-standalone
already includes chromedriver, so it is not necessary to install it separately. Selenium will run Chrome browser and simulate all tests present in the test suite.
- make use of PhantomJS headless browser to make tests much faster, if the purpose of test is just to test functionality, not compatibility
- perhaps make factory for user info generation, so its not always the same
- when testing failing registration, add test for EnterKey press (that might submit the form too)
- I noticed, that after
$('#registration-form').submit();
the form gets submitted but even with valid data user is not registered and is redirected to home page ( that's why I didn't useIndexPage.registrationForm.submit();
inside specs.