1. #1
    Sencha User nenadg's Avatar
    Join Date
    Jun 2014
    Posts
    4
    Vote Rating
    3
    nenadg is on a distinguished road

      1  

    Default Critique request: Jasmine testing Ext JS outside of browser

    Hi all,

    I've been working on pretty hefty Ext JS application for some time, and in the process we made this tool for testing end-to-end scenarios that fits in our development cycle. Our goal was not to test separate units (which can be considered as bad practice), rather some user's scenario. Of course, one can do unit testing because basically those tests are Jasmine tests.

    The tool works along 'sencha app build' process and will test Ext JS (JavaScript) code in the end.

    It would be great if you could test it and give your feedback, since there are no tools that I'm aware of, that run along build process, that can test your product at the end. And for what we have - all are in-browser testing scripts.

    I've been looking for the way to separate plain code testing from browser-dependent testing, and I think this could be it.

    Here's the link: https://github.com/nenadg/jasmine-no...s-testing-tool

    Thanks!

    (already posted this in other thread)

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    6,375
    Vote Rating
    155
    Gary Schlosberg is a name known to all Gary Schlosberg is a name known to all Gary Schlosberg is a name known to all Gary Schlosberg is a name known to all Gary Schlosberg is a name known to all Gary Schlosberg is a name known to all

      1  

    Default

    With what versions of Ext JS does this work?
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

  3. #3
    Sencha User nenadg's Avatar
    Join Date
    Jun 2014
    Posts
    4
    Vote Rating
    3
    nenadg is on a distinguished road

      1  

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    With what versions of Ext JS does this work?
    5.x

  4. #4
    Sencha - Tools Team arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,425
    Vote Rating
    64
    arthurakay is just really nice arthurakay is just really nice arthurakay is just really nice arthurakay is just really nice arthurakay is just really nice

      2  

    Default

    Seems like a cool idea. I'd love to see a video of this in action, only because it involves a lot of setup time. I assume your own projects have a lot of tests written already too, which would be cool to see.

    Do you care to comment about how this might be different from running Siesta with PhantomJS? I've never been a fan of running DOM tests in Node (even with JSDom) simply because it isn't the true DOM (whereas PhantomJS is). Perhaps you can change my mind :-)

  5. #5
    Sencha User nenadg's Avatar
    Join Date
    Jun 2014
    Posts
    4
    Vote Rating
    3
    nenadg is on a distinguished road

      1  

    Default

    I must say that I haven't played much with PhantomJS, since at the point I started with this, I was unable to load Ext JS application with it. On the other hand jsdom is a tool I've been using heavily from it's starts (it came as logical choice since I've been working with Node).


    The hole point of loading Ext JS app and test it this way is because I use Jasmine a lot, and there was no way to automate testing process in ways of no brainer 'let it run and fail/pass' if possible during build period. Configuring DOM that come with jsdom is completely other story, and that was hard part (and a bit hacky). Also, IMHO jsdom's DOM is agnostic DOM and that makes it kind of ideal for end-to-end scenarios once you succeed with loading something complex as Ext JS, and that's what I did there.


    And for setup, as a matter of fact, it should be really simple to use it. The explanation I provided at Github page seems a bit complex though.


    I've ran small part of tests with this tool, since it's in unpolished state (for example, there is no canvas support, yet we use Sencha Charts), that's why I was looking for second opinion - is it worth trying to push this further?


    Running Jasmine tests at build time seems like good thing to me .

Similar Threads

  1. Ext JS 4.x view Testing - Jasmine
    By vipinsudhakar in forum Ext: Q&A
    Replies: 1
    Last Post: 20 Feb 2014, 8:06 AM
  2. [FIXED] Bug in Jasmine testing doco (with fix)
    By davecrane in forum Ext:Bugs
    Replies: 1
    Last Post: 10 May 2013, 8:36 AM
  3. Jasmine testing, how to set it up correctly
    By zwikske in forum Sencha Touch 2.x: Discussion
    Replies: 1
    Last Post: 7 Jan 2013, 12:30 AM
  4. Unit testing with Jasmine
    By ccornutt in forum Ext: Discussion
    Replies: 4
    Last Post: 8 Dec 2011, 3:45 PM

Thread Participants: 2

Tags for this Thread