Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
metamod:test [2010-07-09 09:37:41] heikok |
metamod:test [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to test the software ====== | ====== How to test the software ====== | ||
- | The EXAMPLE application that is included in the source tree (app/ | + | After installing |
- | can be used to test the software. | + | |
- | this. | + | |
- | 1. Edit the '' | ||
- | must be adjusted according to the local computer environment. The most | ||
- | important are: | ||
- | |||
- | |SERVER | ||
- | |SOURCE_DIRECTORY | ||
- | |TARGET_DIRECTORY | ||
- | |ADMIN_DOMAIN | ||
- | |BASE_PART_OF_EXTERNAL_URL | ||
- | |LOCAL_URL | ||
- | |WEBRUN_DIRECTORY | ||
- | |OPENDAP_DIRECTORY | ||
- | |OPENDAP_URL | ||
- | |OPERATOR_EMAIL | ||
- | |||
- | The '' | ||
- | meaning that E-mails sent from the system to users are sent to the | ||
- | operator instead, and that the system works on a " | ||
- | which goes faster than real time. But one variable has to be adjusted in the | ||
- | 'Test configuration' | ||
- | |||
- | |TEST_IMPORT_BASETIME | ||
- | |||
- | 2. To copy the software to the target directory and make the substitutions | ||
- | prescribed by the master_config.txt file, do the following: | ||
- | |||
- | cd to the source directory (i.e. the top METAMOD 2.x directory) | ||
- | run: ./ | ||
- | |||
- | 3. Assuming the PostgreSQL software is already installed, the PostgreSQL | ||
- | users (admin and webuser) that are to access the database must be created. | ||
- | This step is only needed one time. PostgreSQL users are for the whole | ||
- | PostgreSQL installation, | ||
- | |||
- | cd to the target directory | ||
- | run: scripts/ | ||
- | |||
- | Metamod assumes to be running on a safe-system. Please make sure that //admin// and //webuser// are allowed to connect to the database: | ||
- | |||
- | pslq -U admin template1 | ||
- | | ||
- | If this fails (or requires a password), consider updating pg_hba.conf to allow all local connections (requires a postgres restart): | ||
- | |||
- | < | ||
- | # " | ||
- | local | ||
- | # IPv4 local connections: | ||
- | host all | ||
- | # IPv6 local connections: | ||
- | host all | ||
- | </ | ||
- | |||
- | |||
- | 4. Initialize the runtime environment: | ||
- | |||
- | cd to the target directory | ||
- | run: ./ | ||
- | |||
- | 5. Initialize the database, and load static data: | ||
- | |||
- | cd to the target directory | ||
- | cd init | ||
- | run: ./ | ||
- | |||
- | You may check the output of this script in the create_and_load_all.out | ||
- | file in the same init directory. Also check the databaselog (path given by | ||
- | the LOGFILE variable in '' | ||
- | |||
- | 6. Ensure that you have a working Apache 2.x installation with PHP 5.x. | ||
- | The httpd daemon should run as the same user as the METAMOD 2.x perl scripts. | ||
- | Otherwise problems with access rights to files created by PHP and perl | ||
- | respectively will araise. These problems could be solved by using ' | ||
- | and similar tools, but the METAMOD 2.x software is not prepared for this. | ||
- | The same runtime user for PHP and the perl scripts is assumed. | ||
- | The Apache installation must allow '' | ||
- | |||
- | 7. Make the METAMOD 2.x URLs accessible through the Apache server. This can | ||
- | either be done by making the METAMOD 2.x htdocs directory the Apache 2.x | ||
- | DocumentRoot directory. Otherwise, this can be done by providing a symbolic | ||
- | link in the Apache 2.x DocumentRoot directory to the METAMOD 2.x htdocs | ||
- | directory. This symbolic link must agree with the LOCAL_URL set up in the | ||
- | master_config.txt file. | ||
- | |||
- | 8. At this time all the web applications should work. Confirm this by visiting | ||
- | the URLs for the two main web pages in the example application | ||
- | (METAMODSEARCH and METAMODUPLOAD) from a browser (the URLs are found in | ||
- | the '' | ||
- | page is working. | ||
- | |||
- | 9. Enter the METAMODUPLOAD web page from a browser and create a user | ||
- | account. The operator will recieve an E-mail with the user details and an URL. | ||
- | Activating this URL will admit the user into the system. After activating this | ||
- | URL, the user recieves an E-mail with a password. In the test environment, | ||
- | this E-mail will be sent to the operator instead. | ||
- | |||
- | 10. Start the perl scripts responsible for loading data into the database: | ||
- | |||
- | cd to the target directory | ||
- | run: | ||
- | |||
- | 11. Enter the METAMODUPLOAD web page from a browser and log into the | ||
- | user account you have created. Enter the " | ||
- | the directory ' | ||
- | later will be loaded into the database). Go back to the " | ||
- | and upload the two files '' | ||
- | found in the testdata directory. | ||
- | |||
- | 12. After a few minutes, check that metadata from the files have been | ||
- | loaded into the database. This can be done by looking at the databaselog | ||
- | (path defined by the LOGFILE variable in master_config.txt), | ||
- | entering the METAMODSEARCH web page and search for the data. | ||
- | You may also consult the output files from the two perl scripts started | ||
- | by start_services.sh: | ||
- | |||
- | 13. Do a similar exercise with the files '' | ||
- | '' | ||
- | files in the administration page: ' | ||
- | requirements specified in the '' | ||
- | digesting these files will generate an error report that will be accessible | ||
- | from the METAMODUPLOAD web page. Also, the data provider will be | ||
- | sent an E-mail with a reference to this error report. In the test environment, | ||
- | this E-mail will be sent to the operator instead. | ||
- | |||
- | 14. Stop the perl scripts responsible for loading data into the database: | ||
- | |||
- | cd to the target directory | ||
- | run: | ||