Testopia is a testcase management system built as an extension on Bugzilla. This post contains my installation notes and my efforts to make this work on my local installation. This will be updated as I go along.

Testopia testcase management system


The Testopia Extension requires Bugzilla >4.2. Testopia version 2.5 is the first release that does not need a patch on Bugzilla to work.

old notes relevant before v2.5

Installation of Testopia extension

How to get Testopia

$ bzr branch bzr://bzr.mozilla.org/bugzilla/extensions/testopia/trunk

Patch Bugzilla 4.2

Note: 603-2012: No patch for 4.2 available at time of patching
  1. cd to the directory with the Testopia trunk
  2. copy items from the downloaded Testopia trunk
  3. cd /usr/local/bugzilla
  4. paste items from the downloaded Testopia trunk and merge the extensions directory
  5. patch -p0 -i extensions/Testopia/patch-4.0

    :::bash patching file Bugzilla/Bug.pm Hunk #1 succeeded at 3628 (offset 101 lines). patching file Bugzilla/Constants.pm Hunk #1 succeeded at 145 (offset 1 line). Hunk #2 succeeded at 470 (offset 5 lines). patching file Bugzilla/Error.pm Hunk #2 succeeded at 145 (offset -6 lines). patching file Bugzilla/Install/Filesystem.pm Hunk #1 succeeded at 153 (offset 3 lines). patching file Bugzilla/Search.pm Hunk #1 FAILED at 510. 1 out of 1 hunk FAILED – saving rejects to file Bugzilla/Search.pm.rej patching file Bugzilla/User.pm Hunk #1 succeeded at 575 with fuzz 1 (offset 67 lines). Hunk #2 succeeded at 936 (offset 82 lines). Hunk #3 succeeded at 1292 (offset 130 lines). patching file template/en/default/global/setting-descs.none.tmpl

Run .checksetup.pl


Install additional dependencies

$ sudo /usr/bin/perl install-module.pl Text::Diff
$ sudo /usr/bin/perl install-module.pl GD::Graph3d

Run .checksetup again

$ ./checksetup.pl

You should now get

$ checksetup.pl complete.

Errors on FILTER url_quote

Template->process() failed twice. First error: undef error - url_quote: filter not found Second error: undef error - url_quote: filter not found

Seems this is deprecated

Found Bugzilla message 398701 with fix

find . *-type f -name "*.tmpl" -exec replace 'FILTER url_quote' 'FILTER uri' -- {} \;*

Executed this from the Testopia extensions directory this updated a number of template files:
./template/en/default/hook/bug/create/create-end.html.tmpl converted
./template/en/default/hook/bug/edit-after_custom_fields.html.tmpl converted
./template/en/default/hook/bug/process/results-links.html.tmpl converted
./template/en/default/hook/global/common-links-link-row.html.tmpl converted
./template/en/default/hook/global/useful-links-end.html.tmpl converted
./template/en/default/testopia/reports/build-coverage.html.tmpl converted
./template/en/default/testopia/reports/completion.html.tmpl converted
./template/en/default/testopia/reports/execution.html.tmpl converted
./template/en/default/testopia/reports/priority-breakdown.html.tmpl converted
./template/en/default/testopia/reports/report-table.html.tmpl converted
./template/en/default/testopia/reports/report.html.tmpl converted
./template/en/default/testopia/reports/status.html.tmpl converted
./template/en/default/testopia/tag/list.html.tmpl converted

Additional patching


There seems to be a problem in Bugzilla/Search.pm

A patch was suggested in BZ 596325 I copied the patch file and applied it :::bash $ sudo patch -p0 -i extensions/Testopia/patch-bz596325 $ chgrp the Search.pm and make it member of the _www group

Patch works and now Testopia-> My plans does not give an error anymore

New plan

It seems the link New plan is not working. In the Apache error_log there are a lot of errors

File does not exist: /Library/WebServer/Documents/bugzilla/extensions/Testopia/extjs, referer: http://  tooh.homedns.org/bugzilla/tr_new_plan.cgi

I did not install the extjs files so probably this is the problem.

On the Testopia wiki there is some instructions :::bash

$> cd path/to/bugzilla/testopia/
$> wget http://extjs.com/deploy/ext-3.2.1.zip
$> unzip ext-3.2.1.zip
$> mv ext-3.2.1 extjs

Found out that the files are not there anymore Downloaded the older version http://www.sencha.com/products/extjs/download/ext-js-3.2.1

Renamed the folder to extjs

Note: Don’t forget to refresh. And now it is working.

New run

Initially no testcases where shown. Investigation of the /var/log/apache2/error_log showed that there was an error with een uninitialized variable. I commented out use strict in the header of /usr/local/bugzilla/extensions/Testopia/lib/Search.pm

Everything OK now.


[1] Testopia Mozilla