Comments (21)
Automated browser testing would certainly be helpful. How much effort does it take to set up and author tests? Would you be interested in setting it up for us?
from wet-boew.
Yeah big +1 for this!
from wet-boew.
Creating testing with the IDE is fairly quick and straightforward, but my experience is more in using the .Net flavour through pure code. For this project I think using the IDE/Selenese test might be preferable rather than introduce a new language constraint. There is also the option of exporting tests created in the IDE to Java, Ruby, C#, php, python, or perl which would give others a good starting point for testing any custom work they do.
I'll try to commit some time this weekend for tests around those Mega Menu issues as a starting sample.
from wet-boew.
Although it can be more powerful if you're doing it from the command line & tying it into Simpletest or even PHPUnit like:
http://codebaboon.com/economist-testing-drupal-using-selenium
Ultimately, you can get anyone to record behaviors using their web browser using the Firefox plugin and then save this as a test or a test suite. There are lots of other options too. This can then be easily shared & opened by the plugin. No server side tools are required.
I've got one listed here:
http://pastebin.com/B4iaLzpf
This isn't the dominant way to do unit testing in Drupal, but it's fast and easy & there's documentation for it here:
http://nodeone.se/sv/node/726
Let's start generating a few basic unit tests & sharing them here.
from wet-boew.
adding link to related issue in Drupal Variant
wet-boew/wet-boew-drupal#44
from wet-boew.
I have taken a look at this and while Selenium is great I think we should probably use PhantomJS + CasperJS. Take a look at what casperjs offers here: http://casperjs.org/
Quite simply amazing!
from wet-boew.
The one thing Selenium offers that CasperJS doesn't is a simple UI for creating the tests using a simple Firefox plugin. There are a bunch of competing ways to programatically write tests, but like wiki markup, there's a whole new structure to learn for each one. Selenium can get folks started without having to learn the proper format for writing a test.
from wet-boew.
Yeah I agree with Selenium offering an easy program but casperjs is written in JS which I know the wet-boew folks would appreciate and the fact that it has css3 jquery selectors makes writing the code fairly easy. It also looks looks like this is what phase 2 is using.
https://docs.google.com/presentation/d/1IfPKMatoOF9nstMKrh8YuS0NC2Ozw04eqlpEOjceFD4/edit#slide=id.p
http://www.nyccamp.org/sessions/testing-your-drupal-site-friendly-ghosts
http://www.lullabot.com/events/events/2012-06-22-eric-duran-and-brock-boland-presenting-drupaldelphia
Additionally there is a working example to get this done in drupal which I am finishing up right now.
from wet-boew.
The reason I suggested Selenium is for the ability to test multiple browsers (not just WebKit based browsers), as WET has seen a few interesting issues with IE. The Selenium tests are intended for the integration phase, and not the unit tests where something like Jasmine, QUnit, etc... would be a better fit.
from wet-boew.
Yeah I think it is fair to have Selenium in for the integration phase and test all of that stuff but for simple one off unit tests I nominate for casperjs + junit. I actually got basic tests running with casperjs with relative ease. I'll live the selenium stuff to @nschonni as has a handle on it :)
from wet-boew.
Good news @mgifford I got Selenium working as well with Travis doing a basic login :) The script I got working runs a testsuite with itself can have many test cases. Runs using xvfb + firefox but apparently ie + chrome are easy drivers to add.
from wet-boew.
That's great. You're adding those tests to your sandbox on git?
from wet-boew.
Yeah on one of my demo ones I have the tests running but for some reason still can't login as the tests return a 302 so still some things to figure out ^_^
from wet-boew.
All fixed up and added to main wet-boew-drupal. I have both Selenium + CasperJS working.
Selenium: currently tests by logging in as administrator and logging out
CasperJS: checks that there are three headlines on the front page
Not that the base is done can do a lot of crazy things with both of these libraries!
from wet-boew.
Any progress on this for WET core? Should this remain open?
from wet-boew.
What's the status of using Selenium for testing? Do we still need to look into it or are existing testing methods sufficient?
from wet-boew.
We're making some progress on it. It's definitely still needed. Will contribute back when we can.
from wet-boew.
@mgifford et al. We are pushing forward with saucelabs as our first kick at the can with testing. I will close this thread, but feel free open another issue when you are get your findings back
from wet-boew.
PS: SauceLabs is Selenium testing
from wet-boew.
@nschonni - ok I deserve a whack on the noggin for that "Doooh"!
from wet-boew.
Well, it uses Selenium, but you're right that it isn't the same type of Selenium testing we were talking about at the beginning of the thread
from wet-boew.
Related Issues (20)
- [BUG] Text to speech problem when selecting checkboxes in the tag filter
- Datatables - column with sorting disabled generates invalid aria-controls value of undefined HOT 7
- [AUTRE] Accessibilité (Langues officielles) - Captures d'écran et instructions d'une application externe en anglais seulement HOT 1
- the wet style guide be updated to reflect the latest Accessibility guidelines HOT 1
- Tabbed Interface - Carousel's controls have accessibility issue HOT 2
- Issues with DataTables HOT 3
- External table initialisation function not found. HOT 21
- Form validation: error message behaviour HOT 6
- Row header in datatables getting sorting classes in v4.0.45+ HOT 4
- How to perform remote validation with WET? HOT 2
- Pie chart - HOT 4
- Question re: <section data-ajax-replace="ajax/data-ajax-extra-en.html"></section>
- [BUG] Tables - removing sorting from a column generates aria-controls="undefined" HOT 3
- Datatable CSS and Column Sorting HOT 7
- Share widget: HOT 6
- [BOGUE] Charts - Problème avec les apostrophes HOT 3
- [OTHER] Twitter Widget - Fails WCAG 2.1 HOT 1
- [BUG] Equalize - Update doesn't work anymore HOT 6
- [OTHER] Datatables.net child row HOT 6
- [BUG] Datatables.net - header tooltip when sorting is disabled HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wet-boew.