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

Evaluate to implement browsertesting on commit of the demo #206

Closed
evilaliv3 opened this issue Mar 19, 2016 · 5 comments
Closed

Evaluate to implement browsertesting on commit of the demo #206

evilaliv3 opened this issue Mar 19, 2016 · 5 comments
Labels

Comments

@evilaliv3
Copy link
Contributor

Given the hight usage of the library it would be important to start implementing at least browser-testing of commit of the demo.

This would allow to detect defects happening on some specific browser/version and would make all in possibility to collaborate in the fix; e.g. this would help in solving readly #205, #189, #179, #162, #129

Given the fact that still no unit test is in place i think a good choice could integrate travis.ci + grunt + nightwatch + saucelabs, and the minimum viable product would be to have a browsertesting of the basic demo but executed on the new library result of every commit.

It would be great during the testing to integrate Codeclimate in order to keep track of the code maturity and the code coverage of the tests.

All the softwares i'm suggesting are opensource and the cloud services involved are offering a complete free support for opensource projects so that it would be great if start adopting them as they would allow to do something like the following: ghostbar/angular-zxcvbn#12

e.g.: https://github.com/globaleaks/GlobaLeaks
screenshot from 2016-03-14 20 36 40

@jimmywarting
Copy link
Collaborator

Could be hard to test the actually saving part, but could build a mock for that.
A code coverage would be good, Then we can test stuff like if it's safe to remove filesystem? #174

@jimmywarting
Copy link
Collaborator

jimmywarting commented May 27, 2016

I spoke with the BrowserStack team, they love open source projects and they are willing to offer free access to many browser that we could then test on each pull request.

They have all desktop browsers and a bunch of mobile browsers too like a couple of android phones, iOS and even Lumia that we have a issue for #193 #124
Here is a complete list of all the browser that they have

I could set up Travis, code coverage, BrowserStack and a few test for you to bring continuous testing if you want @eligrey.
Would not even have to test the code our self, we could just see if the test passed in the pull request

All BrowserStack ask for in return is that we mention them in the README.md and also on the demo page

@eligrey
Copy link
Owner

eligrey commented May 27, 2016

How would we actually test this tough? Also old versions of the Android browser don't support any of the saving methods we use. Genymotion and the standard Android emulator images will also allow you to test those browsers for debug purposes.

Fully automated testing doesn't seem possible for this library though, since there aren't any "downloadfinished" events or something similar to measure success with.

@jimmywarting
Copy link
Collaborator

jimmywarting commented May 27, 2016

We can not really test the download finished part but what we can build is "mocks" and we can test the quality of the code.

like if it's safari expect it to run this function. if it has msSaveOrOpenBlob expect it to do that

if the blob needs BOM fix determined of the mimetype expect the blob to be prefixed with a string

I used code coverage to determinate what code wasn't not being executed when i run the test in chrome and i cold see exactly what code was not being used according to this report

We could perhaps built some test that are using blob.js polyfill also?

@evilaliv3
Copy link
Contributor Author

@eligrey on some browsers like firefox it is perfectly doable to test for file downloads using selenium webdriver that is the technology used by both browserstack and saucelabs.

e.g. in GlobaLeaks were we are using FileSaver we are already doing this for rechecking the file download; but obviously on the FileSaver repository the tests could be more fine and cover all the library in its specific functions.

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

3 participants