Drop QUnit JS tests in favor of Jasmine
Summary
=======
To reduce the amount of JS unit tests currently used in Horizon, QUnit tests should be rewritten using Jasmine unit testing framework.
Motivation
========
The QUnit JS testing framework is the native testing framework for JQuery, and is older than Jasmine, thus it's lacking some of the newer features of Jasmine such as: AJAX stubs/mockups, timeouts faking etc - which prevents us from testing some complex cases of JS code (if using QUnit alone). One of possible solutions is to pair QUnit with Sinon.JS testing mockups library (somewhat similar to Python's mock library), but then the question arises: why not use Jasmine for that purpose? Combined with the fact that Horizon's evolution is moving towards being more client-side via Angular.JS (it was the thing that almost everyone at Paris Summit was agree with), and Jasmine is the official testing framework for Angular.JS apps, there is almost _no_ reason why a) QUnit tests should remain within Horizon in the long-term b) we should use Sinon.JS where we could use Jasmine.
Description
=========
So the plan is to:
* rewrite all QUnit tests in Jasmine, possibly with the help of jasmine-jquery plugin for loading html fixtures [yet to be decided]
* get rid of xstatic-qunit package in horizon dependencies
UX
===
There will be no more QUnit test runner page, Jasmine test runner page will be used instead - but since almost nobody runs these tests by hand, it's hardly can be considered a significant change.
Testing
======
The set of tests should remain the same.
Outside Dependencies
==================
Jasmine-jquery plugin perhaps needs to be packaged with xstatic.
Requirements Update Required
=======
Removal of xstatic-qunit from requirements. Possible addition of jasmine-jquery [yet to be decided].
Doc Impact
=========
N/A
Blueprint information
- Status:
- Complete
- Approver:
- David Lyle
- Priority:
- Low
- Drafter:
- Timur Sufiev
- Direction:
- Approved
- Assignee:
- Vlad Okhrimenko
- Definition:
- Approved
- Series goal:
- Accepted for liberty
- Implementation:
-
Implemented
- Milestone target:
-
8.0.0
- Started by
- David Lyle
- Completed by
- Timur Sufiev
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Drop QUnit JS tests in favor of Jasmine
[david-lyle | 2015-03-17] Moving out of kilo.
Addressed by: https:/
Fix ISO tests
Addressed by: https:/
Fix QUnit tests