A unit testing framework for Google Apps Script, loosely based on python unittest.
GwTest is also available to be accessed directly on Google Drive:
GwTest is used to test itself; the suite available in GwTest_test provides some examples of how to use the testing framework.
The best way to make use of GwTest is to use it add it to your project via Resource > Libraries with the project key: M1PpVYsD2R68uNDajUcXNca_fO5HBBZ0R
GwTest needs certain OAuth security permissions to be run:
- drive: FileTestCase needs to be able to create (and delete) files in Google Drive in order to provide temporary files for use in tests.
- spreadsheets: SpreadsheetTestCase needs to be able to create, delete, and manipulate spreadsheets on Google Drive in order to provide a temporary spreadsheet for use in tests.