Menguji patch Joomla!

From Joomla! Documentation

Revision as of 07:22, 28 August 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Nederlands • ‎Türkçe • ‎español • ‎français • ‎italiano • ‎português do Brasil • ‎Ελληνικά • ‎русский

Di semua perangkat lunak ada kesalahan-kesalahan yang harus diperbaiki, ini juga adalah apa yang ada di perangkat lunak Open Source seperti Joomla. Kode sumber Joomla! terletak ditengah-tengah internet, membuatnya dapat diakses semua orang. Disamping adalah suatu kemungkinan untuk melaporkan bug. Bug yang telah dilaporkan akan diselesaikan dan pada akhirnya perlu pengujian. Halaman ini menjelaskan bagaimana Anda dapat berkontribusi ke proyek Joomla! melalui pengujian terhadap solusi-solusi yang diajukan. Anda tidak perlu memiliki pengetahuan dalam pengkodean apapun, yang Anda perlukan adalah sebuah pemasangan Joomla! untuk diuji. Sebuah Panduan Referensi Singkat untuk pengujian tersedia di: Panduan Referensi Singkat Pengujian patch Joomla!

Kode tahapan Joomla!

Kode tahapan Joomla! adalah kode yang paling baru yang sedang dikerjakan. Semua perbaikan bug dan fitur-fitur baru diterapkan ke kode ini.

Kode tahapan Joomla! ada di https://github.com/joomla/joomla-cms, ini adalah kode yang perlu dipasang. Bagaimana hal itu dilakukan dijelaskan sedikit lebih jauh dibawah Menyiapkan pengujian.

Penelusur Isu

Penelusur isu untuk Joomla! ada disini: http://issues.joomla.org

Joomla issue tracker-en.png

Daftar ini menampilkan butir-butir penelusur dari yang baru ke yang lama tapi urutannya dapat diubah dengan menggunakan filter dibawah perangkat Pencarian. Semua butir di dalam penelusur, yang memiliki patch, mempunyai sebuah angka versi disamping judulnya.

  • PR-staging: Ini adalah Joomla 3.4.x
  • PR-3.5.dev: Ini Joomla 3.5

Label-label ini akan berubah nantinya bersama dengan datangnya versi baru dan perginya versi lama.

Status adalah penting dan berikut penjelasannya:

New [Baru] - Ketika sebuah isu dilaporkan maka ia akan menerima status ini. Saat Anda temukan sebuah bug, buatlah sebuah keterangan bagaimana mereproduksinya. Agar orang-orang yang menguji isu tersebut tahu bagaimana menguji patch tersebut.

Confirmed [Dikonfirmasi] - Tim penelusur telah memproduksi isu tersebut. Tim pengkodean sedang mencari sebuah solusi untuknya.

Pending [Ditunda] - Sebuah solusi telah ditemukan untuk isu tersebut. Sebuah patch yang dapat diuji telah dilampirkan. Isu tersebut perlu diuji. Perhatikanlah label yang ada disamping judul, ini menunjukkan versi Joomla mana patch itu diperuntukkan.

Ready to commit [Siap commit] - Patch telah diuji dan kode telah dikirimkan (commit—mengunggah/mengirimkan patch ke repositori).

Closed [Ditutup] - Status ini ditujukan untuk semua isu yang tidak lagi memerlukan tindakan apapun.

Filtering adalah sangat berguna dalam penelusur isu. Memonitor dapat bermanfaat guna menerima notifikasi terhadap sebuah isu yang telah diperbarui.

Pada dasarnya Anda melakukan pengujian isu-isu yang memiliki status "Pending".


Menyiapkan pengujian

Pertama sekali, kode master harus didapatkan dari repositori GitHub Joomla. Terdapat beberapa cara berbeda untuk mengunduh kode master Joomla namun disini kami hanya mendiskusikan opsi pengunduhannya saja.

Buat folder

Pertama-tama, kita perlu membuat sebuah folder, apakah itu di server web lokal maupun di akun hosting yang dapat diakses melalui peramban. Buatlah folder bugtesting dan pergilah ke folder ini melalui Explorer atau Finder.

Unduh Joomla

Pergi ke GitHub Joomla dan klik pada Download Zip

Joomla github-en.png

Ini akan mendapatkan Anda sebuah salinan kode master Joomla di dalam berkas ZIP. Unzip berkas tersebut di tempat sementara, sebuah folder yang bernama joomla-cms-staging akan muncul. Di dalam folder inilah terdapat kode master Joomla. Pergilah ke folder joomla-cms-staging dan salin seluruh konten ke folder bugtesting yang telah Anda buat sebelumnya.

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.

Sekarang Anda dapat memasang Joomla dengan menavigasikannya ke http://localhost/bugtesting bila Anda menggunakan sebuah server web lokal, jika Anda menggunakan sebuah akun hosting, navigasikan ke URL yang sesuai dengan akun hosting. Anda dapat melihat proses pemasangan regular Joomla. Untuk data contoh pilihlah: Test English (GB) sample data [Uji Inggris (GB) data contoh].

Ini penting agar semua orang memakai data yang sama untuk menguji!

Folder pemasangan tidak harus dibuang, dengan begini Anda dapat dengan mudah memasang kembali semuanya bila diperlukan.

Unduh Penguji Patch

Untuk membantu Anda dengan proses pengujian patch, sebuah ekstensi Joomla! bernama Patch Tester (Penguji Patch) telah dikembangkan. Penguji Patch dapat diunduh dari halaman Penguji Patch dan setelah itu dapat dipasang melalui pengelolaan Ekstensi di Joomla.

Joomla PatchTester 4 0 0-beta3.png

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.

Untuk menggunakan Penguji Patch, sebuah akun GitHub diperlukan, alasan untuk hal ini adalah adanya batasan tegas dalam jumlah permintaan-permintaan anonim yang dapat dibuat melalui Penguji Patch. Anda dapat mendaftarkan akun GitHub di halaman ini.


Mengatur Penguji Patch

Detail akun GitHub dapat dimasukkan ke dalam setelan Penguji Patch. Setelah Penguji Patch terpasang maka pergilah ke Komponen -> Joomla! Penguji Patch dan klik pada Opsi yang ada di sudut kanan atas. Halaman opsi akan muncul dan Anda bisa memasukkan nama pengguna dan sandi GitHub Anda.


Patchtester repo-en.png

On the second tab called GitHub Authentication you can enter your GitHub username and a personal access token as password.

Joomla PatchTester Github credentials.png


Setelah memasukkan detail akun Anda klik pada Simpan & Tutup. Ketika sudah kembali ke Penguji Patch, klik Retrieve (Dapatkan) data yang ada di sudut kiri atas.

Anda sekarang siap untuk memulai pengujian.

Temukan sebuah isu yang ada di dalam penelusur isu untuk menguji atau gunakan tombol "Merasa beruntung". Pertama sekali, periksalah apakah Anda dapat mereproduksi isu tersebut. Bila Anda dapat mereproduksi isu itu, maka Anda dapat pasang patch-nya.

Memasang Patch

Di Penguji Patch temukanlah isu yang sedang Anda kerjakan berdasarkan (sebagian) judulnya atau ID. Judul suatu penelusur selalu terlihat seperti berikut ini:

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

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

Setelah patch ditemukan klik pada tombol berwarna biru Apply Patch (Terapkan Patch). Periksalah apakah bug tersebut sudah diperbaiki atau belum serta periksa juga apakah tidak ada bug baru yang diperkenalkan.

Merekam hasil pengujian

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

Pulihkan patch

Setelah sebuah patch diuji maka ia sudah tidak diperlukan lagi dan bisa dibuang dari pemasangan uji Anda, dengan begini Anda selalu menguji dengan sebuah sistem yang bersih. Kembalilah ke Penguji Patch dan klik pada tombol berwarna hijau Revert Patch (Pulihkan Patch). Ini akan membuang patch dan Anda dapat mulai pengujian terhadap isu berikutnya.

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