简体   繁体   中英

is it possible to perform e2e testing of a pure js class with gulp-jasmine-phantom

Specific scenario is that, I have a es6 class can add class to a dom upon scrolling to certain point on the screen. So to simulate that scrolling I realized I actually need to create page for that. I found that use phantomjs is the most comment way. I also found that people use jasmine + phantom for similar e2e .

Though I wonder when I use gulp-jasmine-phantom from npm , am I able to also do e2s as the above example did? How to set it up? Because I did not see similar setup of using phantomjs calling the test file and the .html file for the e2e testing.

If this is not the right approach, should I give up running phantomjs based e2e test with gulp?

PhantomJS is a great tool and some people use it in combination with other tools for end to end testing, but it alone does not do so, nor do they make any claims.

With your setup, you already have great tools at your disposal with gulp and Jasmine. For true end to end testing you need front end interaction which can be achieved Casper , or one of my personal favorite Selenium which allows for testing in multiple browser.

If you are using Angular I recommend Protractor which is itself an end to end testing framework.

Hope that helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM