ariatemplates/ariatemplates — pull request #1084 by jakub-g (2014-04-04 13:58:21+00:00)
Title: feat #1084 Add a simple way to run one test

This commit imports our `beta.html` test page into opensource world.

This is to make it easy to continuously run just a single test for
debugging purposes, without
- the need to configure Attester
- being forced to use the old test runner available via `npm start`

The commit largely imports our CC files ontouched, with just some
adjustments to the paths included in the page.

The differences with respect to to the original `beta.html`:
- `devfiles` and `verbose` flags are true by default
- if no classpath provided, then a form is displayed asking for classpath,
instead of running the whole suite
- page is renamed to `test.htm` though `beta.html` is there for
compatibility

If a developer has an instance of Apache server running, with his
`localhost/aria-templates/` pointing to AT Maven build folder, they may
append the following lines (as an admin) to
`C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf`
and restart the Apache service in order to have equivalent
`localhost/aria-templates-git/` pointing to the root folder of this Git repo,
with compatible URL scheme for running tests:

AllowOverride None
Options Indexes
Order allow,deny
Allow from all

Alias /aria-templates-git "G:\gh\at"

and then he may run the test navigating to

http://localhost/aria-templates-git/test/test.htm?testClasspath=...

(`beta.html` is also there and redirects to `test.htm`).

The advantage of this solution is that the developer doesn't have to start
anything it the Apache daemon is registered as a system service, and
there's no need for setting up any file sync tool, because files are taken
directly from the Git repo and they're not cached by default by Apache on
the server side.

If a developer doesn't have Apache installed, but has Python instead, he
may create an ad-hoc server from command line (from AT root folder)
using for instance those aliases

alias serve2='python -m SimpleHTTPServer 88' # python2
alias serve3='python -m http.server 88' # python3

and then navigate to

http://localhost:88/test/test.htm?testClasspath=...

Anyway the developer has to set up some server, because dealing with XHR
requests through `file://` protocol is a mess in modern browsers.

Close #1084