Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Cleaned up the 'Unit Testing' section

...

This check list seems to catch most bugs. We are not going to automate UI testing because it's not appropriate. The application is not massive and is scheduled to be mature in another 12 months or so. Just be sure to execute all the tests therein which takes about an hour if you are adequately caffeinated and focused.

2. Unit Testing

...

Overview

There are a modest number of pythonPython/django Django unit tests.
We do not have any However, there are currently no unit tests for the javascript JavaScript code. Tests are easy to write and help to prevent regression errors. 

When to write a test

?Here is when I consider writing a unit test.
When you find a bug is found, try to write a test that finds it.
If you start the debugger, consider writing a unit test test instead.
This can be expensive and so it is reasonable to debate this point.Use your judgement.
Often writing a test is super easy and very much helps to prevent regressions.

Running the Unit Tests

From the command line run

https://bitbucket.org/sfgovdt/eas/src/default/web/run_tests.cmd

which goes through the settings.py and calls into

Running the unit tests
  1. Connect to the web server of a given environment. (SF_DEV, SF_QA, SF_PROD or SD_PROD)
  2. Navigate to the folder containing the script that launches the unit tests.
    1. cd /var/www/html/eas/
  3. Launch the unit tests as sudo.
    1. sudo ./run_tests.sh
    2. This goes through settings.py and calls the tests in https://bitbucket.org/sfgovdt/eas/src/default/web/test_suites.cmd
Reviewing and saving the test results

The units tests take under one minute to execute. Results are output to the console with 'OK' after each test that passes and 'FAILED' for each test that fails. Manually review the results and fix any failed test as needed.

To archive the results copy the console output the clipboard and paste into a new text file. Upload the file to a folder containing testing-related artifacts for the given release. For example, R:\Tec\...\Eas\_Task\2018_2019\20181220_255_1.3.7\TestResults\EAS Unit Test Results - All Tests Passed - console output - 20190117.txt

3. Testing the Change Notification Emails

...