Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Completely new to functional web testing. How do I get started exactly?

$
0
0
The "Functional testing with a tabs widget” section shows you what a sample test runner file looks like.  You’ll need to have an HTML file like that one to run tests in your browser.

It sounds like you haven’t written unit tests either, so if you need a guideline on where to put tests, make a “test” folder and write all your test scripts in files under that folder.  If you’re working on a site that has a build process, you should exclude the test folder when building to deploy to production.

Then you just need to add script references to all the files in your test folder in your runner HTML file.  

If you’re using StealJS (or any other AMD) along with FuncUnit, you can add a script reference to it in your runner and make your tests into a module.

The way FuncUnit works is that it launches a new browser window with your full site and automates the interactions with the site from the page running FuncUnit.  This is why you need a separate HTML file (for running FuncUnit) and don’t need to add anything to your existing site’s pages.

HTH

Viewing all articles
Browse latest Browse all 3491

Trending Articles