Probar los parches de Joomla!

From Joomla! Documentation

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page Testing Joomla! patches and the translation is 43% complete.
Outdated translations are marked like this.
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Nederlands • ‎Türkçe • ‎español • ‎français • ‎italiano • ‎português do Brasil • ‎Ελληνικά • ‎русский

En todo el software hay errores que deben ser corregidos, este es también el caso en un software de código Abierto como Joomla!. El código fuente de Joomla está situado en la internet, por lo que es accesible a todo el mundo. Además hay una posibilidad para el informe de errores. Los errores reportados serán resueltos y eventualmente necesitara de pruebas. Esta página se explica de qué manera puede contribuir al proyecto Joomla con las pruebas de las soluciones propuestas. Usted no necesita tener ningún conocimiento de codificación, usted no necesita una instalación de Joomla para hacer pruebas. Una Guía de Referencia Rápida para las pruebas está disponible en: Guía de Referencia Rápida para Pruebas de parches en Joomla!

El código de ensayo en Joomla

El código de ensayo de Joomla es el código más reciente en el que se está trabajando. Todas las correcciones de errores y nuevas características se aplican a este código.

El código de ensayo de Joomla lo encontrará en https://github.com/joomla/joomla-cms, este es el código que necesita instalarse. Encontrará la explicación de cómo hacerlo un poco más adelante Preparación de la prueba.

El gestor de incidencias

El gestor de incidencias de Joomla está en: http://issues.joomla.org

Joomla issue tracker-en.png

Esta lista muestra los errores que están en el tracker en un listado que va del más nuevo al más antiguo, pero puedes cambiar el orden mediante los filtros, en herramientas de búsqueda. En el tracker, todos los errores que tienen un parche, tienen un número de versión junto al título.

  • PR-staging: Para Joomla 3.9.x
  • PR-4.0-dev: Para Joomla 4.0

Estas etiquetas cambiarán en el futuro a medida que cambien las versiones.

Es importante tener en cuenta el Estado, seguidamente se da una explicación sobre el significado de cada estado:

Nuevo - Inmediatamente después de que se informa de un problema, recibe este estado. Cuando encuentre un error, cree una descripción de cómo reproducir el error. Las personas que están probando el problema deben de saber cómo probar el parche.

Confirmado - El equipo de seguimiento ha sido capaz de reproducir el problema. El equipo de codificación va a buscar una solución.

Pendiente - se ha encontrado una solución al problema. Se ha adjuntado el parche para que pueda probarse. Necesita probarse el problema. Se ha de prestar atención a la etiqueta junto al título, esta indica para que versión de Joomla es aplicable la revisión.

Listo para utilizarse - El parche se ha probado con éxito y el código puede utilizarse.

Cerrado - Este estado es para todas las cuestiones que no necesitan realizar ninguna otra acción.

El filtrado es útil en el seguimiento de incidencias. El monitoreo puede ser útil para recibir notificaciones de un problema que se ha actualizado.

Básicamente se inician las pruebas cuando están en el estado de "Pendiente".


Preparación de la prueba

En primer lugar, el código maestro tiene que recuperadose desde el repositorio GitHub de Joomla. Hay varias maneras para descargar el código master de Joomla pero aquí sólo veremos la opción de descarga.

Crear una carpeta

En primer lugar tenemos que crear una carpeta en el servidor web local o en la cuenta del hosting, accesible mediante el navegador. Crear la carpeta "'bugtesting"' e ir a esta carpeta en el Explorador o Buscador.

Descargar Joomla!

Vaya a localización de Joomla en GitHub y haga clic en Download ZIP

Joomla github-en.png

Bajará una copia del código master de Joomla en un archivo ZIP. Descomprima el archivo en una ubicación temporal, verá aparecer una carpeta llamada joomla-cms-staging. Dentro de esta carpeta está el código master de Joomla. Vaya a la carpeta joomla-cms-staging y copie el contenido completo a la carpeta bugtesting que creó en el paso anterior.

After that you have to set up your system. For more information see https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment/en.

Ahora puede instalar Joomla si está utilizando un servidor web local, navegando a http://localhost/bugtesting, si se utiliza uno en un servidor web, vaya a la URL adecuada para acceder a su cuenta de alojamiento. Encontrará el proceso de instalación normal de Joomla. En instalar datos de ejemplo, seleccionar: Datos de ejemplo Test English (GB).

¡Esto es importante para que todo el mundo utilice los mismos datos de prueba!

No es necesario que borre la carpeta de instalación, así podrá instalar de nuevo todo, de una manera fácil, si es necesario.

Descargar el probador de parches

Para ayudarle con el proceso de las pruebas de parches, se ha desarrollado una extensión de Joomla Patch Tester. El Patch Tester puede descargarse desde la página de Patch Tester, después puede instalarla de la misma manera que se instalan todas las extensiones desde el administrador de extensiones de Joomla.

The page you are presented with has the Patch Tester 3.0.0 Release Candidate for use on Joomla 3 Sites and the Patch Tester 4.0.0 Release Candidate for use on Joomla 4 sites. Note that the files to download are hidden in the Assets drop-down which when clicked will review the download file formats and the source code. Once downloaded it can be installed via the Extension Manager in Joomla.

Para utilizar el Patch Tester se requiere una cuenta de GitHub, la razón es que hay un límite estricto en el número de solicitudes anónimas que se pueden hacer a través de Patch Tester. Puede inscribirse para obtener una cuenta de GitHub en esta página.


Configuración de Patch Tester

Los detalles de la cuenta de GitHub se pueden ingresar en los ajustes de Patch Tester. Después de instalar Patch Tester, ve a Componentes -> Joomla! Patch Tester y haz clic en Opciones en la esquina superior derecha. Verás unas casillas donde puedes ingresar tu nombre de usuario y clave de GitHub.


Patchtester repo-en.png

En la segunda pestaña llamada Autenticación de GitHub puedes escribir tu nombre de usuario y clave de GitHub, o el token en caso que utilices uno.

Joomla PatchTester Github credentials.png


Después de ingresar los detalles de tu cuenta, haz clic en Guardar y Cerrar. Una vez de vuelta a Patch Tester, haz clic en Recuperar datos en la esquina superior izquierda.

Ahora está listo para comenzar las pruebas.

Encuentre un problema en el seguimiento de incidencias que desee probar, o utilizar el botón "tener suerte". Compruebe primero si se puede reproducir el problema. Si puede reproducir el problema, entonces puede instalar el parche.

Instalación de parches

En el Patch Tester encontrará los problemas en los que se está trabajando, bien por título (parcial) o por ID. El título, de un rastreador, siempre se ve así:

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

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

Después de que ha encontrado un parche, haga clic en el botón azul Aplicar parche (Apply Patch). Compruebe si se ha corregido el error y comprobe también si se han añadido nuevos errores.

Grabación de resultados de las pruebas

After testing, please add your test result in the test overview (use the button "Test this"). Now you only need to add a comment if you have extra information or if you test unsuccessful. As the Tracker now automatically add a comment that you test it. It must also be noted that it is much better if you can test patches in a multilingual environment (with at least 3 content languages published) as there can be issues triggered only in such environment.

The new Test This button and how to use it

Revertir el parche

Después de que se ha probado una revisión de seguridad y que ya no es necesaria, se puede remover la instalación de la prueba, de esta manera siempre se está trabajando con un sistema limpio. Vuelva al Patch Tester y haga clic en el botón verde Revertir parche (Revert Patch). Esto quitará el parche y así ya puede empezar a probar el siguiente problema.

Testing patches using Git

Since the Patch Tester cannot be used for all patches to test, sometimes we must use another way. The Patch Tester replaces the complete file and does not only apply the changes of the pull request, so you may not be testing an issue in an isolated state. To truly test a patch with only the changes made in the patch, we must use Git. The reason is that Git can apply a patch with only the changes in that patch. Git does this using a diff file. The prerequisites to be able to use the below method are:

  • Joomla is installed using Git
  • cURL is installed

Getting the diff

To get a diff from a pull request is rather easy. Let's say the URL to the pull request is

https://github.com/joomla/joomla-cms/pull/1452

To get the diff, all you need to do is add .diff after the URL, so it becomes

https://github.com/joomla/joomla-cms/pull/1452.diff

Testing the diff

Before you apply the diff, you can first check if the diff can be applied, a sanity check. Go to the root of your Joomla installation and run the following command:

curl -L https://github.com/joomla/joomla-cms/pull/1452.diff | git apply --check

Applying the diff

After the diff has been tested and there are no errors, the diff can be applied by running the following command:

curl -L https://github.com/joomla/joomla-cms/pull/1452.diff | git apply

With the diff applied you can run your tests and record your test results as explained above. If needed, you can apply multiple diffs at once as long as they do not overlap each other. In some cases this is needed when there are multiple pull requests that need to be combined to be tested.

Reverting the diff

Once you are done with testing you can cleanup the system by revering the diff with the following command:

curl -L https://github.com/joomla/joomla-cms/pull/1452.diff | git apply -R

To verify that everything is clean you can run

git status

You should get the notice:
nothing to commit, working directory clean

In case the system is not clean you can get a notice like this:

There are changed files in the working directory

In case you see changed files but you have not made any changes you can cleanup the system with

git reset --hard HEAD

Now all should be clean

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!.

Prebuild packages

For all people who test Pull Requests for J4: At the bottom of each new PR's is now a link to download an update packages containing the changes from this specific PR. Maybe you have to expand the details for the tests first. For this click on Show all checks.

Maybe you have to expand the details for the tests first. Then you see the link to the download. Click on Details.

Then you see the link to download.

The link leads to a download page for that PR where you can download full install packages and update packages.

Then you see the link to download. This will get you a copy of the Joomla 4.-dev code inclusive the patch in a ZIP file. Unzip the file in a temporary location, a folder named Joomla_[Version]+[Number of Path]-Development-Full_Package will appear. For Version 4.0.0-beta1-dev and PR-number 28462 this will be for example Joomla_4.0.0-beta1-dev+pr.28462-Development-Full_Package. Now we need to create a folder on either the local web server or the hosting account that can be accessed via the browser. Create the folder bugtesting and go to this folder via Explorer or Finder. Go into the Joomla_[Version]+[Number of Path]-Development-Full_Package 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 web server, if you use one on a hosting account, navigate to the appropriate URL for the hosting account.

Set up your sytem. For testing a PR, people who don't have a git clone and do not have Composer or Node.js can download and install the full install package. If a PR modifies update SQL scripts or other things related to updating, testers can install a 3.10-dev nightly or 3.10 beta and use the update package of that J4 PR to test updating to J4.

Videos

How to test patch for Joomla 4

How to test patch for Joomla 3

  • Part 1: Introduction

  • Part 2: Neard Web Server setup

  • Part 3: Sample issue testing.

How to test Prebuild packages for Joomla

Joomla has instigated a new method of testing pr's that will greatly benefit those on shared hosting. Or those who simply want a simple pr testing method.

Link

Brian Teeman: A Dummies Guide to Joomla Bug Testing