Bug #671
closed
Add more checks to appion testSuite.py
Added by Neil Voss over 14 years ago.
Updated over 10 years ago.
Status:
Won't Fix or Won't Do
Category:
Python scripting
Affected Version:
Appion/Leginon 2.2.0
Description
I (Neil) have written a test Suite that automatically tests several aspects of the pipeline, but it need more checks to make sure everything is going correctly.
see source:trunk/appion/test/testSuite.py
- Project changed from 5 to Appion
- Affected Version set to Appion/Leginon 2.0.1
- Category set to Python scripting
- Status changed from New to Assigned
- Assignee set to Amber Herold
- Target version changed from Appion/Leginon 2.1.0 to Appion/Leginon 2.2.0
- Affected Version changed from Appion/Leginon 2.0.1 to Appion/Leginon 2.0.0
- Show in known bugs set to No
- Deliverable set to Automated Testing
command to use:
python testSuite.py --runname=testrun1 --projectid=5 --rundir=/ami/data08/appion/10may13l35/testruns/testrun1 --expid=7622 --jobtype=testsuite --show-cmd --session=10may13l35
Used testSuite.py as the starting point for a new test framework in r15588. Info on creating a new test.
As a by-product, there is a general purpose basicReport.inc file that can be used for making very basic appion report web pages.
Still needs some polishing and review. I may want to add the config file changes to the setup wizard once everything has been reviewed.
- Status changed from Assigned to In Code Review
- Assignee changed from Amber Herold to Eric Hou
Eric, could you take a look at this so far? I can review in person as well if that is easier. It still needs a little work, but I'm hoping you can take a look at the overall structure to see if there are any major issues.
Thanks!
- Assignee changed from Eric Hou to Amber Herold
Code is good.
There is a typo in basicreport.inc line 185.
When you are putting $dberror in the the exception and display it back to the webpage, you are exposing the database information to the world wide web.
This is a good example of we should put system error in the error log.
The most important exception needs to catch in BasicReport class is its constructor, because it try to establish mysql database connection.
So you can throw different types of exception, some for webpage, some for log file to solve this problem.
But in my knowledge, if everything setup correct, the web user shouldn't see any of the exception messages, because they shouldn't need to know what happen to the server side. (I never see any exception error messages when I am browsing any websites). For example: Database Error with Table: $tablename, finding $columnname entries like $pattern. DB error: $dberror (should not show this to the web).
Thanks.
Eric
TODO:
- merge this table display code with the existing one
- consider using runAppionScriptInSubprocess which was recently added to AppionScript
- Target version changed from Appion/Leginon 2.2.0 to Appion/Leginon 3.0.0
- Target version changed from Appion/Leginon 3.0.0 to Appion/Leginon Future Version
- Status changed from In Code Review to Won't Fix or Won't Do
- Affected Version changed from Appion/Leginon 2.0.0 to Appion/Leginon 2.2.0
Also available in: Atom
PDF