Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for user signup/login #76

Open
renodubois opened this issue Jan 18, 2018 · 4 comments
Open

Tests for user signup/login #76

renodubois opened this issue Jan 18, 2018 · 4 comments
Assignees
Labels
component/frontend type/test Integration/Unit Test

Comments

@renodubois
Copy link
Contributor

renodubois commented Jan 18, 2018

Hammer those pages with valid/invalid inputs.

would be super nice and awesome, but requires some research into browser automation testing

To Get Started:

  • Find a browser automation testing plugin in JS that works, and can be figured out easily.
  • Write some basic tests using that plugin to get used to it (doesn't have to be for our site specifically, just to get you adjusted.
  • Start writing tests for the login/signup page. Basic idea is to navigate to them, and then try valid inputs, make sure they work, try invalid stuff, make sure they fail and proper error messages come up, etc.
  • If DEVOPS - Add TravisCI support #36 is done when working on this, integrate the tests to be run automatically via TravisCI.
@renodubois renodubois self-assigned this Jan 18, 2018
@renodubois renodubois removed their assignment Jan 31, 2018
@dnhess dnhess self-assigned this Feb 23, 2018
@dnhess
Copy link

dnhess commented Feb 23, 2018

This automation plug looks pretty promising: http://nightwatchjs.org/
Also, this medium post looks like a pretty solid guide on doing a bunch of things with nightwatch: https://medium.com/@mikaelberg/zero-to-hero-with-end-to-end-tests-using-nightwatch-saucelabs-and-travis-e932c8deb695

@dnhess
Copy link

dnhess commented Feb 23, 2018

Installing Nightwatch:
npm install -g nightwatch
Note: This installs nightwatch globally on your machine.
Nightwatch requires selenium in order to run. You need to have java version 7 or higher in order to run selenium.
Installing Selenium:
npm install selenium-standalone@latest -g
selenium-standalone install

In order to run nightwatch you first need to start selenium and this can be accomplished by running:
selenium-standalone start
Once that is running nightwatch can run test by simply typing in nightwatch inside the terminal

@renodubois
Copy link
Contributor Author

Is there a good way to make nightwatch and selenium part of the normal dependencies for the project (i.e. having them in the package.json or do they have to be installed globally?

It would be nice for us to be able to have this all included when running npm run setup inside the root of the project.

Also with that, an npm script to run the tests would be great as well. Let me know if that seems reasonable, or if it won't work or something like that.

@dnhess
Copy link

dnhess commented Mar 2, 2018

I got nightwatch and selenium to install locally. Just for testing I created a script to see if it would work using npm. This test can be ran using npm run testing. I'm not sure how well it work work on a different machine since I've uninstalled and reinstalled selenium and nightwatch multiple times.

Edit:

This does change how nightwatch and selenium is launched in order to run. New way to run it is:
Nightwatch - ./node_modules/.bin/nightwatch
Selenium - ./node_modules/.bin/selenium-standalone start

@dnhess dnhess mentioned this issue Mar 21, 2018
@renodubois renodubois added the type/test Integration/Unit Test label Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/frontend type/test Integration/Unit Test
Projects
None yet
Development

No branches or pull requests

2 participants