Bug 1042065

Summary: [RFE][horizon]: Integration of the testing library Jasmine
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: python-django-horizonAssignee: RHOS Maint <rhos-maint>
Status: CLOSED ERRATA QA Contact: Ido Ovadia <iovadia>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: aberezin, aortega, iovadia, jpichon, markmc, mrunge, yeylon
Target Milestone: Upstream M3Keywords: FutureFeature, Triaged, Upstream
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/horizon/+spec/jasmine-integration
Whiteboard: upstream_milestone_icehouse-3 upstream_status_implemented upstream_definition_discussion
Fixed In Version: python-django-horizon-2014.1-5.el7ost Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-08 15:43:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 20:48:26 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/horizon/+spec/jasmine-integration.

Description:

Currently, we use qUnit as the unit test framework for the client side, with the integration of AngularJS, it seems to be interesting to improve the quality of our testing tools. Jasmine could be a great idea, it could be run standalone through a browser. 
Jasmine brings some interesting features which could be really useful http://pivotal.github.io/jasmine/

Here are the features we do not have with qUnit:
  - it is possible to create ours own matcher: https://github.com/pivotal/jasmine/wiki/Matchers
  - it is possible to check the call of functions with the spies features https://github.com/pivotal/jasmine/wiki/Spies
  - it is also possible to mock function with these spies, this feature may be the most important.
  - the reporter provide a readable interfaces for our tests, which allow the developer to see which functionality is broken.

Last but not least, AngularJS documentation provides a lot of testing examples based on Jasmine. This will be useful because we do not need any third party documentation, we can directly start the development of tests.

qUnit test in Horizon are not so important at this time and we could easily change for the Jasmine testing suite, I have already rewrote a lot of tests:
  https://review.openstack.org/#/c/59580/
  https://review.openstack.org/#/c/59617/
  https://review.openstack.org/#/c/59624/

It is really easy to rewrote qUnit test into Jasmine one, the main features are closely the same. The goal is to replace completely qUnit.



Specification URL (additional information):

None

Comment 4 Matthias Runge 2014-05-27 10:41:04 UTC
no docs required, it's used for internal tests on the gate.

no qe tests required, as it's for development only.

Comment 6 errata-xmlrpc 2014-07-08 15:43:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-0855.html