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

Automated UI Testing #349

Closed
2 tasks done
hobinjk opened this issue Oct 23, 2017 · 6 comments
Closed
2 tasks done

Automated UI Testing #349

hobinjk opened this issue Oct 23, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@hobinjk
Copy link
Contributor

hobinjk commented Oct 23, 2017

The UI is currently untested. Approaches this could take include the following:

@hobinjk hobinjk added the epic label Oct 23, 2017
@hobinjk hobinjk added this to the 0.3.0 milestone Oct 23, 2017
@mrstegeman mrstegeman removed this from the 0.3.0 milestone Jan 18, 2018
@benfrancis benfrancis changed the title Test User Interface Automated UI Testing Feb 20, 2018
@benfrancis benfrancis added this to the 0.4 milestone Feb 20, 2018
@hobinjk
Copy link
Contributor Author

hobinjk commented Mar 2, 2018

From initial investigation I'm pretty torn between Casper and Selenium. Selenium has a slight edge due to its long history and use of the WebDriver spec so I'm going to try writing a simple test using it.

Nightmare

Phantom

  • Chrome headless

Slimer

  • Phantom API with firefox
  • Supports promises

Casper

  • Layer on top of Phantom and Slimer
  • http://casperjs.org/
  • A little weird, not natively promise-based
  • built-in testing support

Puppeteer

Selenium/WebDriverJS

Marionette

  • Python
  • Lots of firefox-specific testing functions like switching to chrome context

Mochitest

  • Not really documented for use outside of firefox

Firefox Puppeteer

  • Literally recommended against in the docs

@sogaani
Copy link
Contributor

sogaani commented Apr 5, 2018

If #812 is approval, we can use jsdom.
I want to port tests for JSON SCHEMA form from here.

@sogaani
Copy link
Contributor

sogaani commented Apr 25, 2018

@hobinjk
I wrote thing-view test with jsdom on #935.
Which do you think is better testing with jsdom or browser in this case.

Testing with jsdom is faster than browser, but we should write polyfills and can not view screen.

Testing with brower is slower, but we can take screen and test end to end.

I think testing on browser is better and can rewrite, because thing-view dose not have many test per thingType.

@hobinjk
Copy link
Contributor Author

hobinjk commented Apr 25, 2018

@sogaani I think for the thing-view it makes more sense to use the browser since it's less tightly coupled with the implementation. There are plans for us to refactor the thing views based on a capabilities model (as opposed to the current type-based model) which would significantly change the class structure but ideally not change the displayed UI.

The jsdom tests are very cool though and definitely something I like for testing components that are less likely to change dramatically.

@sogaani
Copy link
Contributor

sogaani commented Apr 25, 2018

@hobinjk I heard good things. I was wondering which way to implement, but if there is a major change in the structure I will test using browser.

@mrstegeman mrstegeman modified the milestones: 0.4, 0.5 May 1, 2018
@hobinjk hobinjk self-assigned this May 29, 2018
@hobinjk
Copy link
Contributor Author

hobinjk commented May 29, 2018

While we don't have 100% coverage of the UI the initial implementation is very much done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants