GSoC 2017 – JavaScript Tests for Joomla 4

test

Joomla! is an open source content management system (CMS), which enable to build web sites and powerful web applications. Because of it awesome performance and usability, millions of websites powered with Joomla. The major advantage is using content management system like Joomla is you don’t need any technical skills or knowledge to manage it. Joomla keeps track of every piece of content on your website. It can be simple text, photos, videos, music, any other documentation or anything you can think of.

Why need Unit Testing ?

A Unit tests basically check a block of code of the program and checking input, output and ensure that they all are run as expected way. Theses tests mainly helps developers to check and pay more attention to check individual areas of a program to see where errors occur. So it’s very common in software development life cycle. Since HTML/CSS basically not functional basics languages and no need to do any unit testing. But in Javascript world there are lot more functions using in custom libraries and user might not know that function do the expectation. So every unit test is made to check against an individual unit in javascript and it breaks down to function or custom library.  

Karma is a JavaScript test runner. Jasmine is the testing framework we can use in unit testing. Basically Karma provides helpful tools that make it easier to us to call our Jasmine tests whilst we are writing code. Following diagram gives a basic understand about how unit tests works.

unit

 

Project : JavaScript Tests for Joomla 4!

Joomla 4! is about new things that break and give us large functionality improvements with limited backward capability breaks. It brings in dependency injection containers instead of JFactory. It will give more flexibility for automated testing and extension developers.

Basically Joomla CMS mainly consist with server side scripting language PHP and it doesn’t have authority to manage client side scripting. In that case Joomla uses collection of custom written JavaScript libraries as client side scripting. It’s not that much easy to manage these lack of backend scripting and front end JavaScript custom written libraries. Because of this complexity, to make sure all these component perform as they should. So now testing becomes a massive requirement. Hence Joomla core written by PHP and the comprehensive test coverage completely done. Such a comprehensive test coverage already done for JavaScript custom written libraries. The main objective of this project is to increase this test coverage and also new improvements based on Jasmine and  Karma for latest Joomla 4.

imag

 

 

 

 

 

Leave a Reply

Your email address will not be published.