3 minutes reading time (604 words)

GSoC: Improved Joomla! CMS tests using BDD Gherkin and Codeception

GSoC: Improved Joomla! CMS tests using BDD  Gherkin and Codeception

Hello folks! How to make Joomla! CMS tests better with Gherkin and Codeception? BDD (Behavior Driven development) in its grandest sense is about communication and viewing your software as a system with functionality and features. Using the BDD approach to write test cases makes test cases easy. BDD tests are easily understandable by non developers and testers.

In my previous article I gave my project overview and told community about the benefits of automated testing using gherkin and codeception. In this article I will be writing about current status of my project.

 

Highlights

At the beginning of the coding period I was very confused about my project architecture. With the help of my mentor's guidance I implemented and developed the following points:

  • Using own tests/composer.json file for independent usage

  • Updated Codeception to the latest version 2.2

  • Improved scenarios in Step and Page objects using Codeception.

  • Thanks to Javier and Puneet for PR #22 to provide an sample architecture.

  • Move the joomla browser methods into Steps and AcceptanceTester.php

Work done so far

Implemented User Backend and Frontend scenarios

  • Update username and other user details

  • Lock user

  • Unlock user

  • Delete user

  • Verify available tabs in com_users

  • Create super admin and login into the backend

  • User without username fails

  • Create group

  • Edit group

  • Delete Group

  • Create user with name, username, email, password and defaults

  • Create ACL level

  • Edit ACL

  • Delete ACL

  • User settings (mixed with com_config)

Frontend:

  • Create user and login in the frontend (index.php?option=com_users)

  • Create blocked user and try to login in the frontend

  • Test last login date

  • Change details in the frontend, check in the backend

  • Register a new user in the frontend and check it in the backend

  • Check if block and activation are working

Implement the Content Backend scenarios

  • Create new category

  • Modify category

  • Trash category

  • Publish category

  • Unpublish category

  • Verify available tabs in Articles: New Category

  • Verify available tabs in Articles: New

  • Create article without Title fails

  • Article settings (Show Voting)

  • Create category without Title fails

  • Create menu item for newly created article

  • Create menu item for articles belonging to a specific Category

 gherkin codecept user dark final

 

Contribution to Joomla! Docs

I have updated the Joomla! Documentation and added testing guides for Gherkin and Codeception. https://docs.joomla.org/Testing_Joomla_Extensions_with_Codeception#BDD_Testing_using_Gherkin_and_Codeception

 

Contribution in Joomla! Bug Squashing

My mentor Yves Hoppe suggested me to test at least 2 Pull Request from Joomla! CMS every week. As it is the best way to learn more about the Joomla! CMS and get involved in the community.

 

Contribution in Joomla! Marketing Team

To get more involvement in community I have tried to help Joomla! Marketing team to translate Joomla! 3.6 marketing banners and promotions into my native language Hindi.

 

Weekly Project meeting

We are doing a meeting every week on Tuesday on Glip or sometimes a Hangout video chat. There we discuss the progress, the problems faced in past week, solutions and next week task agenda. My mentors are awesome and help me all the time during week and answer my questions and clear my doubts. We publish every meeting report in the volunteer portal.


 

Demo

This video will demonstrate the steps of Content and User Backend and Frontend Gherkin Features implementation and Codeception Acceptance tests in BDD.

 

References to follow up

  1. GSOC’16 proposal link - https://summerofcode.withgoogle.com/projects/#5724182314745856

  2. Project Repository https://github.com/joomla-projects/gsoc16_browser-automated-tests
  3. Issues: https://github.com/joomla-projects/gsoc16_browser-automated-tests/issues

  4. Documentation https://github.com/joomla-projects/gsoc16_browser-automated-tests/blob/staging/README.md

 

I would like to thank my mentors Javier Gómez, Yves Hoppe and Niels Braczek for helping me in this project.

Thank a lot to whole GSoC team for helping me and introduce me to this awesome J!Community.

Some articles published on the Joomla Community Magazine represent the personal opinion or experience of the Author on the specific topic and might not be aligned to the official position of the Joomla Project

0
JCM Survey 2016: we are listening to the Community
GSoC: Helping out Yash Part-II. Progress on improv...
 

Comments

Already Registered? Login Here
No comments made yet. Be the first to submit a comment

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/