This guide is intended to act as a brief summary of the basic steps involved in creating a blank test environment for the Windows UI of SupportDesk. Steps required to restore live data into this test environment are covered at the end of the document is Appendix A.
There are three main tasks in creating the working test environment:
- Creating a test SupportDesk environment of applications and files.
- Creating a test database.
- Creating a shortcut that points to this test environment.
- Creating a test WebServer.
Discussing these one at a time:
Creating the Test SupportDesk Environment
Creating a test database (MS SQL Server)
Creating a Shortcut to the Test Environment
Creating a test WebServer
This is probably the easiest of the three. Simply go into Windows explorer and take a copy of the SupportDesk installation directory. You should then paste this into the same root directory –(assuming this is the C drive) and rename it to be e.g. “suppdesktest” – share this out with the same permissions as the original SupportDesk directory. Delete the file web.config in the test installation directory.
This step has copied all applications and files that make up the SupportDesk installation, other than the database. If your attachments directory is located outside the root directory then you will need to make a copy in a similar manner to that described above.
Review your email templates (located in the Mail sub-directory) as they may contain URLs or images which point to the live installation. Amend as necessary.
Amend suppdesk.ini in your test installation directory. This is used by the WebServer. Amend any paths which reference the live installation directory under the [Directory] section. Also amend the entries in the [Client Server] section which tell the WebServer which database to connect to. You need to change the following settings to point to your test database:
Delete the Password2= line. This line will get re-generated when you first log into the test webserver.
In SQL Server create a new database and test login as per the instructions in the Technical Setup guide. Call this database “suppdesktest”. Under Security, Logins, create a new sql login called “suppdesktestuser” who has the “suppdesktest” database as their default database and who has db_owner and Public rights on the DB. Make sure the Login uses ‘SQL Server Authentication’. On the Login’s User Mapping tab, make sure you tick the ‘Map’ box next to the “suppdesktest” database and type in the login name in the Default Schema column i.e.“suppdesktestuser”. This will result in your test system having a clean database. If you wish to take a copy of your live database and restore this into your test environment please see Appendix A. If using Access then a blank access database can be created in the test environment or a copy made of the live database and renamed.
Before creating the shortcut some preparatory work is required.
First create a new 32-bit ODBC DSN that is pointing at the test database “suppdesktest” and which uses the new SQL user (“suppdesktestuser”) that was previously created. TEST this ODBC connection to ensure that a working connection can be made.
If using MS Access make sure your new 32-bit ODBC DSN points to your test access database.
We now need to create a new *.ini file in the windows directory for the test environment. We would suggest
that the easiest way to do this is to copy the existing (live system) suppdesk.ini file from the windows directory
and save it with the name suppdesktest.ini . Edit the file using notepad and remove everything except the lines:
Save this ini file.
Assuming that we just need one shortcut to the test system which we can put on the server. Create a desktop shortcut to the supdskcs.exe in the suppdesktest folder and set the “Start In“ directory to be the new suppdesktest directory that we have just created. There is a key difference in this shortcut in that we have to tell the shortcut to use the new ini file rather than the live one. This is important as it is the ini file that holds the core information as to which database to point to. To do this we need to edit the target of the shortcut so that it reads something similar to:
When all of this is done save the shortcut and use it to start SupportDesk. If operating with a MS SQL Server database ensure that you use the SQL Tab to enter the SQL details for the test database. If all steps have been carried out correctly it should start the application in the test environment and create all new tables in the database – no calls will be present.
Follow instructions in the Technical Setup guide for setting up a new webserver in IIS for the test system. Amend references to the live installation directory to reflect your test installation directory. Once configured and successfully logged in to the test webserver, we recommend that you go to Settings->WebServer, Advanced Settings section and amend the “WebServer URL” to reflect your test WebServer URL. Amend the Attachments Folder entry as appropriate. Then amend, or remove altogether, entries for the “KPI URL” and “QuickReport URL”.
Restoring a copy of the Live Database into the test environment (MS SQL Server). If a blank database is not sufficient for the test environment then take a back up of the live database and restore it over the top of the test database that has just been created. Ideally your DBA will assist in this process. If you are restoring the test database onto the same sql instance as the live database, please check, and amend if necessary, the default location of the data and log files (*mdf and *.ldf) at restore time – you don’t want to overwrite your live data and log files. In SQL Server Management Studio, right mouse click your live database name, select Tasks, and back up your live DB to a file (make a note of the location). In the test database restore the database from the file that you have just backed up. There is a requirement to re-associate the test SQL login with the test database and give it owner rights again. You will also have to run a script to change ownership of the tables in the test database to that of the “suppdesktestuser” – this is done by running a script:
exec sp_msforeachtable @command1=”print ‘?’ exec sp_changeobjectowner ‘?’,’ suppdesktestuser ‘”
Once this is complete you can then log back into your test system from the new test shortcut and you should see all of your data. It is advisable to disable mail if that is in place and make sure that it is obvious which system you are in before progressing.