Friday 11 July 2014

Getting started...

Initially(Link):
- Content Server was integrated with Travis.
- Next step was to add JavaScript tests to the CIS(Issue).

Existing implementation of JavaScript testing(Link):

After going through the implementation and documentation some main points:

1. For consistency across all the JavaScript projects, Privly is using the Jasmine testing library for running tests
2. Use of console reporter which sends test results directly to the JavaScript console.
3. And also the use of the meta_loader.js which finds the PrivlySpec meta tag and uses it to inject the appropriate testing scripts and specs.

This implementation allows to test the privly-applications by running the `runTests()' command in the JavaScript console which loads the Spec files and runs the tests. It then shows the output in the console itself.


Problem: For this to be integrated with Travis we need to print this output to the terminal.

Solution: Repo

This repo gives details about how to run jasmine tests with phantomjs and selenium-webdriver and get the results to the terminal.


After discussing we finally decided to go with selenium-webdriver for running tests.

Reasons: Link #2 and #5 being the main reasons.

This implementation requires the Source files and the Spec files to be present in the HTML itself.


Thus the system requires the need of changing the structure of privly-applications that currently uses meta_loader.js to load Spec files from the meta tags.

No comments:

Post a Comment