This is a draft for an Acceptance testing framework in Javascript. See the example code.
- Server agnostic.
- Tests in parallel.
- The developer can stop a running test whenever he wants.
- The framework can keep failed tests in iFrame instances, allowing the developer to debug them in the browser easily.
- Given tests aren't run by default upon page load, the developer can start the current page's tests with a keyboard shortcut (e.g
Ctrl+T
).
- The framework is added in the page header.
- The framework runs the acceptance tests (see example file).
Each function (such as visit()
, fill_in()
) triggers the correct events and automagically asserts results.
Upon page load, body
is replaced with an iFrame which loads the same page URL. The tests will run inside this iFrame, allowing the page to load different URLs without stopping the testing framework.
e.g if we open www.example.com, the framework creates an iFrame (width and height 100%) that loads www.example.com. The test framework can trigger events inside the iFrame normally.