SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict SLEE's Avatar
    Join Date
    Aug 2003
    Location
    uk
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    js testing using selenium

    I would like to look at doing some testing and ive found far too many different ways of doing this but with very limited tutorials to help get things set up.
    i'd like to be able to do some testing that can test cross browser and actually run the tests visually in the browser take screenshots etc if there is an error.
    Is Selenium the best for this? are there any other scripts i should have a look at? if i were to use Selenium what test suite should i look to use it with? I have seen Mocha is this good for this? Any help would be much appreciated.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,718
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by SLEE View Post
    Is Selenium the best for this?
    Yes

    Quote Originally Posted by SLEE View Post
    are there any other scripts i should have a look at?
    Saucelabs provides automated online testing with screenshots, which can be worthwhile to chcek out too.

    Quote Originally Posted by SLEE View Post
    if i were to use Selenium what test suite should i look to use it with?
    Use the test suite that you are most comfortable with. I for example am getting to grips with Intern. Would I spend time with some other suite? Sure - but not until after I've had plenty of experience with this current one.

    Quote Originally Posted by SLEE View Post
    I have seen Mocha is this good for this?
    Yes, Mocha is very good too. Here's a good article on Getting Started With Mocha and Chai
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Addict SLEE's Avatar
    Join Date
    Aug 2003
    Location
    uk
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks ive not used any yet ill have a look at intern and Mocha thanks for the link Have you used Selenium purely using js?

  4. #4
    SitePoint Addict SLEE's Avatar
    Join Date
    Aug 2003
    Location
    uk
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK Intern looks good as it has out of the box selenium support. I al using a restricted computer so i can't simply use npm to install everything. What and where should i put the downlaod for Intern and are there any dependancies it would download if i had npm running? I do have not but only running local files.

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,718
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by SLEE View Post
    OK Intern looks good as it has out of the box selenium support. I al using a restricted computer so i can't simply use npm to install everything. What and where should i put the downlaod for Intern and are there any dependancies it would download if i had npm running? I do have not but only running local files.
    There's a pretty good getting-started tutorial over at https://github.com/bitpshr/intern-tutorial
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #6
    SitePoint Addict SLEE's Avatar
    Join Date
    Aug 2003
    Location
    uk
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    excellent thanks that is a good starting point

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,718
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by SLEE View Post
    excellent thanks that is a good starting point
    I also explored automated testing yesterday, where saving a file triggers the test suite, with varied results due to issues with win32console. So you may be interested in my post about automated testing and fixing win32console
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •