Last active
December 17, 2015 10:29
-
-
Save GabiThume/5595096 to your computer and use it in GitHub Desktop.
mediagoblin on FreeNode IRC log on May 06 about selenium/phantonjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
May 06 16:46:47 <gabithume> paroneayea, Hi! I was looking to PhantonJS because ticket #458 and I was thinking about trying casperJS (http://casperjs.org/) for high-level functional tests, should I create some tests on mediagoblin repos? | |
May 06 16:48:20 * LotusEcho (~LotusEcho@2620:0:2820:1400:20c2:ffa1:f60f:b7be) has joined #mediagoblin | |
May 06 16:51:09 * BjarniRunar has quit (Ping timeout: 252 seconds) | |
May 06 16:51:48 <paroneayea> hey gabithume | |
May 06 16:51:49 <paroneayea> looking | |
May 06 16:52:50 <paroneayea> gabithume: hm, what would casperjs give us that we wouldn't have with phantomjs? | |
May 06 16:52:57 <paroneayea> (also, what do you think of selenium?) | |
May 06 17:05:30 * AndChat|511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin | |
May 06 17:05:32 * AndroBug has quit (Read error: Connection reset by peer) | |
May 06 17:06:11 * AndChat-511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin | |
May 06 17:06:35 <gabithume> well, phantomjs is the headless webkit -- it is not a test framework but provides a consistent API to webkit routines (e.g. render, http request, ...) -- so I think we can use casperjs to make easy to do navigational/functional tests as needed | |
May 06 17:07:25 * AndroBug (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin | |
May 06 17:08:02 <paroneayea> gabithume: aha | |
May 06 17:08:29 <paroneayea> gabithume: my other concern might be on the dependency end | |
May 06 17:08:30 <gabithume> however there are lots of test frameworks on top of phantomjs, I don't know which is better, maybe I should start by testing one | |
May 06 17:09:09 <paroneayea> I like the minimalism of phantomjs and friends, though I'm also nervous about "yet another dependency not packaged in many distros" :) | |
May 06 17:09:27 <paroneayea> I think that's my main reason for being pro-selenium | |
May 06 17:09:37 <paroneayea> that might not be a good enough reason | |
May 06 17:10:10 <gabithume> I understand.. I can give a try in selenium then | |
May 06 17:10:20 * AndChat|511 has quit (Ping timeout: 268 seconds) | |
May 06 17:10:37 <gabithume> should I create a dir and include some functional tests? | |
May 06 17:10:49 * AndChat-511 has quit (Ping timeout: 276 seconds) | |
May 06 17:11:53 <paroneayea> gabithume: that would be awesome. | |
May 06 17:12:04 <paroneayea> :) | |
May 06 17:12:39 <gabithume> paroneayea, ok! thank you! | |
May 06 17:15:10 <paroneayea> thank *you* gabithume ! :) | |
May 06 17:16:28 <spaetz> Elrond: No, I am not doing pluggable auth. Security's over my head | |
May 06 17:16:42 <spaetz> and good night, by the way :-). See you tomorrow. | |
May 06 17:17:37 <paroneayea> lata spaetz | |
May 06 17:18:15 * spaetz has quit (Quit: Lost terminal) | |
May 06 17:25:32 * davexunit has quit (Quit: Later) | |
May 06 17:33:16 * ErkanYilmaz1 has quit (Ping timeout: 272 seconds) | |
May 06 17:38:44 <gabithume> hmm I think you are right about using Selenium... Selenium is not headless -- we will need to make sure to have our browsers running -- but has the advantage to be browser agnostic while Phantomjs is headless but webkit-specific | |
May 06 17:38:54 <gabithume> I'm going to take note about it as ticket comments | |
May 06 17:39:37 <joar> selenium launches the browser automatically and separately from the browser you're using. | |
May 06 17:40:32 <joar> I can't tell for sure, but they probably start it up without an associated profile, so it will be an isolated environment from your own browser setup. | |
May 06 17:40:47 <gabithume> it so cool | |
May 06 17:41:31 * AVRS has quit (Quit: leaving) | |
May 06 17:41:54 <gabithume> so, going with selenium... | |
May 06 17:42:28 <joar> http://stackoverflow.com/questions/11226648/is-it-possible-to-use-selenium-web-driver-to-drive-phantomjs | |
May 06 17:45:27 <joar> http://stackoverflow.com/questions/6995016/what-is-the-difference-between-selenium-ide-server-rc-2-0-and-webdriver/6996322#6996322 | |
May 06 17:46:51 <joar> http://net.tutsplus.com/tutorials/javascript-ajax/headless-functional-testing-with-selenium-and-phantomjs/ | |
May 06 17:49:45 * ErkanYilmaz1 (~ErkanYilm@f053216115.adsl.alicedsl.de) has joined #mediagoblin | |
May 06 17:50:03 <Elrond> So you're trying to create unit testing for js? | |
May 06 17:51:08 <gabithume> joar, thank you!! | |
May 06 17:51:18 <joar> :) | |
May 06 17:51:56 <paroneayea> Elrond: functional testing! :) | |
May 06 17:52:03 <paroneayea> well, and probably js unit tests too | |
May 06 17:52:36 <paroneayea> oh wow cool, phantomjs thru selenium! | |
May 06 17:54:29 <gabithume> Elrond, I am trying to start with simple navigational tests to learn about selenium and I think I can go to js tests ASAP | |
May 06 17:54:38 <gabithume> any tips about functional tests for js Elrond? | |
May 06 17:55:40 <gabithume> paroneayea, yeah! we can drive phantomjs using selenium :-) | |
May 06 17:55:46 <paroneayea> so awesome. | |
May 06 17:55:52 <paroneayea> gabithume: you effin' rock | |
May 06 17:56:56 <gabithume> :) | |
May 06 17:59:41 <Elrond> Stupid question: What exactly was functional testing again? | |
May 06 18:01:05 <Elrond> paroneayea, gabithume - What about writing a failing test for this? http://issues.mediagoblin.org/ticket/689 | |
May 06 18:02:39 <paroneayea> Elrond: more of "testing user behaviors" | |
May 06 18:02:44 <paroneayea> as if a user doing things in the browser | |
May 06 18:03:02 <paroneayea> actually, we do this kind of with webtest, our u"unit tests" with webtests are often closer to functional tests | |
May 06 18:03:11 <paroneayea> in the way they mimic user behavior | |
May 06 18:03:31 <paroneayea> but using selenium and etc will actually give us the power of a real browser to make sure things really "appear" the right wayto a user | |
May 06 18:04:51 <Elrond> We should not have too many selenium tests. I guess, they're slow? | |
May 06 18:05:52 <paroneayea> it would not be surprising for them to be slow I suppose | |
May 06 18:06:02 * gustavo_cm has quit (Quit: Leaving.) | |
May 06 18:06:35 <Elrond> Some of our functional tests are trying to be unit tests... | |
May 06 18:07:20 <joar> they're as fast as an impossibly fast user is at navigating the site. | |
May 06 18:07:41 <paroneayea> they do need to start up and shut down the browser I suppose | |
May 06 18:07:50 <joar> so, slow, compared to what we have today, I think, since I guess there's no networking at all involved in current tests. | |
May 06 18:08:18 <joar> You could clean the state of the browser too. | |
May 06 18:08:22 <joar> that would be faaster. | |
May 06 18:09:05 <joar> http://code.google.com/p/selenium/issues/detail?id=40 | |
May 06 18:09:12 <joar> You can't clear the cache. | |
May 06 18:09:16 * paroneayea wonders how this would affect running with -n5 | |
May 06 18:09:22 <paroneayea> joar: oh really?? | |
May 06 18:09:23 <joar> hehehe | |
May 06 18:09:32 <joar> it just says 'the cache' | |
May 06 18:09:35 <joar> don't know about cookies | |
May 06 18:09:57 <joar> http://sqa.stackexchange.com/questions/2881/selenium-2-0-webdriver-clearing-session-data | |
May 06 18:10:18 <gabithume> so, maybe I can try to write a test with selenium to #689? | |
May 06 18:10:29 <joar> http://stackoverflow.com/questions/2191189/clear-session-cookies-with-selenium-ide | |
May 06 18:12:07 <joar> https://github.com/ariya/phantomjs/wiki/API-Reference-phantom#clearcookies-void | |
May 06 18:13:01 * fontana has quit (Quit: Leaving) | |
May 06 18:13:19 <Elrond> sqa.sx?! Ooookay. | |
May 06 18:13:39 <joar> sqa.sx? | |
May 06 18:14:26 <Elrond> <joar> http://sqa.stackexchange.com/... | |
May 06 18:14:56 <Elrond> I didn't know about that SX site. | |
May 06 18:15:02 <joar> Me neither :) | |
May 06 18:15:50 <joar> bedtime! | |
May 06 18:15:52 <joar> good night :) | |
May 06 18:16:04 <Elrond> Alothough beta SX sites can be quite nice. | |
May 06 18:16:47 <joar> in short, seems cookie deletion is inconsistent across browsers. | |
May 06 18:16:55 <joar> haven't found an anser to how it works in phantomjs | |
May 06 18:17:12 <joar> should be in here though: https://github.com/detro/ghostdriver/tree/master/src | |
May 06 18:18:12 <Elrond> gabithume - If you want to? I guess, this would be a good thing. I have not commited the patch in that ticket for two reasons: No unit test and I don't know enough about js to be sure my patch is correct. | |
May 06 18:18:44 <Elrond> gabithume - And we're trying to have tests (unit or functional) for our bugs. So they don't come back, ever. | |
May 06 18:19:41 * basxto has quit (Quit: Verlassend) | |
May 06 18:20:02 <joar> at least not until they mutate ;o) | |
May 06 18:20:18 <Elrond> *G* | |
May 06 18:20:52 <gabithume> Elrond, I understand, I'm going to try to setup a selenium test environment here and include/document in my mg fork, I guess it can be a start | |
May 06 18:22:32 <Elrond> gabithume - Just curious: Is that for gsoc/opw? | |
May 06 18:23:28 * youlysses (~user@75-132-28-10.dhcp.stls.mo.charter.com) has joined #mediagoblin | |
May 06 18:23:51 <gabithume> Elrond, I am applying to opw :) | |
May 06 18:24:28 <Elrond> gabithume - Ahh, okay. | |
May 06 18:24:55 <gabithume> so I'm trying to understand better mediagoblin | |
May 06 18:29:39 <Elrond> gabithume - Writing selenium functional tests for it is a tough thing, I think. | |
May 06 18:30:27 <joar> infrastructure might be tough | |
May 06 18:30:40 <joar> writing the tests should not be terribly awful | |
May 06 18:31:20 <joar> and if gabithume just gets something that's up and working we can figure out the best way to stuff selenium and phantomjs into the shelves. | |
May 06 18:31:43 <joar> I really have to go to bed now though. Good luck and good night :) | |
May 06 18:32:50 <Elrond> Good night joar! | |
May 06 18:33:15 * AndChat|511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin | |
May 06 18:33:24 <gabithume> joar, sure! sorry to bother, and thanks for all the advises, I'll try to setup and ping you guys later again, good night! | |
May 06 18:33:35 <gabithume> Elrond, are you applying for opw as well? | |
May 06 18:35:33 * AndroBug has quit (Ping timeout: 245 seconds) | |
May 06 18:36:04 <Elrond> gabithume - No. I have to finish my phd. No time for this stuff. And need to find a job. | |
May 06 18:38:12 <gabithume> Elrond, cool then! Can I know what is the subject of your phd? | |
May 06 18:40:45 <Elrond> gabithume - theoretical analysis for NMR stuff (Nuclear Magnetic Resonance, probably best known for the MRI scanner in the hospital). Except I know only what wikipedia knows about MRI scanners. ;) | |
May 06 18:42:16 <gabithume> Elrond, wow amazing! physics major? | |
May 06 18:43:11 <Elrond> Yep. | |
May 06 18:43:33 * capo has quit (Remote host closed the connection) | |
May 06 18:43:46 <Elrond> Probably "master" is the right english term. german "Diplom". | |
May 06 18:46:53 <gabithume> oh, ok! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment