Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
Setting up JavaScript unit tests for a Cobalt product
Ryan Morlok
I'm working on setting up JavaScript unit tests for Advisor (GTLRMaxwell) website. What do I need to do make the test consistent with the rest of Cobalt? How do I run Cobalt's existing tests? Is there some documentation for this?
Find more posts tagged with
javascript
refinitiv-internal
junit
Accepted answers
James Greene
For any new verticals and products, we are recommending that JavaScript unit tests are written using the [QUnit testing framework][1] from jQuery.
The Search and Alerts verticals are already using QUnit, and there are plans to migrate the other verticals over to QUnit in upcoming iterations. We have build integration working for the WLNStaticContent and SharedStaticContent builds using [PhantomJS][2] (essentially a headless WebKit browser). We can add this functionality other builds fairly easily as well on request by following [the process I've outlined on the NSAWiki][3].
Relevant research/analysis that we conducted in making the decision to standardize on QUnit can be found on the related [NSAWiki page][4].
[1]:
http://docs.jquery.com/QUnit
[2]:
http://www.phantomjs.org/
[3]:
http://nsawiki.int.westgroup.com/wiki/index.php/How_to_hook_QUnit_into_the_Cobalt_Build_Process
[4]:
http://nsawiki.int.westgroup.com/wiki/index.php/JavaScript_Testing_Framework_Analysis
All comments
James Greene
For any new verticals and products, we are recommending that JavaScript unit tests are written using the [QUnit testing framework][1] from jQuery.
The Search and Alerts verticals are already using QUnit, and there are plans to migrate the other verticals over to QUnit in upcoming iterations. We have build integration working for the WLNStaticContent and SharedStaticContent builds using [PhantomJS][2] (essentially a headless WebKit browser). We can add this functionality other builds fairly easily as well on request by following [the process I've outlined on the NSAWiki][3].
Relevant research/analysis that we conducted in making the decision to standardize on QUnit can be found on the related [NSAWiki page][4].
[1]:
http://docs.jquery.com/QUnit
[2]:
http://www.phantomjs.org/
[3]:
http://nsawiki.int.westgroup.com/wiki/index.php/How_to_hook_QUnit_into_the_Cobalt_Build_Process
[4]:
http://nsawiki.int.westgroup.com/wiki/index.php/JavaScript_Testing_Framework_Analysis
Ryan Morlok
Cool, thanks James. Are there any instructions on how to wire up a platform product's specific QUnit tests to run as part of the build?
James Greene
@Ryan
:
I'm guessing this will be part of the SharedStaticContent build. Is that correct? Let me know so I can get more specific about setup details.
Ryan Morlok
Yes, that's correct
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act