Testopia:README: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
(29 intermediate revisions by 7 users not shown)
Line 7: Line 7:
testing on virtually anything in the engineering process.
testing on virtually anything in the engineering process.


=== 1.2.x Requirements ===
The following installation instructions assume you are installing the latest version of Testopia, currently version 2.4.
* Bugzilla 2.22.x
* MySQL (Postgres is supported in 1.2.2)
* Perl modules JSON and Text::Diff


 
=== Requirements ===
=== 1.3 Requirements ===
* Bugzilla 3.6+
* Bugzilla 3.0
* Perl JSON 2.10
* MySQL or Postgres
* GD-Graph3d 0.63
* Perl modules JSON and Text::Diff


Testopia is an extension to Bugzilla. This means that if you have one of the
Testopia is an extension to Bugzilla. This means that if you have one of the
supported versions of Bugzilla installed, you are all set to install Testopia.
supported versions of Bugzilla installed, you are all set to install Testopia.
Installation instructions for Bugzilla can be found at http://bugzilla.org


Testopia has been tested and is known to work with Bugzilla on Linux running
'''IMPORTANT NOTES:'''
MySQL or Postgres databases.
These instructions assume you have installed Bugzilla according to the Bugzilla  
instructions (from tarball or cvs). Installations from Debian .deb or from some
RPM packages may place Bugzilla files in separate directories in which case,
these instructions may not work.


Several people have installed (or tried to install) Testopia on Windows. Though there is no reason why this cannot be done, the Developers have not tested this configuration. The main challenge is the clash between DOS line endings and UNIX line endings during the patching phase of installation. If you come up with a good solution, please post it in the Installation section below.
If you are upgrading from 2.2 and have made modifications to the Testopia code,
please be aware that you will need to merge your changes into the new
file locations.


At least one person is installing Testopia on FreeBSD -- see https://bugzilla.mozilla.org/show_bug.cgi?id=369517 for suggestions.
Also be sure to reverse the patch on your existing installation
before unzipping the package.


=== Installing 1.2.x (Bugzilla 2.22.x) ===
Please make sure that your language of Bugzilla is the same as language of
'''Linux'''
Testopia to  be installed on. If you are not sure, just set language of your
Bugzilla to English. You can change it any time later.


''From the tarball:''
API USERS TAKE NOTE: Positional parameters are now deprecated as of 2.4. All params should now be sent
in a hash (struct, dict, hashmap or whatever your language of choice calls key, value pairs). Though all attempts
have been made to provide continuing support for positional parameters, please be aware that
some API calls may fail until you make this change. Also, future versions may remove this support completely.


If you are installing Testopia from the release tarball, simply expand the
=== Installation on Linux ===
tarball in your bugzilla top level directory. On linux this would look
                                 
''' From the tarball: '''
If you are installing Testopia from the release tarball, simply untar the
tarball in your bugzilla top level directory. On Linux this would look
something like this:
something like this:


Line 41: Line 51:
   $> tar xzvf testopia-<version>.tar.gz
   $> tar xzvf testopia-<version>.tar.gz


You then need to run tr_install.pl followed by checksetup.pl, and follow any
Next you need to patch the Bugzilla files. Find the patch file in the
instructions that they produce.
extensions/Testopia directory matching your version of Bugzilla.
For example, if you are running Bugzilla 3.6.1 you will apply the patch-3.6.1 patch file.
  $> patch -p0 -i extensions/Testopia/patch-3.6.1
Finally, you need to run checksetup.pl
 
  $> ./checksetup.pl
 
If you are missing any dependencies, checksetup.pl will inform you.
See "Installing Dependencies".
 
''' From git: '''
If you want to install the latest code from git you will need to do the
following:


''From CVS''
1. Check out the git code in a temporary location


  $> git clone https://git.mozilla.org/?p=bugzilla/extensions/Testopia.git
''' From CVS: '''
If you want to install the latest code from CVS you will need to do the  
If you want to install the latest code from CVS you will need to do the  
following:
following:
Line 55: Line 82:
   (Logging in to anonymous@cvs-mirror.mozilla.org)
   (Logging in to anonymous@cvs-mirror.mozilla.org)
   CVS password: anonymous
   CVS password: anonymous
   $> cvs co Testopia
   $> cvs co Testopia


Line 64: Line 92:
   $> tar cvf /tmp/testopia.tar .
   $> tar cvf /tmp/testopia.tar .


Once you have your tarball, follow the instructions above to untar it into your
Once you have your tarball, follow the tarball instructions above to untar  
Bugzilla directory and run tr_install and checksetup. The last step is to  
it into your Bugzilla directory The last step is to install the Ext libraries:
install the dojo libraries:


   $> cd path/to/bugzilla/testopia/
   $> cd path/to/bugzilla/testopia/
   $> svn co http://svn.dojotoolkit.org/dojo/trunk/ dojo
   $> wget http://extjs.com/deploy/ext-3.2.1.zip
  $> unzip ext-3.2.1.zip
  $> mv ext-3.2.1 extjs


Congratulations, you should be able to see the Testopia links at the bottom of
Congratulations, you should be able to see the Testopia links at the bottom of
your bugzilla pages.  
your bugzilla pages.  


'''Windows'''
=== Installation on Windows ===


Good question. For the most part it should work the same as on Linux,
Windows installations are not officially supported. By this we mean don't ask
substituting the appropriate paths and commands. Unfortunately I don't have
the developers for help as we have never tried to install on Windows and don't  
a good Windows setup to try it on.
have any desire to. However, there have been numerous users that have managed
to do so on their own. Here are some pointers:


Some contributed suggestions include:
*Add a .txt file extension to your corresponding patch file (\bugzilla\testopia\patch-3.0[.x]).
*Edit the above patch file to remove *nix line feed characters, and putting in classic DOS/Windows carriage returns.<br>You can do this manually, or with WordPad (write.exe) or numerous utilities such as unix2dos or tofrodos.
*Download GNU Patch and install it in a directory in your path.<br>It can be downloaded from http://gnuwin32.sourceforge.net/packages/patch.htm
*Change PERL "shebang" paths from native *nix, to a Windows Format. <br>If you have MySQL Server installed, the Replace utility does a great job at this:


1) For Windows, correct the perl paths from the default:
C:\&lt;apache path&gt;\htdocs\bugzilla&gt; for&nbsp;%i in (*.cgi) do ("&lt;MySQL path&gt;\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" --&nbsp;%i)
C:\&lt;apache path&gt;\htdocs\bugzilla&gt; for&nbsp;%i in (*.pl) do ("&lt;MySQL path&gt;\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" --&nbsp;%i)
C:\&lt;apache path&gt;\htdocs\bugzilla\Bugzilla&gt; for&nbsp;%i in (*.pm) do ("&lt;MySQL path&gt;\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" --&nbsp;%i)


C:\<apache path>\htdocs\bugzilla>
From here the steps should be fairly identical to those above, meaning patch the files and run checksetup.pl.  
<MySQL path>\bin\replace.exe"  "#!/usr/bin/perl" "#!C:\perl\bin\perl" -- *.cgi *.pl


C:\<apache path>\htdocs\bugzilla\Bugzilla\Config> <MySQL>\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" -- *.pm
If you have problems please post questions to the support-webtools list. Do not email the developers directly.  


2) If you are installing Testopia on Windows, you will need to copy over an installed 'patch.exe' into this directory:
References:
C:\<apache path>\htdocs\bugzilla\testopia\tools\
 
*http://wiki.mozilla.org/Bugzilla:Win32Install
It is available here:
*http://www.bugzilla.org/docs/3.2/en/html/configuration.html#http-iis
    [http://gnuwin32.sourceforge.net/packages/patch.htm sourceforge]
*http://acushen.spaces.live.com/Blog/cns!E3A022289D65B5C0!171.entry
 
If you find additional pointers, please post them to the Wiki version of this file at http://wiki.mozilla.org/Testopia:README
 
=== Installing Dependencies  ===


=== Installing 1.3 (Bugzilla 3.0) ===
Some of the most common dependencies you'll need to install can be easily installed in both Windows and linux:
'''Linux'''


''From the tarball:''
Install JSON:  


If you are installing Testopia from the release tarball, simply expand the
    perl -MCPAN -e shell
tarball in your bugzilla top level directory. On linux this would look
install M/MA/MAKAMAKA/JSON-2.10.tar.gz
something like this:


  $> cp testopia-<version>.tar.gz /path/to/bugzilla
Install GD-Graph3d:
  $> cd /path/to/bugzilla
  $> tar xzvf testopia-<version>.tar.gz


Next you need to patch some Bugzilla files. The details of the GNU patch program are beyond the scope of this document. You can learn all you never wanted to know from the patch man page. On most systems it should look like this:
    perl-MCPAN -e shell
install W/WA/WADG/GD-Graph3d-0.63.tar.gz


  $> patch -p0 -i testopia/patch-3.0
In Windows, missing modules are easiest installed by running checksetup.pl and paying attention to the printout:
<pre>C:\bugzilla\&gt;checksetup.pl
* This is Bugzilla 3.2.4 on perl 5.8.9
* Running on WinXP/.Net Build 2600 (Service Pack 3)
Checking perl modules...
...
* NOTE: You must run any commands listed below as Administrator.


If it prompts you for the location of a file, simply copy and paste the file location that it tells you it thinks it is in.
***********************************************************************
* Note For Windows Users                                              *
***********************************************************************
* In order to install the modules listed below, you first have to run *
* the following command as an Administrator:                          *
*                                                                    *
*  ppm repo add theory58S http://theoryx5.uwinnipeg.ca/ppms
*                                                                    *
***********************************************************************
***********************************************************************
* REQUIRED MODULES                                                    *
***********************************************************************
* Bugzilla requires you to install some Perl modules which are either *
* missing from your system, or the version on your system is too old. *
*                                                                    *
* The latest versions of each module can be installed by running the  *
* commands below.                                                     *
***********************************************************************
COMMANDS:


Finally, run checksetup.pl.
    ppm install TimeDate
...
</pre>
When running checksetup.pl, you will get an "Unable To Locate Component" error related to "OCI.dll" if you do not have the Oracle perl module installed. &nbsp;If you are not using Oracle you can supress this message by running the following command:
<pre>ppm remove --area perl DBD::Oracle
</pre>
Remember to "ppm install DBD-mysql" if you are using MySQL!<br>


'''Windows'''
=== Upgrading ===


After using TextPad to save patch-3.0 as patch-3.0.txt in the PC file format, the patch command is:
In general, you will need to follow these steps:
  $>C:\web\bugzilla>testopia\tools\patch.exe -p0 -i testopia\testopia\patch-3.0.txt


If the patch fails because you didn't replace the /usr/bin/perl references, drop the bz_schema table and re-run the patch and checksetup.pl.
# Reverse the old patch by running the patch command you used to install with -R
# Untar the new files
# Apply the new patch
# Run checksetup.pl


=== Upgrading from 1.x ===
'''Upgrading to latest from CVS:'''


NOTE: This should only be done on a Bugzilla 2.22.x installation
Testopia comes with a script to update to the lates checked in version (trunk or tip).
WARNING: This should only be done against the latest released version. The tip is
considered unstable.


# Untar the testopia files.
    $<path to bugzilla>/testopia/contrib> bash cvs_update.sh /path/to/bugzilla
# Remove testopia/tr_patch_successful
# run patch -p0 -R -i testopia/patch-2.22.x
# run tr_install.pl (1.2.2 only)
# run patch -p0 -i testopia/patch-<version>
# run checksetup.pl


The script can be modified to checkout a tag or version if you know what you
are doing.
maintenance
=== Getting Help ===
=== Getting Help ===


Line 139: Line 206:
Help link on your installation or by visiting:
Help link on your installation or by visiting:


http://wiki.mozilla.org/Testopia:Documentation
    [[Testopia:Documentation|Testopia Documentation Wiki]]


Questions can be asked on the mailing list. Before asking though, please read http://www.gerv.net/hacking/how-to-ask-good-questions 
Questions can be asked on the mailing list:  
   
[mailto:support-webtools@lists.mozilla.org support-webtools@lists.mozilla.org]
      
      
    [mailto:support-webtools@lists.mozilla.org support-webtools@lists.mozilla.org]
or in the IRC channel at:  
or in the IRC channel at:  
      
      
irc://irc.mozilla.org/mozwebtools
    irc://irc.mozilla.org/webtools


The latest news and info can be found at the project homepage:
The latest news and info can be found at the project homepage:


http://www.mozilla.org/projects/testopia
    http://www.mozilla.org/projects/testopia

Latest revision as of 17:19, 6 June 2016

Welcome to Testopia!

Testopia is a test case management extension for Bugzilla. It is designed to be a generic tool for tracking test cases, allowing for testing organizations to integrate bug reporting with their test case run results. Though it is designed with software testing in mind, it can be used to track testing on virtually anything in the engineering process.

The following installation instructions assume you are installing the latest version of Testopia, currently version 2.4.

Requirements

  • Bugzilla 3.6+
  • Perl JSON 2.10
  • GD-Graph3d 0.63

Testopia is an extension to Bugzilla. This means that if you have one of the supported versions of Bugzilla installed, you are all set to install Testopia. Installation instructions for Bugzilla can be found at http://bugzilla.org

IMPORTANT NOTES: These instructions assume you have installed Bugzilla according to the Bugzilla instructions (from tarball or cvs). Installations from Debian .deb or from some RPM packages may place Bugzilla files in separate directories in which case, these instructions may not work.

If you are upgrading from 2.2 and have made modifications to the Testopia code, please be aware that you will need to merge your changes into the new file locations.

Also be sure to reverse the patch on your existing installation before unzipping the package.

Please make sure that your language of Bugzilla is the same as language of Testopia to be installed on. If you are not sure, just set language of your Bugzilla to English. You can change it any time later.

API USERS TAKE NOTE: Positional parameters are now deprecated as of 2.4. All params should now be sent in a hash (struct, dict, hashmap or whatever your language of choice calls key, value pairs). Though all attempts have been made to provide continuing support for positional parameters, please be aware that some API calls may fail until you make this change. Also, future versions may remove this support completely.

Installation on Linux

From the tarball: If you are installing Testopia from the release tarball, simply untar the tarball in your bugzilla top level directory. On Linux this would look something like this:

 $> cp testopia-<version>.tar.gz /path/to/bugzilla
 $> cd /path/to/bugzilla
 $> tar xzvf testopia-<version>.tar.gz

Next you need to patch the Bugzilla files. Find the patch file in the extensions/Testopia directory matching your version of Bugzilla. For example, if you are running Bugzilla 3.6.1 you will apply the patch-3.6.1 patch file.

 $> patch -p0 -i extensions/Testopia/patch-3.6.1

Finally, you need to run checksetup.pl

 $> ./checksetup.pl

If you are missing any dependencies, checksetup.pl will inform you. See "Installing Dependencies".

From git: If you want to install the latest code from git you will need to do the following:

1. Check out the git code in a temporary location

 $> git clone https://git.mozilla.org/?p=bugzilla/extensions/Testopia.git

From CVS: If you want to install the latest code from CVS you will need to do the following:

1. Check out the CVS code in a temporary location

 $> export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
 $> cvs login
 (Logging in to anonymous@cvs-mirror.mozilla.org)
 CVS password: anonymous
 $> cvs co Testopia

2. You will now make a tarball of the source. If you like to update your Bugzilla from CVS, be sure to delete the top level CVS directory first.

 $> cd mozilla/webtools/testopia
 $> rm -rf CVS
 $> tar cvf /tmp/testopia.tar .

Once you have your tarball, follow the tarball instructions above to untar it into your Bugzilla directory The last step is to install the Ext libraries:

 $> 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

Congratulations, you should be able to see the Testopia links at the bottom of your bugzilla pages.

Installation on Windows

Windows installations are not officially supported. By this we mean don't ask the developers for help as we have never tried to install on Windows and don't have any desire to. However, there have been numerous users that have managed to do so on their own. Here are some pointers:

  • Add a .txt file extension to your corresponding patch file (\bugzilla\testopia\patch-3.0[.x]).
  • Edit the above patch file to remove *nix line feed characters, and putting in classic DOS/Windows carriage returns.
    You can do this manually, or with WordPad (write.exe) or numerous utilities such as unix2dos or tofrodos.
  • Download GNU Patch and install it in a directory in your path.
    It can be downloaded from http://gnuwin32.sourceforge.net/packages/patch.htm
  • Change PERL "shebang" paths from native *nix, to a Windows Format.
    If you have MySQL Server installed, the Replace utility does a great job at this:
C:\<apache path>\htdocs\bugzilla> for %i in (*.cgi) do ("<MySQL path>\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" -- %i)
C:\<apache path>\htdocs\bugzilla> for %i in (*.pl) do ("<MySQL path>\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" -- %i)
C:\<apache path>\htdocs\bugzilla\Bugzilla> for %i in (*.pm) do ("<MySQL path>\bin\replace.exe" "#!/usr/bin/perl" "#!C:\perl\bin\perl" -- %i)

From here the steps should be fairly identical to those above, meaning patch the files and run checksetup.pl.

If you have problems please post questions to the support-webtools list. Do not email the developers directly.

References:

If you find additional pointers, please post them to the Wiki version of this file at http://wiki.mozilla.org/Testopia:README

Installing Dependencies

Some of the most common dependencies you'll need to install can be easily installed in both Windows and linux:

Install JSON:

    perl -MCPAN -e shell
install M/MA/MAKAMAKA/JSON-2.10.tar.gz

Install GD-Graph3d:

    perl-MCPAN -e shell
install W/WA/WADG/GD-Graph3d-0.63.tar.gz

In Windows, missing modules are easiest installed by running checksetup.pl and paying attention to the printout:

C:\bugzilla\>checksetup.pl
* This is Bugzilla 3.2.4 on perl 5.8.9
* Running on WinXP/.Net Build 2600 (Service Pack 3)
Checking perl modules...
...
* NOTE: You must run any commands listed below as Administrator.

***********************************************************************
* Note For Windows Users                                              *
***********************************************************************
* In order to install the modules listed below, you first have to run *
* the following command as an Administrator:                          *
*                                                                     *
*   ppm repo add theory58S http://theoryx5.uwinnipeg.ca/ppms
*                                                                     *
***********************************************************************
***********************************************************************
* REQUIRED MODULES                                                    *
***********************************************************************
* Bugzilla requires you to install some Perl modules which are either *
* missing from your system, or the version on your system is too old. *
*                                                                     *
* The latest versions of each module can be installed by running the  *
* commands below.                                                     *
***********************************************************************
COMMANDS:

    ppm install TimeDate
...

When running checksetup.pl, you will get an "Unable To Locate Component" error related to "OCI.dll" if you do not have the Oracle perl module installed.  If you are not using Oracle you can supress this message by running the following command:

ppm remove --area perl DBD::Oracle

Remember to "ppm install DBD-mysql" if you are using MySQL!

Upgrading

In general, you will need to follow these steps:

  1. Reverse the old patch by running the patch command you used to install with -R
  2. Untar the new files
  3. Apply the new patch
  4. Run checksetup.pl

Upgrading to latest from CVS:

Testopia comes with a script to update to the lates checked in version (trunk or tip). WARNING: This should only be done against the latest released version. The tip is considered unstable.

   $<path to bugzilla>/testopia/contrib> bash cvs_update.sh /path/to/bugzilla

The script can be modified to checkout a tag or version if you know what you are doing. maintenance

Getting Help

First you should consult the documentation. You can reach it by clicking the Help link on your installation or by visiting:

   Testopia Documentation Wiki

Questions can be asked on the mailing list:

   support-webtools@lists.mozilla.org

or in the IRC channel at:

   irc://irc.mozilla.org/webtools

The latest news and info can be found at the project homepage:

   http://www.mozilla.org/projects/testopia