fluncrunner

Run flunc tests through the web
Download

fluncrunner Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Publisher Name:
  • Ethan Jucovy

fluncrunner Tags


fluncrunner Description

Run flunc tests through the web fluncrunner is a project that runs flunc tests (suites of twill scripts with variables) through the web.The APIThere is a web API for running a flunc test.Executing a testTo execute a test, POST to the test's execution URI.To execute a test with global variable overrides, provide a www-form-urlencodedset of key=value pairs in the request body. For example::POST /basic_test/ HTTP/1.1Content-Type: application/x-www-form-urlencoded username=lammy&password=testy&name_of_friend=bob will execute a command like::flunc -D username=lammy,password=testy,name_of_friend=bob basic_testInspecting a testTo discover the available variables in a test, GET the test's inspection URI.An HTML form will be returned, suitable for POSTing back to the server.If available, default values (from the test's corresponding .conf) will bedetailed in the form fields' pre-filled values.Configuring the serverThe fluncrunner server uses Paste Deploy for configuration.A sample configuration, suitable for forking, can be found in /docs/devel_config.iniAn app_factory is provided. It implements the test execution APIand requires one piece of configuration: a filesystem path thatpoints to a directory of flunc tests that may be run. This isequivalent to flunc's -p option on the command line:: use = egg:fluncrunner search_path = %(here)s/ftests/You will want to configure this app to respond to POST requests.A composite_factory `request_method` is provided which willdispatch requests to applications based on request method:: use = egg:fluncrunner#request_method post = fluncNo automated implementation of the test inspection API is provided.If you have a directory of static HTML forms that implement the APIfor your flunc tests, you may want to configure a static file serverto respond to GET requests:: use = egg:fluncrunner#request_method post = flunc get = static use = egg:Paste#static document_root = %(here)s/ftest_forms/The Paste static file server infers Content-type from file extensions,so if you want to serve flunc test forms that don't have *.html namesyou may want to use the provided `force_html` filter_factory whichsets Content-type: text/html on all responses:: use = egg:Paste#static document_root = %(here)s/ftest_forms/ filter-with = force_html use = egg:fluncrunner#force_htmlIf you are not serving fluncrunner from Paste, you can configurethis WSGI pipeline in code. You can find the needed WSGI factoriesin `fluncrunner`'s `main.py`, `force_html.py` and `request_method.py`.twill.jsThere's http://bitbucket.org/ianb/twilljs/ which executes simpletwill scripts (no variables, no suites)A similar API could transform flunc tests into twill scripts.Somehow that feels more friendly to me than variables in twill.js.A server would be responsible for interpolating variables providedby the requesting client and serving a "standard" twill script.Flunc suites could also be compiled down to twill scripts this way. Requirements: · Python


fluncrunner Related Software