<commit_before>﻿jQuery QUnit in .NET
====================

Runs QUnit tests inside .NET by using WatiN.

Based on [<NAME>'s original work](http://www.lostechies.com/blogs/joshuaflanagan/archive/2008/09/18/running-jquery-qunit-tests-under-continuous-integration.aspx), but updated to work with the latest version of WatiN (2.0.5 at the time of writing) and QUnit.

There is also an extension to get the QUnit tests working in NUnit. It is easy to copy this extension and change it to work with your favourite unit testing framework.

Installation
------------

 * [http://nuget.org/List/Packages/NQUnit](http://nuget.org/List/Packages/NQUnit)
 * [http://nuget.org/List/Packages/NQUnit.NUnit](http://nuget.org/List/Packages/NQUnit.NUnit)

Documentation
-------------

[http://robdmoore.id.au/blog/2011/03/13/nqunit-javascript-testing-within-net-ci/](http://robdmoore.id.au/blog/2011/03/13/nqunit-javascript-testing-within-net-ci/)

Tested on
---------

 * ReSharper NUnit test runner (unfortunately the separate QUnit tests don't show up as separate NUnit tests on the ReSharper test runner due to limitations of the runner)
 * Test-driven.NET NUnit test runner
 * NUnit test runner
 * TeamCity NUnit test runner (you need to ensure TeamCity can interact with the desktop (if it's run as a service, alternatively you can run TeamCity is run from a .bat file); see [this Stack Overflow thread](http://stackoverflow.com/questions/488443/running-watin-on-teamcity/3415992#3415992))

Requirements
------------

You need Internet Explorer so WatiN can fire up an instance to test the QUnit test page(s).

Questions / additions / problems / etc.
---------------------------------------

 * Send me a pull request
 * Comment on the blog post linked to in the documentation above
 * Email me at: me (at) robdmoore (dot) id (dot) au
 * Raise an issue in the issue tracker<commit_msg>Adding documentation for new features<commit_after>﻿jQuery QUnit in .NET
====================

Runs QUnit tests inside .NET by using WatiN.

Based on [<NAME>'s original work](http://www.lostechies.com/blogs/joshuaflanagan/archive/2008/09/18/running-jquery-qunit-tests-under-continuous-integration.aspx), but updated to work with the latest version of WatiN (2.0.5 at the time of writing) and QUnit.

There is also an extension to get the QUnit tests working in NUnit. It is easy to copy this extension and change it to work with your favourite unit testing framework.

Installation
------------

 * [http://nuget.org/List/Packages/NQUnit](http://nuget.org/List/Packages/NQUnit)
 * [http://nuget.org/List/Packages/NQUnit.NUnit](http://nuget.org/List/Packages/NQUnit.NUnit)

Documentation
-------------

[http://robdmoore.id.au/blog/2011/03/13/nqunit-javascript-testing-within-net-ci/](http://robdmoore.id.au/blog/2011/03/13/nqunit-javascript-testing-within-net-ci/)

### Asynchronous test timeouts

When calling the `NQUnit.GetTests()` method there is a `maxWaitInMs` parameter, that by default is set to -1 (if you don't specify it), this parameter has the following effect:

 * If -1 (or any number less than 0), then the test suite will wait forever for any asynchronous QUnit tests that you have to finish. Note: if your tests don't return then your test runner will need to be force quit.
 * If 0, then any asynchronous QUnit tests that you have will fail since the test suite will grab the test results of the page as soon as the page finishes loading.
 * Any other number will be the maximum time in ms after the page has finished loading that the test suite will wait for any asynchronous tests to complete.

Tested on
---------

 * ReSharper NUnit test runner (unfortunately the separate QUnit tests don't show up as separate NUnit tests on the ReSharper test runner due to limitations of the runner)
 * Test-driven.NET NUnit test runner
 * NUnit test runner
 * TeamCity NUnit test runner (you need to ensure TeamCity can interact with the desktop (if it's run as a service, alternatively you can run TeamCity is run from a .bat file); see [this Stack Overflow thread](http://stackoverflow.com/questions/488443/running-watin-on-teamcity/3415992#3415992))

Requirements
------------

You need Internet Explorer so WatiN can fire up an instance to test the QUnit test page(s).

Questions / additions / problems / etc.
---------------------------------------

 * Send me a pull request
 * Comment on the blog post linked to in the documentation above
 * Email me at: me (at) robdmoore (dot) id (dot) au
 * Raise an issue in the issue tracker
{'fraction_non_alphanumeric': 0.12532580364900087, 'fraction_numerical': 0.021285838401390096, 'mean_word_length': 3.236430542778289, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4164237', 'n_tokens_mistral': 1460, 'n_tokens_neox': 1295, 'n_words': 530}