title: how to unit test google apps scripts?
body: <p>I'm trying to get set up with unit tests for google app scripts, and I found two projects:</p>
  
  <p><a href="https://code.google.com/p/gas-unit/" rel="noreferrer">https://code.google.com/p/gas-unit/</a>
  <a href="https://code.google.com/p/gasunit/" rel="noreferrer">https://code.google.com/p/gasunit/</a></p>
  
  <p>So I'm confused which to use :-)</p>
  
  <p>I just had a go with the unhyphenated gasunit, which seems to expect that the script is embedded in a spreadsheet, which I am a little unclear on how to do ... and the scripts I want to test are web based scripts rather than spreadsheet ones</p>
  
  <p>I had more luck testing the hyphenated gas-unit, which managed to send me both an email output of the test and generate a results page in my google site:</p>
  
  <p><a href="https://sites.google.com/site/testappscript2/TestResults" rel="noreferrer">https://sites.google.com/site/testappscript2/TestResults</a></p>
  
  <p>so I'm going to with gas-unit for the moment, but I'd really like to see some official testing framework incorporated by Google.  In particular I'd like to find some way to get these scripts to be run with some frequency to send me the results.  Also I'd love to get some BDD going; see my other posts:</p>
  
  <p><a href="https://stackoverflow.com/questions/15665106/how-to-get-cucumber-capybara-mechanize-to-work-against-external-non-rails-site">How to get Cucumber/Capybara/Mechanize to work against external non-rails site</a>
  <a href="https://stackoverflow.com/questions/15681615/how-to-use-capybara-has-text">how to use capybara has_text</a></p>
  
  <p>Come on Google, you famously have "Testing Rocks, Debugging Sucks" in all your bathrooms?  How about better testing support for Google Apps Scripts?  </p>