<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - noah</title>
<link>http://snipplr.com/users/noah/tags/testing</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 20 Jun 2013 14:33:44 GMT</pubDate>
<item>
<title>(Ruby) Watchr config for use with PHPUnit</title>
<link>http://snipplr.com/view/51383/watchr-config-for-use-with-phpunit/</link>
<description><![CDATA[ <p>A simple [Watchr](https://github.com/mynyml/watchr) config for running PHPUnit tests.

This will run a [Pake](https://github.com/indeyets/pake/wiki) task called "test" and ring the system bell if the task fails.  *Ringing the system bell* is especially nice when running inside a GNU Screen session.

*Installation*

To install you need [RubyGems](http://rubyforge.org).  Then type:

        sudo gem install watchr</p> ]]></description>
<pubDate>Thu, 31 Mar 2011 14:28:22 GMT</pubDate>
<guid>http://snipplr.com/view/51383/watchr-config-for-use-with-phpunit/</guid>
</item>
<item>
<title>(Perl) Detect PHP files with trailing whitespace, using Perl</title>
<link>http://snipplr.com/view/46218/detect-php-files-with-trailing-whitespace-using-perl/</link>
<description><![CDATA[ <p>The following incantation returns nonzero exit status when the terminating `?>`  of a PHP file, is followed by whitespace.</p> ]]></description>
<pubDate>Wed, 29 Dec 2010 08:25:03 GMT</pubDate>
<guid>http://snipplr.com/view/46218/detect-php-files-with-trailing-whitespace-using-perl/</guid>
</item>
<item>
<title>(Ruby) analysis of Hudson JUNit logfiles</title>
<link>http://snipplr.com/view/44499/analysis-of-hudson-junit-logfiles/</link>
<description><![CDATA[ <p>assuming you are standing in`$HUDSON_HOME/jobs/job_foo/builds/123`</p> ]]></description>
<pubDate>Sat, 20 Nov 2010 17:15:44 GMT</pubDate>
<guid>http://snipplr.com/view/44499/analysis-of-hudson-junit-logfiles/</guid>
</item>
<item>
<title>(Ruby) Howto set up a Rake task to start and stop the Selenium-RC server</title>
<link>http://snipplr.com/view/27992/howto-set-up-a-rake-task-to-start-and-stop-the-seleniumrc-server/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 08 Feb 2010 23:01:08 GMT</pubDate>
<guid>http://snipplr.com/view/27992/howto-set-up-a-rake-task-to-start-and-stop-the-seleniumrc-server/</guid>
</item>
<item>
<title>(Ruby) Howto set up a Rake task to run Cucumber features and generate reports</title>
<link>http://snipplr.com/view/27990/howto-set-up-a-rake-task-to-run-cucumber-features-and-generate-reports/</link>
<description><![CDATA[ <p>Note that Rake is slower than just running `cucumber`</p> ]]></description>
<pubDate>Mon, 08 Feb 2010 22:41:45 GMT</pubDate>
<guid>http://snipplr.com/view/27990/howto-set-up-a-rake-task-to-run-cucumber-features-and-generate-reports/</guid>
</item>
<item>
<title>(Ruby) Howto set up a Rake task to run RSpec spec docs</title>
<link>http://snipplr.com/view/27985/howto-set-up-a-rake-task-to-run-rspec-spec-docs/</link>
<description><![CDATA[ <p>A `rake :spec` task, is created by default just from including the RSpec rake module.

The way to *stop RSpec tasks from failing* the entire Rake job when a test barfs, is by setting `fail_on_error` to false.</p> ]]></description>
<pubDate>Mon, 08 Feb 2010 21:23:31 GMT</pubDate>
<guid>http://snipplr.com/view/27985/howto-set-up-a-rake-task-to-run-rspec-spec-docs/</guid>
</item>
<item>
<title>(Ruby) How to call JavaScript in the Application Under Test, from Selenium</title>
<link>http://snipplr.com/view/19872/how-to-call-javascript-in-the-application-under-test-from-selenium/</link>
<description><![CDATA[ <p>When writing functional tests with Selenium, it is often convenient to call JavaScript functions and methods, that are part of the Web application you are testing.  After all, Selenium is a functional testing framework for Web UI and most of the exciting bits of Web UI are JS (sorry, all you CSS hackers, but them's the facts). 

The problem is that it's not immediately obvious how you can access the DOM of the Application Under Test (AUT).  Selenium Core (in which all Selenium tests execute) is a frame set, and if you simply try to call your JavaScript with `getEval`, you'll get an error because `getEval` references Selenium Core's DOM, not the DOM of the AUT.

Fortunately the answer is simple.  Use `this.browserbot.getCurrentWindow()` to get a reference to the `window` object in *your* DOM.  Then you can execute any of the JS that lives in your page, right from Selenium!

This example uses the Ruby driver, but the principle is the same regardless of which language you use.</p> ]]></description>
<pubDate>Thu, 17 Sep 2009 13:14:43 GMT</pubDate>
<guid>http://snipplr.com/view/19872/how-to-call-javascript-in-the-application-under-test-from-selenium/</guid>
</item>
<item>
<title>(Other) How to configure the output format of the W3 CSS Validator</title>
<link>http://snipplr.com/view/19817/how-to-configure-the-output-format-of-the-w3-css-validator/</link>
<description><![CDATA[ <p>The W3 CSS validator is pretty simple to [install locally for use behind the firewall](http://www.emacswiki.org/emacs/FlymakeCSS).

However, by default the validator spits out the whole CSS file after validation, which is inconvenient if your stylesheet is more than a few lines long.

Unfortunately it's not so obvious how to configure the validator to give pretty-printed, human-readable output.  In fact, all there is to it, is to choose a different output format from the several that are supported :)

By default the validator .jar file gives you "text" output, which includes the stylesheet.  To choose a different format, invoke the validator .jar file with an -output argument, like this:

    java -jar css-validator.jar -output  local-file:foo.css

where `` is any of xhtml, xml, text, soap12, json, ucn or gnu

If you just want the errors as (html-escaped) plain text, but without the CSS included, use `gnu`</p> ]]></description>
<pubDate>Wed, 16 Sep 2009 11:53:08 GMT</pubDate>
<guid>http://snipplr.com/view/19817/how-to-configure-the-output-format-of-the-w3-css-validator/</guid>
</item>
<item>
<title>(JavaScript) Find Verbose IDs in the DOM</title>
<link>http://snipplr.com/view/6474/find-verbose-ids-in-the-dom/</link>
<description><![CDATA[ <p>Traverses the DOM tree and reports if any IDs are over 30 characters in length.  Doesn't check for doubled IDs because that's caught when validationg the HTML.</p> ]]></description>
<pubDate>Tue, 27 May 2008 17:08:12 GMT</pubDate>
<guid>http://snipplr.com/view/6474/find-verbose-ids-in-the-dom/</guid>
</item>
<item>
<title>(HTML) Tested in...</title>
<link>http://snipplr.com/view/3426/tested-in/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 30 Jul 2007 22:40:05 GMT</pubDate>
<guid>http://snipplr.com/view/3426/tested-in/</guid>
</item>
</channel>
</rss>