In May, I started on a new project for a client, and one of their first requests was for a rapid analysis of open source (or in other words, "free") defect and test management products. Beyond the free aspect, I also had the constraint of a Windows server.
It’s natural that most open source products are designed for LAMP (Linux, Apache, MySQL and PHP), since the supporting operating system, web server, database server and programming language are also open source. By comparison, Windows Server, and the associated Internet Information Services (IIS, Microsoft’s equivalent web server), SQL Server (database) and Application Server Pages (ASPX programming language, be it in C#, VB or any variant) have certain associated costs. Admittedly, SQL Server, IIS and Visual Studio have free versions available, but once you port it to a commercial environment, the licence restrictions kick in.
The result was that I chose Bugzilla and TestLink, both well tried implementations with strong community support. Both require the use of Apache, MySQL and PHP, but you aren’t limited to Linux to implement this. Admittedly, it can be a little more complex to install and configure these on a Windows server, but there are some tools that can make your life more easy.
If you’re looking to implement Bugzilla and TestLink on a Windows environment, the following guide should help you towards getting both up and running with as few issues as possible. The installation process assumes you are installing to a 64 bit version of Windows, with the only difference being that installation for a 32 bit version should go to "Program Files" and not "Program Files (x86)".
Application Requirements
Before you start, you’re going to need to download the following packages:
ActivePerl
EasyPHP
Bugzilla
TestLink
GraphViz
Where you come across a value in italics and surrounded by {braces}, this should be replaced by details specific to your configuration.
Installing ActivePerl
- Install ActivePerl to
C:Program FilesPerl64
using the ActivePerl executable. - Add the following to the registry:
- From a command line, run the following:
[HKEY_CLASSES_ROOT.cgiShellExecCGICommand] @="C:Program FilesPerl64binperl.exe -T"
C: cd C:Program FilesPerl64bin ppm install AppConfig ppm install TimeDate ppm install DBI ppm install DBD-mysql ppm install Template-Toolkit ppm install MailTools ppm install GD ppm install Chart ppm install GDGraph ppm install PatchReader ppm install Net-LDAP-Express ppm install Email::Send::SMTP::TLS
Installing GraphViz
- Install GraphViz to
C:Program Files (x86)GraphViz
using the GraphViz executable.
Installing EasyPHP
- Install EasyPHP to
C:Program Files (x86)
using the EasyPHP executable. - Right click on the EasyPHP icon in the icon bar and select the
Configuration | EasyPHP
menu option. - Ensure
Start on Session startup
andStart Apache and MySQL as services (Administrator only)
are checked. - Ensure
Check version at startup
is not checked. - Click on the OK button.
Configuring Apache
- Edit
C:Program Files (x86)EasyPHPconf_fileshttpd.conf
.- Add the following at Line 244:
# # Tell Apache to use Perl to execute .cgi # ScriptInterpreterSource Registry-Strict
- Add
index.cgi
to the end of Line 256, e.g.DirectoryIndex index.html index.shtml index.wml index.pwml index.php index.php3 index.php4 index.php5 index.cgi
- Add the following at Line 370:
<Directory "${path}/www/bugzilla"> Options FollowSymLinks Indexes AllowOverride All Options +ExecCGI allow from all </Directory>
- Remove the
#
from the beginning of Line 459:AddHandler cgi-script .cgi
- Save the file.
- Add the following at Line 244:
Restart
option.Configuring MySQL
- Access the MySQL database by going to the EasyPHP icon in the Notification area, right-clicking and selecting the
Administration
option. A browser window will display. - Click the Open link next to the
MySQL Administration : PhpMyAdmin 3.4.9
under the Modules section. The phpMyAdmin website will open. - Click on the SQL option at the top of the screen.
- Create the Bugzilla User Name with the following:
GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzilla'@'localhost' IDENTIFIED BY '{password}';
- Close the browser.
- Edit
C:Program Files (x86)EasyPHPmysqlmy.ini
. - Change Line 60 from
max_allowed_packet = 1M to max_allowed_packet = 4M
. - Save the file.
Installing Bugzilla
- Extract Bugzilla.zip to
C:Program Files (x86)EasyPHPwww
. - At the command line, enter the following commands:
Cd C:Program Files (x86)EasyPHPwwwbugzilla Checksetup.pl
- If any packages are identified as missing, copy the install line and execute at the command line (e.g. ppm install PatchReader).
- Open
C:Program Files (x86)EasyPHPwwwbugzilla localconfig
in a text editor. - Change the following lines, starting at line 58:
# The DNS name or IP address of the host that the database server runs on. $db_host = '127.0.0.1'; # The name of the database. For Oracle, this is the database's SID. For # SQLite, this is a name (or path) for the DB file. $db_name = 'bugzilla'; # Who we connect to the database as. $db_user = 'bugzilla'; # Enter your database password here. It's normally advisable to specify # a password for your bugzilla database user. # If you use apostrophe (') or a backslash () in your password, you'll # need to escape it by preceding it with a '' character. (') or () # (It is far simpler to just not use those characters.) $db_pass = '{password}';
- Save the file.
- Edit the following file:
C:Program Files (x86)EasyPHPwwwbugzilla.htaccess
- Change Line 2 from
Deny from all
toAllow from all
.
- Change Line 2 from
- At the command line, enter the following commands again:
C: Cd C:Program Files (x86)EasyPHPwwwbugzilla Checksetup.pl
- At the prompt for a mail server, set it to
127.0.0.1
. - At the prompt for the administrator email address enter your email address.
- At the prompt for the administrator’s real name, enter the administrator’s name.
- At the prompt for the administrator’s password, enter a valid password.
- Repeat the password at the next prompt.
- Log out of the server.
Configuring Bugzilla
- From a browser on your desktop, navigate to
http://{server ip}/bugzilla
. - Login using your login email address and password. Bugzilla is now ready to set up for additional users and configuration.
- Click on the
Administration
link at the top of the screen. - Select the
Parameters
link from theAdminister your installation
screen. - Enter
http://{server ip}/bugzilla/
in the urlbase field. - Click on the
Save changes
button. - Click on the
General
link on the left hand menu. - Enter the administrator email address in the
maintainer
field. - Click on the
Save changes
button. - Click on the
Email
link on the left hand menu. - Select
SMTP:TLS
from themail_delivery_method
drop down list. - Enter the administrator email address in the
mailfrom
andsmtp_username
fields. - Enter
{smtp server}:{smtp port}
in thesmtpserver
field. - Enter the email login password in the
smtp_password
field. - Click on the
Save changes
button. - Click on the
Dependency Graphs
link on the left hand menu. - Enter
C:Program Files (x86)GraphVizbin
in thewebdotbase
field. - Click on the
Save changes
button.
Installing TestLink
- Extract TestLink.zip to
C:Program Files (x86)EasyPHPwww
. - Navigate to
http://{server ip}/testlink/
. - Click on the
New Installation
option. - Accept the licence.
- Click the
Continue
button. - Enter a table prefix for the project.
- Enter the database administration user (
root
, no password). - Create a TestLink DB Login.
- Click the
Process TestLink Setup!
button. - On the server, edit
C:Program Files (x86)EasyPHPwwwtestlinkcfgbugzilla.cfg.php
.//Set the bug tracking system Interface /** DB host to use when connecting to the Bugzilla db */ define('BUG_TRACK_DB_HOST', '127.0.0.1'); /** name of the database that contains the Bugzilla tables */ define('BUG_TRACK_DB_NAME', 'bugzilla'); /** charset of the database that contains the Bugzilla tables */ define('BUG_TRACK_DB_CHARSET', 'UTF-8'); /** useful if you have several schemas see BUGID 1444*/ // define('BUG_TRACK_DB_SCHEMA', '[CONFIGURE_BUG_TRACK_DB_SCHEMA]'); /** DB type used for the bugtracking db */ define('BUG_TRACK_DB_TYPE','[CONFIGURE_BUG_TRACK_DB_TYPE]'); /** DB user and password to use for connecting to the Bugzilla db */ define('BUG_TRACK_DB_USER', 'bugzilla'); define('BUG_TRACK_DB_PASS', '{password}'); /** link of the web server */ define('BUG_TRACK_HREF', "http://127.0.0.1/bugzilla/show_bug.cgi?id="); /** link to the bugtracking system, for entering new bugs */ define('BUG_TRACK_ENTER_BUG_HREF',"http://127.0.0.1/bugzilla/");
- Save the file.
- Edit
C:Program Files (x86)EasyPHPwwwtestlinkconfig.inc.php
. - Change line 225 from:
$tlCfg->config_check_warning_mode = FILE
to:
$tlCfg->config_check_warning_mode = 'SILENT';
- Save the file.
- Copy the
custom_config.inc.php.example
tocustom_config.inc.php
and edit. - Add the following at line 100:
// Add in the Bugzilla configuration $g_interface_bugs = 'BUGZILLA';
- Edit the following sections as defined below.
// SMTP server Configuration ("localhost" is enough in the most cases) $g_smtp_host = '{smtp server}'; # SMTP server MUST BE configured # Configure using custom_config.inc.php $g_tl_admin_email = '{admin email}'; # for problem/error notification $g_from_email = '{admin email}'; # email sender $g_return_path_email = '{admin email}'; # Urgent = 1, Not Urgent = 5, Disable = 0 // $g_mail_priority = 5; # Taken from mantis for phpmailer config #define ("SMTP_SEND",2); #$g_phpMailer_method = SMTP_SEND; // Configure only if SMTP server requires authentication $g_smtp_username = '{smtp username}'; # user $g_smtp_password = '{smtp password}'; # password
- Save the file.
Configuring TestLink
- Navigate to
http://{server ip}/testlink/
- Click on the hyperlink on the following page and login using
admin/admin
. - Configure any additional users you might need.
With luck, you should have fully functioning implementations of Bugzilla and TestLink running on a Windows environment. If you find any errors or have problems, please let me know via the contact page or via Twitter.
0 Comments