Project

General

Profile

Actions

Appion Testing » History » Revision 2

« Previous | Revision 2/9 (diff) | Next »
Amber Herold, 04/25/2011 10:54 AM


Appion Testing

There is a framework in place to write a test script for a particular data set that can be run on demand. The tests may be launched from the website and results of each executed command may be viewed from the web.

The follow steps should be taken to add a new test.
  1. Select a session to be used as the test dataset. At AMI, test data set projects are named with the following format: zz_parttype_partname
    The test session names begin with "zz_".
    See issue #1229 for more information on AMI's test data sets.
  2. Add the session name to the $TEST_SESSIONS array located in config.php in the myamiweb directory.
  3. Make a copy of test_zz07jul25b.py located in myami/appion/bin and rename it to match your session name with "test_" prepended.
  4. Edit the new "test_zz....py" file.
    1. Change the following class name at the beginning of the file to reflect your test session name:
       class Test_zz07jul25b(testScript.TestScript):

      This new class inherits all the properties and methods of the base class, TestScript, which is defined in myami/appion/appionlib/testScript.py. The TestScript class includes functions to create and execute commmands for many of the Appion programs like dogpicker, pyace, maxlikeAlign, uploadTemplate, etc.
    2. At the bottom of the file replace the name of the class to be instantiated in the main function to match your new class name:
      if __name__ == "__main__":
          tester = Test_zz07jul25b()
      

      This main function will create an instance of your new class, run the start() function and finally run the close() function.
    3. Modify the start() function of your new class to run the commands relevant to your data set. Review the functions available in testScript.py to decide which parameters need to be set for each function.

Updated by Amber Herold over 13 years ago · 2 revisions