Difference between revisions of "Testing Joomla! patches"

From Joomla! Documentation

Line 15: Line 15:
 
[[File:joomla_issue_tracker.png]]
 
[[File:joomla_issue_tracker.png]]
  
The list shows the tracker items from new to old but the order can be changed by using the filters under Search tools. All items in the tracker, that have a patch, have a version number behind the title.
+
The list shows the tracker items from new to old but the order can be changed by using the filters under Search tools. All items in the tracker, that have a patch, have a version number beside the title.
 
* PR-staging: This is Joomla 3.3.x
 
* PR-staging: This is Joomla 3.3.x
 
* PR-2.5.x: This is Joomla 2.5.x
 
* PR-2.5.x: This is Joomla 2.5.x
Line 22: Line 22:
 
These labels will change in the future as new versions come and old versions go.
 
These labels will change in the future as new versions come and old versions go.
  
The status is important. All statuses that are important here and their explanation:
+
The status is important and this is an explanation:
  
 
New - Immediately after an issue is reported it receives this status. When you find a bug, create a description how to reproduce the bug. People who are testing the issue then know how to test the patch.
 
New - Immediately after an issue is reported it receives this status. When you find a bug, create a description how to reproduce the bug. People who are testing the issue then know how to test the patch.
Line 28: Line 28:
 
Confirmed - The tracker team has been able to reproduce the issue. The coding team is going to look for a solution.
 
Confirmed - The tracker team has been able to reproduce the issue. The coding team is going to look for a solution.
  
Pending - A solution has been found for the issue. A patch has been attached that can be tested. The issue needs to be tested. Pay attention to the label behind the title, this indicates for which Joomla version the patch is applicable.
+
Pending - A solution has been found for the issue. A patch has been attached that can be tested. The issue needs to be tested. Pay attention to the label beside the title, this indicates for which Joomla version the patch is applicable.
  
 
Ready to commit - The patch has been successfully tested and the code can be committed.
 
Ready to commit - The patch has been successfully tested and the code can be committed.

Revision as of 06:48, 2 November 2014

Testing of reported and solved bugs[edit]

In all software there are mistakes that need to be fixed, this is also the case in Open Source software like Joomla!. The source code of Joomla is centrally located on the internet, making it accessible to everyone. Besides that there is a possibility to report bugs. Reported bugs will be solved and eventually need testing. This page explains how you can contribute to the Joomla project by testing proposed solutions. You do not need to have any coding knowledge, you do need a Joomla installation to test on.

The Joomla master code[edit]

The Joomla master code is the most recent code that is being worked on. All bugfixes and new features are applied to this code.

The Joomla master code is located at https://github.com/joomla/joomla-cms, this is the code that needs to be installed. How that is done, is explained a little further under Preparing to test.

The issue-tracker[edit]

The issue-tracker for Joomla is located here: http://issues.joomla.org

Joomla issue tracker-en.png

The list shows the tracker items from new to old but the order can be changed by using the filters under Search tools. All items in the tracker, that have a patch, have a version number beside the title.

  • PR-staging: This is Joomla 3.3.x
  • PR-2.5.x: This is Joomla 2.5.x
  • PR-3.4.dev: This is Joomla 3.4

These labels will change in the future as new versions come and old versions go.

The status is important and this is an explanation:

New - Immediately after an issue is reported it receives this status. When you find a bug, create a description how to reproduce the bug. People who are testing the issue then know how to test the patch.

Confirmed - The tracker team has been able to reproduce the issue. The coding team is going to look for a solution.

Pending - A solution has been found for the issue. A patch has been attached that can be tested. The issue needs to be tested. Pay attention to the label beside the title, this indicates for which Joomla version the patch is applicable.

Ready to commit - The patch has been successfully tested and the code can be committed.

Closed - This status is for all issues that need no further action.

Filtering is useful in the issue tracker. Monitoring can be useful to receive notifications of an issue that has been updated.

Basically you start testing issues that have the status "Pending".

Preparing to test[edit]

First the master code has to be retrieved from the Joomla GitHub repository. There are several different ways to download the Joomla master code but here we only discuss the download option.

Create folder[edit]

First we need to create a folder on either the local webserver or the hosting account that can be accessed via the browser. Create the folder bugtesting go to this folder via Explorer or Finder.

Download Joomla[edit]

Go to the Joomla GitHub location and click on Download ZIP

Joomla github-en.png

This will get you a copy of the Joomla master code in a ZIP file. Unzip the file in a temporary location, a folder named joomla-cms-staging will appear. Inside this folder is the Joomla master code. Go into the joomla-cms-staging folder and copy the complete contents to the folder bugtesting that you created in the previous step.

Now you can install Joomla by navigating to http://localhost/bugtesting if you are using a local webserver, if you use one on a hosting account, navigate to the appropriate URL for the hosting account. You will see the regular installation process of Joomla. As sample data choose: Test English (GB) sample data

This is important so everybody uses the same data to test!

The installation folder does not have to be removed, this way you can easily reinstall everything if needed.

Download Patch Tester[edit]

To help the process of testing patches, a Joomla extension by the name Patch Tester has been developed. The Patch Tester can be downloaded from the Patch Tester page and after that can be installed via the Extension manager in Joomla.

To use the Patch Tester a GitHub account is required, the reason for this that there is a strict limit on the number of anonymous requests that can be made via the Patch Tester. You can apply for a GitHub account on this page.

Setup Patch Tester[edit]

The GitHub account details can be entered into the settings of the Patch Tester. After the Patch Tester has been installed go to Components -> Joomla! Patch Tester and click on Options in the top right corner. The Options page shows up and you can enter your GitHub username and password.

Patchtester details-en.png

After entering your account details click on Save & close. Once back in the Patch Tester click on Retrieve data in the top left corner.

You are now ready to start testing.

Find an issue in the issue tracker you want to test or use the "Feeling lucky" button. First check if you can reproduce the issue. If you can reproduce the issue, then you can install the patch.

Installing Patch[edit]

In the Patch Tester find the issue you are working on by (partial) title or ID. The title of a tracker always looks like this:

[#4308] - Fixed event dispatching inconsistencies leading to incomplete API

Behind the # is the ID and behind the - sign comes the title.

After the patch has been found click on the blue button Apply Patch. Check if the bug has been fixed and also check if no new bugs have been introduced. In the issue add your comments and start the comment with @test and describe your findings. After your comment has been added, also add your test result in the test overview. This is the module on the right in every issue.

File:Test results.png

Revert patch[edit]

After a patch has been tested it is no longer needed and can be removed, this way you are always testing with a clean system. Go back to the Patch Tester and click on the green button Revert Patch. This will remove the patch and you can start testing the next issue.

If you have become enthusiastic to test, give it a try. It takes a bit of effort to set everything up but once that is done, it is fun and easy! In addition you are also contributing to Joomla!.