linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

Provide instructions for connecting to UAT #193

Open SPlanzer opened 3 years ago

SPlanzer commented 3 years ago

This must include the below:

SPlanzer commented 3 years ago

Below are notes for connecting to the test environment before performing the plugin software tests as part of User Acceptance Testing (UAT)

The test database has been deployed to the usual development server. As to obscure its name in this public comment rather than its full name it will be referred to as devxxxxxxxxxxxx (or thereabouts, total xxx's are not indicative of the names length)

The test DB name on the server is gazetteer_20200826

QGIS Profiles.

As each QGIS user profile contains isolated settings, plugins and history they are great for isolating settings for different workflows. As the below steps will have you changing QGIS settings it is recommended you create a new user profile for testing.

You can switch between user profiles by selecting them in the Settings > User Profiles menu.

For more on profiles please see the QGIS Documentation

Install the plugin

A test version of the NZGB QGIS3 plugin (2.0.0-UAT) has been released and is ready to be installed into QGIS

Configure QGIS to connect to the LINZ dev plugin server

The NZGB plugin UAT version is available on the LINZ development plugin server. The server's address (https://plugins.qgis.linz.govt.nz/v1/dev/plugins.xml) needs to be added to the QGIS plugin configuration.

To configure QGIS to be able to install plugins from the LINZ plugin server.

  1. Open the plugins window via Settings > Manage and Install Plugins from the top menu bar
  2. When the plugin window opens select Settings
  3. Click the Add button
  4. Enter the name "LINZ development plugin repository " in the name field
  5. Add the server address (https://plugins.qgis.linz.govt.nz/v1/dev/plugins.xm) in the URL field
  6. Select Ok
  7. Select Reload Repository

To install the plugin

  1. In the side panel of the plugin management window Select Not Installed
  2. Find the plugin "NZGBplugin" and select it. Ensure the version is reported as 2.0.0-UAT
  3. Hit the `install' button

For more on this see the QGIS docs that have more detailed instructions.

Configure the plugin.

The plugin is hard coded to connect to the production server. Connecting to this server during testing would be a very negative experience.

To connect to the test server we must overwrite the QGIS environment variables with the test DB information.

This can be done using the QGIS interface to overwrite the database connection variables.

  1. Open the options menu via Settings > Options from the main toolbar
  2. Click on the System tab
  3. Scroll down to Environment - this is were we will update the DB connection
  4. Add two new records 4.1 PGHOST = devxxxxxxxxxxx (Note you will need to add the correct dev server name unlike here) 4.2 PGDATABASE = gazetteer_20200826
  5. QGIS will require a restart for these to take affect

image

Configure Python Macros

While we are in the options window, Python macros must be enabled to ensure the plugin runs

  1. click on the General tab
  2. Go to the bottom and for Enable Macros select "Always (Not Recommended)" image

Restart QGIS so that changes take affect.

Make sure the environment is ready to test

This is very important to ensure we are not connected to the default production environment. Being connected to the production environment during testing would be very bad.

  1. Open QGIS.
  2. Start the plugin
  3. Go to Plugins > Gazetteer editor > about gazetteer application.
  4. Check the database information in the about window confirms it is connected to the dev environment (i.e DB names =gazetteer_20200826. Host = devxxxxxxxxx )
  5. Start testing